question about P1 counter

Subforum for general discussions. Do not dump your questions/problems here, but try to find the subforum where it belongs!

Moderators: leecollings, remb0

Post Reply
BartSr
Posts: 489
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

question about P1 counter

Post by BartSr »

Code: Select all

domoticz.devices('P1').actualWatt
shows current consumed electricity retrieved from grid
that's as expected
but... if solar.power is returned to the grid the returned (Watt) value is just 0 wheras I expected same (negative) value as shown on P1 device.
Any advice?
Bart
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
cvvt
Posts: 6
Joined: Sunday 26 March 2023 20:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: question about P1 counter

Post by cvvt »

Bart ,

I use in LUA :

local udPower = dz.devices(idxP1data).usageDelivered
local uPower = dz.devices(idxP1data).usage


where idxP1Data is the index of the P1 hardware device.

udPower is the delivered power in the grid
uPower is the used power from the grid
ud-u.jpg
ud-u.jpg (104.97 KiB) Viewed 74 times
BartSr
Posts: 489
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: question about P1 counter

Post by BartSr »

cvvt, thanks. This makes sense allthough I cannot check the generated power right now. Hopefully tomorrow there's enough required sunpower
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: question about P1 counter

Post by waltervl »

Always check the wiki for device functions of dzvents
https://wiki.domoticz.com/DzVents:_next ... mart_meter

Code: Select all

    counterDeliveredToday: Number.
    counterToday: Number.
    usage1, usage2: Number.
    return1, return2: Number.
    updateP1(usage1, usage2, return1, return2, cons, prod): Function. Updates the device. Supports command options.
    usage: Number.
    usageDelivered: Number.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
BartSr
Posts: 489
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: question about P1 counter

Post by BartSr »

Walter, I fully agree.
I know there is lot of information in the Wiki.
Maybe it's me but while looking for the information I have seen before I often cannot easily ' refind ' it.
Starting at the wiki domoticz Main Page I expect to easily be able to find the information as per your link. But how to find?
Oke, you know it's in the dzVents part. But that you have to know it. Otherwise it wil take lots of reading before you find it (if you make it). I am missing a logic lookup feature or do I overlook? What's the advised way for looking up information.
HA (which I tried for some time due to curiousity) has excellent lookup functions. Domoticz is an excelent system with pretty very well scripting facilities where HA users might dream of. But the chain is as strong as the weakest shackle. That's how we call it in Dutch. For me the weakest part is the documentation. But again, maybe it's just me. A review of the documentation possibly might give domoticz another boost.
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: question about P1 counter

Post by waltervl »

In a webbrowser there is a search function (F3 key) so when on the dzvents wiki page search for P1 and you will soon hit the correct section of the dzvents page.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
BartSr
Posts: 489
Joined: Sunday 03 July 2016 16:16
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.7
Location: Netherlands
Contact:

Re: question about P1 counter

Post by BartSr »

Thanks walter but how to find myself via this page (main domoticz wiki) the result you showed me :
https://wiki.domoticz.com/DzVents:_next ... mart_meter
Raspberry pi 3b
Arduino
KAKU
RfxCom
Zwave2MQTT
OTGW
Chinese sensors temp (Dallas),movement
Tasmota
Esp8266 / 32 espeasy
Zigbee2MQTT
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: question about P1 counter

Post by waltervl »

Just bookmark the dzvents wiki page so you can find it the next time.
If you type dzvents in the search field of the wiki on the right top corner you can find the page. There are numerous links to this page. When in the dzvents wiki page use the browser search to search for the topic or device you want info on.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest