-
Notifications
You must be signed in to change notification settings - Fork 499
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
DDF for IKEA INSPELNING smart plug #7959
base: master
Are you sure you want to change the base?
DDF for IKEA INSPELNING smart plug #7959
Conversation
Hey @bluemoehre, thanks for your pull request! Tip Modified bundles can be downloaded here. DDB changesModified
ValidationTip Everything is fine ! 🕠 Updated for commit d0c3f72 |
The API should report consumption in Wh, see https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/generic/items/state_consumption_item.json. If the device reports Current Summation Delivered in Wh, no conversion is needed. I don't use Phoscon, and have no clue how they report consumption. The devices that I have don't use divisors/multipliers on Simple Metering, but instead use Summation Formatting. I never really figured out how that works, so I tend to use a known load (e.g. an old 60W Tungsten bulb), and see what the device reports to figure out it's scaling. Also check the Unit of Measure attribute. If that's kW and kWh binary (what I see in my cases), and 0x0000 reports in Wh, the divisor should be 1000, to transform Wh to the advertised kWh. |
Actually, the logic here is quite simple: If, for the given device, attribute 0x0000 gives us the value of 4, the math is 4*1/1000 = 0,004. That means the device reports already in Wh and the DDF value calculation is incorrect. Ideally, the multipliers and divisors are correct. However, we also had enough devices out there where that is just rubbish. |
I was testing 1h having a 6.5W bulb connected and total consumption ( As far as I understand these data, there are only two approaches possible: AFormatting block just tells clients how to convert values to get to "kW & kWh binary" units, which is a default display to the user.
BFormatting block tells devs how to convert values to meet standards.
(C)Formatting block / measured value is just bananas, and you have to find out yourself, as @SwoopX pointed out ;) It's just a matter of what is the default/specs. Based on your feedback @ebaauw, as well as what I see in the Phoscon UI, I think the first variant is the one to go. |
Not sure where I should have said that, but I warned taking things for granted. That's also why it was suggested to verify with a known load. The zigbee spec is quite clear in my view how to use the formatting attributes (as described above) and also that the summation formatting doesn't play a considerable role 🤷♂️ |
Solves #7948
Need verification / double check of Consumption calculation.
Phoscon shows value as
wH
, while comments and docs states value should be inkWh
.Anyway, I have already tested and confirmed that the raw value
0x0702 / 0x0000
in deCONZ GUI is inwH
. Based on the divisor value from0x0302
, I added a x1000 division.Maybe @ebaauw can help?