How to get the month value from a counter?

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

Moderator: leecollings

Post Reply
pfloryann
Posts: 254
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

How to get the month value from a counter?

Post by pfloryann »

Hi,
How to get the month value from a counter? This value is found in the log from sensor.
How can it be obtained so that it can be used in dzvents?
Also It would be very useful if there were data for the month and year in api.

Thank you!
Attachments
Screenshot 2026-07-03 at 13-49-12 Domoticz.png
Screenshot 2026-07-03 at 13-49-12 Domoticz.png (22.74 KiB) Viewed 1354 times
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
User avatar
waltervl
Posts: 7029
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2026.3
Location: NL
Contact:

Re: How to get the month value from a counter?

Post by waltervl »

There is no direct dzvents or API json field for this. You have to do this through the api call param=graph https://wiki.domoticz.com/Domoticz_API/ ... Gas,_Water

See for example viewtopic.php?t=42454 for usage.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
pfloryann
Posts: 254
Joined: Wednesday 09 January 2019 10:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.3
Location: BlooeSky
Contact:

Re: How to get the month value from a counter?

Post by pfloryann »

Thank you!
Domoticz on Raspberry Pi 4 Debian 13 x64
Zigbee2mqtt and zigbee devices (Xiaomi, Ikea,Tuya, Philips, Osram), Broadlink, Solar power Victron Energy, Yeelight, Xiaomi Purifier Pro, Roborock S5, Gree AC, JBL soundbar, Philips Android Tv
Post Reply