fhem icon action/command (webcmd?)

Begonnen von kroonen, 27 Juli 2016, 21:20:34

Vorheriges Thema - Nächstes Thema

kroonen

Hi,

I have my shutters ready and controlled by 2 relays and an esp8266.

Everything works fine , on my laptop I see the webcmd, open / closed / vent / stop

Now I have shutter icons , but  I want that if I press the icon the shutter is going to open and close. This is more handy if I want in the morning open the shutters with my smartphone.

I have this in my config, and what to change to make the icon work for open and close?

define RolluikSlaap dummy
attr RolluikSlaap devStateIcon open:fts_shutter_10 closed:fts_shutter_100 vent:fts_shutter_80
attr RolluikSlaap eventMap on:open off:closed
attr RolluikSlaap group Rolluiken
attr RolluikSlaap room Slaapkamer
attr RolluikSlaap webCmd open:closed:vent:stop


define RolluikSlaapOpen notify RolluikSlaap:open { GetHttpFile('192.168.180.75:80', '/control?cmd=event,rol1');; }
attr RolluikSlaapOpen room Slaapkamer

define RolluikSlaapClosed notify RolluikSlaap:closed { GetHttpFile('192.168.180.75:80', '/control?cmd=event,rol2');; }
attr RolluikSlaapClosed room Slaapkamer

define RolluikSlaapVent notify RolluikSlaap:vent { GetHttpFile('192.168.180.75:80', '/control?cmd=event,rol3');; }
attr RolluikSlaapVent room Slaapkamer

define RolluikSlaapStop notify RolluikSlaap:stop { GetHttpFile('192.168.180.75:80', '/control?cmd=event,rol4');; }
attr RolluikSlaapStop room Slaapkamer

justme1968

each devStateIcon component consists of 3 parts: <state>:<icon>:<command>. you have to add the commands to your configuration: attr RolluikSlaap devStateIcon open:fts_shutter_10:close closed:fts_shutter_100 vent:fts_shutter_80:open
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

kroonen