SUPLA / supla-device

Create your own Supla device! This software can be used as a library for Arduino IDE, or can be used directly with ESP8266 RTOS SDK and with ESP IDF. It is also possible to compile and run it on Linux and in FreeRTOS.
GNU General Public License v2.0
28 stars 14 forks source link

Storing virtual relay state into a file (on Linux) #29

Closed klew closed 1 year ago

klew commented 1 year ago

https://forum.supla.org/viewtopic.php?p=135869#p135869

klew commented 1 year ago

Relay state can be written to a file by using CmdRelay channel type. Here is a part of yaml config as an example:

  - type: CmdRelay
    name: command_relay_1
    initial_state: restore
    cmd_on: "echo 1 > command_relay_1.out"
    cmd_off: "echo 0 > command_relay_1.out"