Beiträge von mgg

    Hi

    I'm trying to "automate" the management of scheduling rules for an irrigation system via http:

    With gen1 devices it were very simple:

    Code
    http://192.168.33.127/settings/relay/0?schedule_rules=1000-0123456-on,1012-0123456-off,1400-0123456-on,1012-0123456-off,1404-0123456-off,1800-0123456-on,1012-0123456-off,1404-0123456-off,1810-0123456-off

    Now, with gen2 devices should be easier, but I couldn't find the proper way:

    For example, using schedule.Create, and @sunrise+1h59m and the web interface it seems to work:

    Code
    http://192.168.33.127/rpc/Schedule.List

    but, if I use the rpc interface to add the schedule (previously I delete all using Schedule.DeleteAll):

    Code
    http://192.168.33.127/rpc/Schedule.Create?timespec="@sunrise+01h59m * * SUN,MON,TUE,WED,THU,FRI,SAT"&calls=[{"method":"Switch.Set","params":{"id":0,"on":true}}]

    I get

    Code
    {"code":-103,"message":"Invalid argument 'timespec': Failed validation!"}

    Also, the rpc interface for Schedule seems unstable... it's force me to factory reset the shelly plus 1 to get it work again... seems some kind of problem managing the scheduling list via rpc interface.


    I'm open to suggestions :)

    Thanks in advance !!!!