-
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
TUYA Device work (switch) local but power/voltage/ampare wont be send #414
Comments
ok found out that the plug need internet for this - thought everything is local ? switch work without internet - and it works only if you have the tuya smart app on mobile device open maybe intresting rospogrigio/localtuya#549 |
This is very astonishing. Which version of the binding are you using? With the latest 3.2.14 it should work. |
3.2.15-SNAPSHOT |
I can confirm this in version 3.2.14. I disabled Internet access and power-cycled the smart plug. OH could still see that the plug was online, but the current was not reported (I don't use any other channels). As soon as I enabled Internet access, the current immediately started populating again. |
@scatterthought Which DPs are used? |
@J-N-K Here are the device logs. Looks like the DPs are "Current", "Voltage", and "Power". Here are the equivalents in the instruction set. Note that "add_ele" does not have a DP, so the calculation of kWh must be done in the cloud. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@J-N-K, just giving this a nudge since it got marked as stale. Not a huge priority, but would be great to have local access to power data. Cheers! |
I have a similar case with my "Stadler Karl Big" humidifier. Sending commands for switching ON/OFF, changing speed level etc, works. But it never updates it values like humidity. Also sending a REFRESH command to this item does not help. I use the latest released version 3.2.15. My polling interval is 60 seconds and i blocked my internet for this device too. If needed, I can provide logs too. But I dont know if I have to obfuscate some of the encoded raw data. --- UPDATE --- I analyzed my log a little bit deeper and maybe the device itself is not providing updated data, if it is not reaching the cloud.
Based on this log this are my assumption
I can send command to dps 1 to switch the device on and off but I will always get the payload above back if the thing is fresh initialized and fetching data with DP_QUERY I know that it was working in the beginning here are some more logs
|
I wonder if it's similar to this limitation on TP-Link Tapo devices?
|
Instead of just sending ON/OFF, which results in a "soft" ON/OFF state. I removed the power cable for 10 seconds. After that time all values (e.g. filter runtime, humidity etc) are reported correctly. After plugging the power cord back in there was no blocked ntp request. Only blocked request on port 443 and port 886 to AWS cloud. lets see how long I get correct values again. |
This discussion on LocalTuya might be relevant. |
If that helps it should be added to the documentation. Also - in the issue linked by @scatterthought - it seems that discarding (instead of redirecting) DNS requests might help. DP18 handling is already part of the code, so that should work. |
I block dns requests now too. Before, my dhcp server was assigning an internal dns who was still answering dns requests. Only the final internet traffic was blocked. Now, my dhcp server is assigning for tuya devices an public dns and all internet traffic is still blocked. This means, dns requests of tuya devices are now blocked too. Have verified it by checking logs. I have to observe the tong time behavior of my humidifier. If I know more, I will write an update here. |
It's possible that the humidity data is different from the energy data, as I don't think I've read anything that mentions humidity. I don't think I have the ability to discard DNS requests on my network, so I can't test this. I looked in Pi-Hole and my Tuya devices are finding their way around it. Tuya must have hardcoded a DNS into them. |
My guess was that it has nothing to do with the kind of data. Only with the fact that a network connection is needed sometimes to report any data. And currently I try to find out if this is the case. I don't know much about the protocol, but I think the data types are not classified by humidity/energy etc. They are classified more by generic types like string, number, bool etc. |
@HolgerHees Did you find something that should be added to the documentation? |
not really. Still not working for me. it works after I switched the device ON. But after some hours, it stops sending new values. I ignore it for now, because sending commands like fan level, works the whole time. And thats the important part for me :-) |
The problem is that a lot of Tuya devices are buggy and there is no documentation how it SHOULD work, so it's all guessing. It could be that some devices just fail if the connection is too "old". |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi,
i have installed your tuya plugin (tested both dev and normal) Device is a power plug like the gosund sp1 its from GNCC and called SP11 - i use tuya smart app... but weather in tuya smart app or inj OH3 i got the energy status .. i got at first time a few now i got nothing ..any tip for me ?
The text was updated successfully, but these errors were encountered: