Access to LOG data using dzVents

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
HvdW
Posts: 504
Joined: Sunday 01 November 2015 22:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Twente
Contact:

Access to LOG data using dzVents

Post 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.
Bugs bug me.
User avatar
waltervl
Posts: 5148
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Access to LOG data using dzVents

Post 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 :-)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
FlyingDomotic
Posts: 303
Joined: Saturday 27 February 2016 0:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Access to LOG data using dzVents

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest