-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Get consumption values for Ledvance WiFi plug #129
Comments
Please update fhem and fhempy and check if it happens with the latest version as well. If you can reproduce the error with the latest version, you can try to use freezemon to identify the root cause:
Freezemon creates a log file with verbose 5 during the freeze which can be analyzed afterwards. |
Thanks, i will give freezemon a chance. |
As long as you don't get a "NO RESPONSE" error in fhempy log none of the events should get lost. |
So even during a freeze period of 7s or longer (max. 180s) the events are handled. |
Just checked the log from today: until now there are 5 events lost somewhere. The only shown error was readingsBeginUpdate. The main Fhem Log doesn‘t show any Errors at the times when the event is expected. |
Did it work sometime before? How do you know that 5 events got lost? |
No, every day some events are lost. Because most times one event every 30 Minutes occurs it‘s easy to cont the missing ones. If I sum up the energy values and compare them with the log from the App, my sum is always lower than there :-( |
Which DPs do you use to retrieve the used energy? There is currently an ongoing discussion about handling energy data here: |
The naming as in j0zozzoarutv0nu1 looks fine. Only the last DP isn’t used by the Ledvance plug. |
Hmm... actually I'm not polling the device but just keep the connection active by sending a request every 5s. What happens if you check with tinytuya every 30min? Does it receive the event properly everytime? |
I will check it if i notice that the event seems missing. |
Fhem still looses events. Even if the LedvanceApp sisn‘t running on any device. Mostly the events lost are between midnight and 8.00 in the morning. But sometimes also at other times. |
Are you sure that fhempy looses events? Could it be that the consumption values in DP 17 follow another logic as mentioned in the tinytuya discussion? I think that fhempy is not loosing events, but the device doesn't send the expected events. I haven't found a way to get the data from tuya iot cloud. |
Hello Dominik,
yes I‘m pretty sure that events are lost because the consumption in the App is the same as the sum logged in Fhem for the day by adding all values of add_Elem until a expected half ourly event is missed. At the end of the day the sum in Fhem is much to low.
If the event is really lost or the implementation off Tuya in this device is faulty (sometimes not signaling an update) is beyond my knowledge.
Without a log of the cloud with the single events is‘s difficult to decide what’s exactly is going wrong.
|
I mean, that fhem is not loosing an event, actually it's not receiving one or tuya has some special implementation how events are triggered. Have you had one full day where the values were correct? It would be very strange if every day just one value is missing. |
No, nearly every day has 4 - 6 missing events. Don’t know, if other devices are better. All other events (current voltage, power, state) looking ok. Only the metering (locally) is faulty. The consumption values in the cloud are the expected ones.
|
Btw, the readings are only updated if they are changed. Could it be that the missing value is exactly the same value as the one 30min before? |
Could be…. Had this thought already. In the log are a few occasions where this happened. They are very rare so I don’t think, that’s the the culprit. But it’s not impossible ;-)
How are value changes / updates reported by Tuya? Simply looking for a different value won’t work if the same value is posted and both are needed :-(
|
I think I can create a separate reading |
Hello Dominik, das ist sicher eine sehr gute Idee. |
Hi, |
There is one more problem with the Ledvance WiFi plug at least in my Fhem installation on my old raspberry.
Sometimes, when this occurs, the Logfile from fhempy shows an error like this one
2023-02-18 16:25:47,999 - ERROR - fhempy.lib.fhem: FHEM took 7001ms for readingsBeginUpdate($defs{'plug_LedvanceMeter1'});;
Loosing this event occurs even sometimes at night when fhem has all time for it… so something seems blocking something. Normally the event occurs 30 minutes so that the daily count should be 48. but most often, 4-6 events will lost so the cumulated energy count is currently useless. The Ledvanceapp and it’s cloudservice got these events. At least the daily log looks more accurate…
any clues or hints what ICan check on my raspberry what happens (not).
Michael
The text was updated successfully, but these errors were encountered: