I have a number of Zigbee smartplugs with energy metering function. They work OK, but I am having a bit of trouble trying to extract values.
When I look at the Domoticz device,, it shows: "Today: 0.310 kWh".
But when I extract the values in a LUA script (using otherdevices), I get "0.0;1280".
What should I do to extract all available info from this device?
how to read "electric" values from smartplug
Moderator: leecollings
- waltervl
- Posts: 5397
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: how to read "electric" values from smartplug
I am not using Lua but dzvents but it seems the 1280 is the total value. With dzvents you can get the today value directly. With Lua I have no idea how to do that, but probably it can be calculated.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 731
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: how to read "electric" values from smartplug
Ah, that looks promising.
Would you be willing to post the dzvents script to pull the information? Thanks in advance!
Hans
- waltervl
- Posts: 5397
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: how to read "electric" values from smartplug
Search in the dzvents subforum for WhToday and you find loads of examples like viewtopic.php?p=184677&hilit=Whtoday#p184677
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 539
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: how to read "electric" values from smartplug
What about domoticz.devices('nameOfYourDevice').dump()
It will show everything you can extract in the log.
It will show everything you can extract in the log.
Bugs bug me.
Who is online
Users browsing this forum: No registered users and 0 guests