FHEM Widget Logo

FHEM Widget 2

FHEM Widget is...

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]

New in Version 2.8:

Setup using the Wizard

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.
It does, however, not support fhem_widget_command_2 for now

Setup of the Apple Watch App (from 2.3)

Actually there is not much to do. To reduce the app scope to the intended short-lived interactions I decided to go for an opt-in approach. By default, no device is shown in the app until the "locations" parameter contains "WATCH". So, just set the desired locations, press "Update" and you are good to go.
Internally all devices are MultiChannelDevices (see below).
Configurations are only transferred to the watch when "Update" is pressed.

RANGE devices are not yet supported. Feedback in the forum or via mail is appreciated.

Manual Setup

Add fhem_widget_command(_2) to the first line in your them.cfg which begins with attr global userattr. Like this:

attr global userattr fhem_widget_command fhem_widget_command_2

For all devices that you want to control add the attribute fhem_widget_command 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"]
}

Parameters

The following table describes all possible parameters

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 location for this channel. Valid values: ["APP","WIDGET","WATCH", "WGRID", "WLIST", "AGRID", "ALIST"]. Default is "APP", "WIDGET. To have devices available in the watch app, this location must be set explicitly New in Version 2.4: WGRID: Only in the grid widget; WLIST: Only in thew list widget. New in Version 2.5: AGRID: Only shown in grid view within the app; ALIST: Only shown in the list view within the app.
prefix O New in Version 2.2. Only evaluated in STATE devices. Attaches this static string to the response as prefix.
suffix O New in Version 2.2. Only evaluated in STATE devices. Attaches this static string to the response as suffix.
color O New in Version 2.4. Only evaluates in Grid UI. Sets the color for this specific device (only one). ("#FFFFFF")
value_ colors O Neu in Version 2.6 if the device contains a list of allowed_value with colors, the grid ui replaxes the text response by this color. Expected is the exact same number of color values as values in allowed_values.
group O New in Version 2.6 Group devices in grid view

Subscriptions

The App is free to use for up to three devices. You can prepare more within your FHEM and play around with the device types but the list is always cut after three. To enable more devices as well as the sync service a subscription is needed. There are three auto-renewable subscriptions:

A Coffee for the Developer

Control more than three devices, access the Sync Service and get new features constantly for the price of one good coffee per six months

One Instant coffee a month

Control more than three devices, access the Sync Service and get new features constantly for the price of one instant coffee per month. Try one week free.

Information about auto-renewable subscriptions

You can deactivate the automatic renewal within your iTunes account settings until 24 hours before the renewal. Payment will be charged to your iTunes Account at confirmation of purchase. The subscription automatically renews unless auto-renew is turned off at least 24-hours before the end of the current period. Your Account will be charged for renewal within 24-hours prior to the end of the current period.
You can manage your subscriptions and auto-renewals by going to your Account Settings after purchase. Any unused portion of a free trial period will be forfeited when you purchases a subscription to that publication.

Examples:

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

IMPRESSUM
PRIVACY POLICY


  1. Optional/Mandatory