(Custom?) Switch gate command with status indicator

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
Posts: 1
Joined: Wednesday 14 November 2018 18:08
Target OS: Raspberry Pi
Domoticz version:

(Custom?) Switch gate command with status indicator

Post by morbak » Wednesday 14 November 2018 18:31

Hi all,

I want to open & close my entry portal with a Swicth on Domoticz web inerface, i've tested many differents things, without good result:

Currently My entry portal is drived with a Raspberry:
Open/close : I send an http request to RsPi (it's still working)
Detect portal position : I can send a specific http request to the RsPi and RsPi server return JSON status with numeric variable corresponding to the portal position: (1=open/2=close/3=moving/stopped/4=position error) (this working well)

Where I am today:
I'm using a (ON/OFF) Domoticz Switch to Open /close the portal .
I've a Lua script polling freqyently the RsPi for the JSON status, so i've, in the (Domoticz log file) the numeric value of the portal position

What i attempted (without success):
Have the Pushbutton command, with a picture representing the portal position depending the numeric JSON value (scirpt Lua), and have a text indicating the portal position.

See below what i expect :

Many thx
IMG_20181114_091349.jpg (275.05 KiB) Viewed 39 times

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests