Does Shelly Cloud api support Bulk Control to update Schedule Rules?

  • I'm developing a mobile app where I need to update the schedule of several Shelly Plug at the same time.

    Since there are about 40 of them, making a request to update 1 by 1 is very costly in terms of efficiency.

    Is there a way to do it through bulk control in 1 single request?

    Best Regards!

  • Yeah you can write a script, here are the API docs https://shelly-api-docs.shelly.cloud/gen1/#shelly-p…ettings-actions

    Here I have written about schedule_rules on TRV sorry in German, but the url's should be nearly the same TRV - Schedule Rules API

    Code
    http://192.168.XXX.XXX/settings/relay/0?schedule_rules=0830-0123456-18.5,1030-0123456-20.5

    You have to change thermostats to relay and remove schedule_profile from URL the rest is nearly the same. I'll try to translate the 0830-0123456-18.5 code for you

    First Block (0830): HourMinute

    Second Block (0123456):

    0 = Monday

    1 = Tuesday

    ....

    6 = Sunday

    so 0123456 is Monday to Sunday

    Last Block (18.5): at TRV this is temperature 18.5°C,

    So I think you have to replace this with something like on or off

    Best option would be to set the rule for one device and get the scheme from http://<shellyip>/settings/relay/0

    But I hope this helps you

  • Hello, thanks for answering

    I'm currently able to set the schedule_rules via the shelly-cloud API, by doing a POST to:

    Code
    https://<my-account-access-domain>/device/relay/settings/schedule_rules

    to which I send the data:

    Code
    - auth_key
    - go
    - enabled
    - channel
    - schedule_rules

    With that I can easily set the schedule of the device. What I need is a variant to run a BULK to update multiple devices at once. Do you know if that function is available in the shelly-cloud API?

    Thanks again for the help!

  • Hi RayCast,

    take a look to the ShellyActionRouter tool.

    https://github.com/shelly-tools/ShellyActionRouter

    I use this as batch process for ~20 devices e.g. scene "good night" which switches off all devices and lamps one after the other.

    elektroman:~#

    Mein Zoo: 15xShelly2.5, 7xShellyPlugS, 4xShellyDimmer2, 2xShelly1PM, 8xShelly1, 2xShellyi3, 1xShellyPlus i4, 2xShellyFlood, 2xShellyDoorWindow2, 2xShellyButton1, 2xShellyButton, 2xSOnOff4CH, 1xSOnOff2CH, Nanoleaf, Meross, Govee, Tado, Tuya, Xiaomi, SwitchBot ...

    Raspberry's, OpenHAB, Pi-hole

  • Dieses Thema enthält einen weiteren Beitrag, der nur für registrierte Benutzer sichtbar ist.