Hi,
I have 3 Chacon On-Off plugs Wi-Fi with the firmware hfeasy (https://github.com/ljalves/hfeasy),
I use the commands below to control them,
switch:
- platform: command_line
scan_interval: 30
switches:
plug1:
command_on: "curl -X GET http://192.168.1.8/state?sw=1"
command_off: "curl -X GET http://192.168.1.8/state?sw=0"
command_state: "curl -X GET http://192.168.1.8/state"
value_template: '{{ value_json.relay_status == "1" }}'
- platform: command_line
scan_interval: 30
switches:
plug2:
command_on: "curl -X GET http://192.168.1.9/state?sw=1"
command_off: "curl -X GET http://192.168.1.9/state?sw=0"
command_state: "curl -X GET http://192.168.1.9/state"
value_template: '{{ value_json.relay_status == "1" }}'
- platform: command_line
scan_interval: 30
switches:
plug3:
command_on: "curl -X GET http://192.168.1.10/state?sw=1"
command_off: "curl -X GET http://192.168.1.10/state?sw=0"
command_state: "curl -X GET http://192.168.1.10/state"
value_template: '{{ value_json.relay_status == "1" }}'
The problem is that I often find the same errors in the log,
And sometimes moments of inactivity of several seconds in the history while the plug is working,
Command failed: curl -X GET http://192.168.1.***/state
*** = 8, 9 or 10
Error parsing value: ‘value_json’ is undefined (value: None, template: {{ value_json.relay_status == “1” }})
Update of switch.plug*** is taking over 10 seconds
*** = 1,2 or 3
Could there be a way to correct them please?