-
Notifications
You must be signed in to change notification settings - Fork 286
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
Please report missing energy signals (apparentpower, reactivepower, powerfactor) #1097
Comments
Appears to be merged so I was going to close this issue, but I tested and it wasn't reporting. |
Try to redo hass Discovery |
More progress: |
Repost here: When I click "start home assistant discovery", it just shows a message "MQTT not running". |
Well,you obviously need to configure mqtt first in order to use home
assistant discovery
…On Sun, Feb 25, 2024, 10:23 AM Manu Evans ***@***.***> wrote:
Repost here:
When I click "start home assistant discovery", it just shows a message
"MQTT not running".
What is this actually supposed to do?
I'm not using homeassistant... what is the goal here, or what mechanism
will make it start reporting these new topics?
—
Reply to this email directly, view it on GitHub
<#1097 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUMGZ64VG4PFBZCMXLF5MHDYVL7HNAVCNFSM6AAAAABDOFCZFSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSHA3DQOBWGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm not sure what that means though? What is home assistant discovery? |
'Start home assistant discovery' causes the device to publish a group of messages under the mqqt topic |
Okay. So when I say that the device isn't reporting on those topics, I mean it's not publishing to those new topics at all. It's nothing about home assistant. Should the latest version of the software be publishing those new topics regularly? |
Actually you're right about power factor/reactive/active power, They're not released at this point, my previous #1092 didn't include them, only 'Energy Today' and 'Energy Yesterday'. |
Try flashing from the build output here, download at bottom of the page: |
I'll have a look in the morning, but immediately, having a 5% granularity on power factor feels pretty course. That's a huge error margin. |
Okay, I tried it now. It's reporting these values. Something is definitely wrong though:
You can see here, power is greater than apparent power (impossible), and power factor is >1 (also impossible). Also fishy that reactive power is exactly 0.000000 to that level of precision. The hardware's not that precise, there should be at least some noise. Do you have a debug build where you can log the calibrated and uncalibrated values as a sanity check? Might reveal is the problem is hardware or calibration software... Are these values reported as recorded from the hardware, or are they calculated locally? |
Thanks for trying it. The exact zeros are likely from some zero clamping happening in the calculations, in drv_bl_shared.c around line 500 (in my PR version). |
Oh okay; I did I also realised that the frequency isn't reported either... do you mind also adding that one to the list? |
I did So the outstanding issues as I see; i'd like to be able to set the pf sensitivity or threshold, or if not, at least set them to values such that they are not truncating data (0.5% is a good baseline, since there are some devices on the market which advertise accuracy class 0.5S). And can you add frequency too? I forgot this one before when I asked for the other items. |
0.5% is fantasy with such hardware. Tuya itself says 5% for bl0937 and 3% for bl0942. |
I see heaps of devices listed on ali that say accuracy class 1, or accuracy class 0.5... I guess they're all full of shit! :) |
Never seen socket with such advertisment. There is Pzem devices for energy metering specifically, they are more believable, but still for me looks like they don't meet the spec. |
No, certainly no socket; dedicated meter products often advertise this. |
I may see about adding frequency as a separate PR while I still have some understanding of how it all works. Not all devices report it however - BL0937 does not. |
Describe the bug
Device reports
voltage
,power
,current
, but it doesn't reportapparentpower
,reactivepower
,powerfactor
.Please add reporting for those values.
If you think it's not something that most people would want, then put it behind a configuration flag?
Firmware:
The text was updated successfully, but these errors were encountered: