James Denman Posted June 20 Share Posted June 20 I would like to ask you to modify the documentation to make it less confusing with respect to the term "timer". This occurs in at least three different contexts, and it has taken me several hours (ahem) to figure out what's what. This is a negative utility which you could spare future users by clearer documentation. I would also like to ask you to make currently active Timers (at the language level, see point 3 below) queryable by RPC. The different contexts are: An auto-flipback timer after using RPC Switch.Set and a "toggle_after" parameter, eg http://192.168.178.13/rpc/Switch.Set?id=0&on=true&toggle_after=30 The UI (web browser page at the switch's URL) shows an animation of the timer counting down On querying the switch's status with Switch.GetStatus it refers to a timer: { "id": 0, "source": "HTTP_in", "output": true, "timer_started_at": 1718884929.69, "timer_duration": 30.00, "temperature": { "tC": 64.8, "tF": 148.6 } } A timer set in the UI under Home \ Output(0) \ Automations \ Timers, eg an "Auto ON" timer of 45 seconds Switch.GetConfig refers not to a timer but to "auto_on": { "id": 0, "name": null, "in_mode": "detached", "initial_state": "restore_last", "auto_on": true, "auto_on_delay": 45.00, "auto_off": false, "auto_off_delay": 60.00 } While the timer is running (but only then), Switch.GetStatus shows a timer, as in case 1 above: { "id": 0, "source": "WS_in", "output": false, "timer_started_at": 1718887526.48, "timer_duration": 45.00, "temperature": { "tC": 66.1, "tF": 151.0 } } The only mention of a timer in the documentation is actually a very different beast: the Timer "global object" mentioned under "Shelly Script Language Features" (eg "Timer.set()"). It does not seem to be possible to query the currently active Timers via RPC. While I think I understand how this arises in the implementation (as a "global object", it's at the language rather than the device level), it does not correspond to the otherwise very high standard of the system to have an important aspect of system behaviour (whether and which timers are currently operating) not queryable. There should be a Timers.List function available at language and RPC level to return the list of currently active timers (and the language engine should, if necessary, maintain this list internally based on Timer.set() and Timer.clear() operations). With thanks and best regards, James Denman Quote Translate Revert translation? English (American) Finnish French German Italian Portuguese (European) Spanish Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.