Skip to main content
. 2020 Jun 11;20(11):3328. doi: 10.3390/s20113328

Table 2.

REST API endpoints.

Endpoint Description Exceptions
/powerHistory Method: GET. It receives as a parameter a date in dd-mm-yyyy format and returns a JSON object with a list of the energy prices. It returns ’404 Not Found’ in case there is no data for the requested day.
/timers Method: GET. It returns a JSON object with the list of the 16 available timers. If it is not configured, it returns the list of 16 timers as if they were inactive.
/timer Method: PUT. It allows for modifying a timer configuration, so it receives as an input parameter the timer number.
/Status Methods: GET, PUT. It returns a JSON object with the status of the smart socket and allows for modifying it through a PUT request. This method works in best-effort mode: the interface is updated before the node response is known. In case of error the state will be updated again as soon as possible to reflect a consistent state.