It has come to my attention that RutOS 7.14 has removed the I/O POST/GET function in favour of the standard API. At present we use the time parameter to temporarily toggle a pin, which the API does not appear to support. We use this as a kind of power switch, and the device making the request is the device that gets power cycled, so it is essential that the router itself can switch the pin back again without any further requests from the device. Is there any plan to add this function to the API?
We are in the same situation. We have achieved some advances, creating a bulk request ( https://developers.teltonika-networks.com/fundamentals#bulk-requests ), but without a timeout between switching on and then off the dout1 pin. The advantage of a bulk request is that you launch a unique request and forget. The execution of individual requests is done in an “atomic” way.
An additional question is: Does it exist a way to introduce delays between two endpoints requests in a bulk request?
I found a completely dirty way to insert a delay: repeat the first trigger multiple times in the bulk. Repeating 8 times in a RUT241 gives aprox. 1 second of delay, enough for my purposes.
Elegant? Not at all! Does it work? Yes. (Long live engineering
Anyway, it would be nice to find a clean way to do it from the API… Let’s wait for someone at Teltonika to respond.
Beyond other uses for I/O pins, I think power cycling devices is a feature that is in demand (it certainly is for my organization).
The rise-delay-fall (or vice versa) feature available in the deprecated I/O API, executable as an atomic operation, is very important. It could be implemented as an enhancement to the /io/{id}/actions/change_state endpoint (adding parameters similar to those of the equivalent deprecated API command), or as an additional, completely separate “delay” endpoint, allowing it to be included within a bulk request. This latter approach may be even more interesting, allowing the entire bulk sequence to execute each individual endpoint sequentially.