Hello
I got a full immersion (10 days configurations and settings) in HA and i need an help
In my house i have PLCs that work on IP protocol. Basically i have a Relè connected to a Lamp for example with ID 1
i can send http POST command like this:
_http://localhost:8080/command=get?element?1 (1 is the ID of the relè) and system give me a response like this:
‘‘elemento id=“1” type=“6” status=“0” currentvalue=“0” title=“Mansarda Oblo” label_value=“mV” id_group=“1086” currenttextvalue="" des_group=“Home Remote”/’’
status=0 mean the relè is inactive status=1 the relè is active
At moment i created this on config.yaml
rest_command:
mansarda_oblo:
url: “_http://localost:8080/command=set_active?1”
And create a button with:
type: button
name: Turn On Lights
show_state: false
tap_action:
action: call-service
service: rest_command.mansarda_oblo
service_data:
entity_id: mansarda_oblo
It Work.
My goal should be to send couple of request per minute to _http://localhost:8080/command=get?element?1 and have a different icon if the result of status is 0 (off) or 1 (on)
May you suggest me a way for trying to doing that?
Thank you