Page 1 of 1

Access to LOG data using dzVents

Posted: Thursday 21 November 2024 23:49
by HvdW
Is it possible to read the log data of a switch using dzVents?

Code: Select all

2024-11-21 06:59:01	Off	timer
2024-11-21 00:01:01	On	timer
2024-11-20 06:59:01	Off	timer
2024-11-20 00:01:01	On	timer
2024-11-19 06:59:01	Off	timer
These data.

Re: Access to LOG data using dzVents

Posted: Friday 22 November 2024 0:14
by waltervl
Depends what you want to do with it.
If you want to get the data from database I do not believe it can be read. Perhaps there is an API call for it but as far as I know not documented.

On the other side you can store the log value in dzvents persistent data while monitoring the switch so you can do the evaluation on the dzvents data. There are some examples of this somewhere on this forum. But you can always ask ChatGPT or Copilot for a clever answer :-)

Re: Access to LOG data using dzVents

Posted: Friday 22 November 2024 1:37
by FlyingDomotic
There's an undocumented API,responding at http://<domoticz_ip>:<domoticz_port>/json.htm?idx=<deviceIdx>&type=lightlog
This may change at every new version, use it at your own risk.
IMHO, keeping changes in a persistent dzVents data, as suggested, is probably the best solution.