Devices are a central concept in Domotiga and represent the actual devices Domotiga is monitoring or controlling.
|The list of known devices can be accessed through the Devices icon in the Main menu bar on the left, using the Devices menu (Devices --> List Devices) or using Alt+D.|
Adding devices¶In most cases it is handy to have new devices automatically added. For this, enable Auto Device Create:
- Setup --> Main
- Check the Auto Device Create check-box
When now new devices are discovered for instance on the RFXCom or ZWave interface, they will be automatically added.
Alternatively, add manually a new device using Devices --> Add Device
Also when you do not have "real" devices (yet), you can add a device, see Network Ping.
To edit a device, either double-click on the line of the device in the Devices list or move your mouse to the line of the device, press the right mouse button and select Edit. For further information see Device configuration below.
Deleting a device¶
Either move your mouse to the line of the device, press the right mouse button and select Delete or Edit the device (see above) and press the Delete button
Device configuration is done in the Edit Device window that can be opened by double-clicking on the line of the device in the Devices list or moving your mouse to the line of the device, press the right mouse button and select Edit. Below is an description of the tabs of this window.
- The Device Id assigned by Domotiga
- The Name string will be used in the Device overview and must be unique
- The Type selects the type of device and the Device selects then the exact device; the field right from the type will give a further description of the device
- Right from the Name/Type fields you see two file names that are composed from the Name and Device field. These file names will by used as image when displaying the device on the Floorplan.
- The Node ID field gives the address of the Node
- Icon On/Dim/Off gives the icon Domotiga will show in the Device overview window when the relevant state is active.
This tab can be used to select the groups which the device is member of. Just click on one of the groups and it will move from the Available Groups to the Selected Groups and vice-verse.
With this selection you decide where this device, it's data and things like RRDTool graphics will be displayed.
The Location you select will be displayed with the device in the Device overview.
Under Floorplan you can select any of the available floor plans and that you can press the Editor button to place the device on that floor plan.
The first check-boxes:
- Device can be switched
- Device can be dimmed
- Supports extended X10
- Hide device
- Disable poll OpenZWave device
are likely self-explanatory.
Reset value to ... each ... Minutes(s) is used to <please fill in>
Repeat state each ... Minute(s) is used to <please fill in>
The comments box can be used to <please fill in>
Here you can see the battery level when that information is available.
The Seen First, Seen Last and Last Changed fields give the time for these events.
This tab gives the values associated with the device:
- The ID is a unique number within Domotiga that is assigned when the value is created
- The Num is giving the order of the values with the device
- The Value is the last known value
- The Last Seen gives the time the Value was last updated
You can further configure values by going double clicking on the line of the value you want to edit, see below Value configuration.
The value configuration window has four tabs, Main, Graphs, Options and Log, see below.
The three buttons at the bottom of the windows are common for all tabs. Delete deletes the device and Save or Cancel saves are cancels the changes made.
- The Device ID and Value number are read-only
- The Name is used in the Device Name as displayed in the Device value sheet
- The Value field can be edited and when you press Save that value is display but it seems not to be logged.
- The Unit field right of the Value field selects what units the measurement has; this information is used when displaying the value and in the RRD graphs.
- For Correction, see below
- The two status fields, Seen Last and Last Changed are likely self-describing
Correction¶This is a formula to correct the raw value you see in the Value box and can be used to give a value an offset or scale it. Note that this is for output functionality only:
- The GUI (device list, device values etc.) will display the value after correction
- Also webclients, xmlrpc will use the corrected value
- But the internal values and the values stored in the database (when enabled) are raw values.
- Also for a Trigger you need to use the raw value, see issue #459.
You can in the formula refer to the current value using the ValueY string or the Dev_X_ValueY string where X is the Device Id you can find in the Device Id box above and Y the value you can find in the Value Number box above.
|Value1 * 1000||From kWh to Wh|
|round(((Value1 - 32) / 1.8), -1)||From Fahrenheit to Celsius rounded to one digit|
|Value1 + Value2||Add value \#1 and value \#2 from the current device|
|Replace(Value3, "online", "On")||Replace the text "online" in Value3 with "On"|
|Value3 + Dev_17_Value3||Add value #3 from current device to value#3 with id 17|
When using the value from another device, the conversion value will not be triggered if that value changes. Only when the current value changes, the correction formula will be triggered.
These graphs are generated using the RRDTool, see that Wiki page for more information.
- Log status changes to the db means that status changes are saved in the database
- The logged values can be viewed in the Log tab.
- You can also access the values accessing the database through other means
- Display status changes means <please fill in>
- Speak status changes means that the changes for this device as spoken out. For that you need to have a speech engine installed, see VoiceText Support.
This tab can be used to view and edit logged values logged in the database for the device. If no values are displayed and you want to have values stored in the database, enable this using the Option tab.The buttons, left-to-right mean:
but if all is good, this should also be displayed when you hover with your mouse over the buttons.
The Erase this Value and Erase All Values button below the "DataBrowserLog" box will erase all log entries for this value respectively all log entries for all values for the selected devices.
To debug things, check the Devices checkbox in the Debug section of the Main Settings (Setup -> Main)
After this, the debug log should show something like:
2014/09/12 00:03:43 [Devices] Device with address '11' is 'Home Energy Meter 2E' 2014/09/12 00:03:43 [Devices] ValueUpdate called for device with id '63' valuenum '2' and value '93.296' 2014/09/12 00:03:43 [Devices] Device change triggered for device with id '63' and value2 '93.296' 2014/09/12 00:15:44 [Devices] Creating log record for device with id '63' and valuenum '2' = '93.309'