Legobas / mqtt-timer

Programmable Timer/Scheduler for MQTT
https://hub.docker.com/r/legobas/mqtt-timer
Apache License 2.0
14 stars 0 forks source link

how to send interval command via json? (Gen2 shelly) #3

Closed vampywiz17 closed 2 months ago

vampywiz17 commented 2 months ago

hello there,

I would like to make a ringing with my gen 2 shelly. here my conf:

    timers:
    - id: 001
      time: 16:15
      description: duda_teszt
      interval: 5 sec
      topic: duda_nagycsarnok/rpc
      message: ['{"id":1, "src": "horn", "method": "Switch.Set", "params":{"id":0,"on":true}}', '{"id":1, "src": "horn", "method": "Switch.Set", "params":{"id":0,"on":false}}']

It not work. What the correct syntax if i want to send a json command with "on" and after 5 sec a "off" (with json format)

vampywiz17 commented 2 months ago

ahh sorry i read the doc. wrong :)

It is the config that need to me:

    timers:
    - id: 001
      time: 17:00:00
      description: duda_teszt_be
      topic: duda_nagycsarnok/rpc
      message: '{"id":1, "src": "horn", "method": "Switch.Set", "params":{"id":0,"on":true}}'

    - id: 002
      time: 17:00:05
      description: duda_teszt_ki
      topic: duda_nagycsarnok/rpc
      message: '{"id":1, "src": "horn", "method": "Switch.Set", "params":{"id":0,"on":false}}'
~
Legobas commented 2 months ago

I have also a Gen 2 Shelly but I use the Topic 'shellies/ShellyPlugWoonkamer/status/switch:0', with payload on/off. A lot easier than the RPC JSON!