New in version 1.4:
A small app that controls user-defined FHEM devices. It utilizes the following command:
set [devicename] [controlled_attribute] [allowed_value]
If there is no controlled_attribute
available, it uses
set [devicename] [allowed_value]
From Version 1.3 there is a rudimentary wizard (which will gain new features). To use this, provide the URL and Port and press "Update". Then open the wizard, choose the device you want to add and insert the parameters. Formatting and adding is done by the wizard.
Add fhem_widget_command
to the first line in your them.cfg which begins with
attr global userattr
. Like this:
attr global userattr fhem_widget_command
For all devices that you want to control add the attribute fhemwidgetcommand with the following JSON as value.
{
"controlled_attribute": "desired-temp",
"allowed_values": [
"5.0",
"6.0",
"7.0",
"8.0",
"9.0",
"10.0"
],
"order": 2,
"filter": "Reduced"
"alias": "LocalAlias",
"displayLocations":["APP","WIDGET"]
}
The following table describes all possible arguments
name | O/M 1 | description |
---|---|---|
allowed_ values | M | All allowed values as String array. If empty („[]“) the state is displayed. |
controlled_ attribute | O | If available, this attribute is set |
order | O | If given, the controls are ordered after this number. If not given, 0 is assumed. |
filter | O | If given, it is only displayed when the app contains the same filter string |
alias | O | New in version 1.2. Overrides the FHEM name and alias. |
locations | O | New in Version 1.3. Defines the display locations. Valid values: ["APP","WIDGET"]. |
Status display without actions:
define Schlafzimmer CUL_HM 2397B8
attr Schlafzimmer fhem_widget_command {"allowed_values":[],"order":5}
Trigger with just one value:
define Restart FS20 11114444 99
attr Restart fhem_widget_command {"allowed_values":["on"],"order":10}
Switch with two values
define Entertainmentecke CUL_HM 2C8FC001
attr Entertainmentecke fhem_widget_command {"allowed_values": ["off","on"],"filter":"public"}
Heating with many values (ordered from low to high):
define HeizungS CUL_HM 3C509B04
attr HeizungS fhem_widget_command {"controlled_attribute":"desired-temp",
"allowed_values":["5.0","6.0","7.0","8.0","9.0","10.0","11.0","12.0", "13.0",
"14.0","15.0","16.0","17.0","18.0","19.0","20.0","21.0","22.0","23.0","24.0",
"25.0","26.0", "27.0“,"28.0","29.0","30.0"],
"order":3,
"filter":"public"}
A switch with an alias
define Entertainmentecke CUL_HM 2C8FC001
attr Entertainmentecke fhem_widget_command {"allowed_values": ["off","on"],
"filter":"public",
"alias":"TV"}
More information:
https://waschto.eu/fhem-widget-fhem-devices-als-widget-unter-ios
In case of emergency, mail me:
info@trpgmaker.de
New in version 1.3:
New in Version 1.2.1:
New in Version 1.2:
alias
in json that overwrites the name and the FHEM aliasNew in Version 1.1:
Optional/Mandatory ↩