-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong power consumption when there is more than one device #41
Comments
Hello. Your device is a ZHAConsumption and not a ZHAPower ? If "websocketnotifyall" is set to "true" you normally have the both information in the same notification, so clear the field "buffercommand" and the start of the fonction ProcessAllState() will be enought ? |
Hello, I see this in the logging. Hope that makes it clearer: 2020-01-04 20:29:16.685 (Conbee) ### WebSocket Data : {'e': 'changed', 'id': '2', 'r': 'sensors', 'state': {'consumption': 410, 'lastupdated': '2020-01-04T19:29:16'}, 't': 'event', 'uniqueid': '00:15:8d:00:03:42:a7:ab-01-0702'} The overview in Domoticz says that the consumption device has type "General" and subtype "kWh", while the power device has type "Usage" and subtype "kWh". Where can I check for "websocketnotifyall". I am still a bit new to Domoticz and the plugin. |
Don't worry, you have a message when you start the plugin about this option, but you have it to "true" And yes, you are right, on your log you are updating" Device B - Consumption 4" with 'consumption' from the notification but with the power from "Device A - Power". In fact this device create one device for consumption 00:15:8d:00:03:42:a7:ab-01-0702 and one other for power 00:15:8d:00:03:42:a7:ab-01-0b04. Some other device use the same cluster 0b04 only. Will be easy to correct, like i have said before, I just need to reset the field
But I need to make some tests, the device created in domoticz use both value, power and consumption, in your situation power will be always 0, because you have it on other device. So I need to check how domoticz will react. I will give you a code to try tomorrow. |
Ok so you have news files here https://github.com/Smanar/Domoticz-deCONZ/tree/beta But you need to delete your device "(Device X - Consumption)" and restart the plugin after modification, devices will be re-created but as energy counter. |
Noticed the same thing. I also have two innr plugs (SP 120). Beta looks better. Thanks! For comparison: This is a z-wave power plug (PowerNode, not added devices to Domoticz, only use is as repeater): This is the beta of this plugin with the new devices (2 plugs): One thing, it doesn't show "Today:" for the "General, Managed Counter" as it does when the type is "General, kWh". Don't know how this will affect the reports (and cost) section yet. "Elmätare" is a MySensors device counting pulses from my power meter for the house Sorry for all the edits. Adding info as I go. Line 1204 in 9f9566e
The "d" in "Drop". ;-) |
Typo corrected, thx :) For counter, I m not sure yet ^^. I have, as choose at least 1 - General/Managed counter. For sure I can have report and cost for the three. I have checked (on other hardware), but not sure it's working, I think we need at least 24h for a first result. I need to use fakes values to use the 2, because it works with power and not consumption in reality. But I haven't understand how they make cumul and use the "today" feature. The three can have it but the display seem random, only the 2 have this line all the time. For the 2, it 's easy, this device works with power, so domoticz can make calculation itself. But for other, I think it's the device that make calculation and send directly a cumul. For your server (server kw/h), the value go down, or only increase ? |
18 kWh in total since plugging in the innr plug. The server use about 1.5-1.8 kWh/day. The devices named "Server" shown in my screenshots comes from this plugin (the beta branch) |
Ok, so I realy thing it's better to take General/Managed counter, this device is just a counter and only that. Now just need to be sure the report and cost are working corectly. |
Yes, I want to see the daily kWh usage to detect any strange deviations from day to day. The last image comes from the Domoticz app's widget. The MySensors device called "Elmätare" is based on this: I have no history at all yet. The kWh-usage keeps going up as it should. |
History and report is still empty. Other plugs will use three devices. The on/off switch, General kWh (kWh and watt) and Usage, Electric (watt). No need for domoticz to calculate kWh or watt, the plug does that. |
But this one don't count, it just display the value I send to it (and using the division) ! I have created 2 widgets with the same setting. https://www.domoticz.com/forum/viewtopic.php?f=28&t=30815&p=233096#p233096 |
Not sure that i fully understand. This can't be used? Power from the "active power" value from the plug (currently 62 watt): The ENERGY value from the counter in the plug (currently 20.29 kWh, 20290 Wh since plugged in): Just guessing here. Sorry, I know too little. I don't know how the data looks from deCONZ. Need to learn Python I guess. ;) |
Nope you are right ^^. The domoticz widget general/kwh is a good widget but I will not use at 100% for your device. So I m searching a consumption widget, with daily information. it exists on domoticz, and domoticz can manage them itself (reset every day for exemple), but I don't find how they work. The rfxmeter device look good, but it works realy strange during my test. You can check on your widgets, I think you already have one working ?
It's just perfect for me, except the strange working mode .... |
Give me some days (waiting for return from domoticz community) to make a try. The rfxmeter will not look like the Zwave kwh Meter. But it will be more usable, for exemple you will have total consumption (not present in zwave widget), the future device will be a widget made just for consumption. IDK how will be the report but I realy think I will be fine. If, realy, the future widget will be bad, I will make with the general/kwh but I see lot of disadvantages with it. |
Ah. I see what you mean. No problem. I can create my own as long as I have access to current watt and (k)Wh value. Total usage checked using the reports. My energy meter for the whole house (MySensors) is at 14028.009 kWh. Not much of use to see the total usage in the widget for that one 😉.. Thank you for taking your time to look at it! |
@NiklasOlofsson Good point:
Bad point
I have updated my domoticz version, because on previous It log bad value when the counter reset. The widget do the math : Today = actual - previous, but if the counter reset you have actual = 0 so a negative value > bug. Pls tell me how you fell this one ! |
So, no problem, how is the device ? If you have same probleme than me with "big number", can you make a screeshoot for I make an issue. |
Looking good here. No problem with big numbers. Don't know what will happen if I cut power to the plug. If the counter value is saved in the plug or starts at 0 again. Then, it could lead to problems. I had that problem when using a 1-wire counter and the RFXMeter device a couple of years ago. |
And yes, it's that the problem ^^. I have make a post about this https://www.domoticz.com/forum/viewtopic.php?f=28&t=30815&p=233096#p233096 But without answer, so if you still have the problem, I will make an issue. I did not have the problem on my last tries, but tell me if you see it (you will see it on report, on dashboard it will be corrected itself by domoticz after some good value) |
It haven't reset ?
And I send the cumulated value you have on the device at the device, 828 on your screenshot. If you make a reset, the send value decomes 0 so you have
And the variable used can't be negative, so you have a "big number". I think you had a situation where the plugin have received a consumption = 0 (without reset, just bad value). So in this situation, I m agree it's a bug from the plugin (or perhaps deconz, but without log, We'll never know) but if you make a reset you will same problem, so for me, the domoticz code need to be patched too. I m making a domoticz issue ATM. |
@NiklasOlofsson Can you explain what have happened ? |
I have two innr smartplugs that report the power consumption.
However, according to the logging they do this interleaved.
This causes the power from one plug to be reported in the consumption of the other.
I looked at the code and the problem seems to be that there is a buffercommand variable that assumes that the last reported power is for the device that is now reporting the consumption.
I am not sure what the best fix would be. I would guess best would be to know which device the power is registered for.
The text was updated successfully, but these errors were encountered: