smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 23 forks source link

[tuya] Polling issue with Energy Meter/Switch TAXNELE TXCB2-TWM #566

Closed andreground closed 2 months ago

andreground commented 5 months ago

Hi,

First of all, thanks for this fantastic addon, I'm using it to control a bunch of Tuya devices locally and everything works fine except for this Energy Meter.

I'm experiencing something similar to the 397 issue (https://github.com/smarthomej/addons/issues/397) but enabling polling every 10 or 20 seconds does not fix it for me.

The issue is: every time I hit refresh from the Tuya app I can see the consumption value (19) updated both in the app and in Openhab but nothing gets updated if the polling starts from OH.

This is the polling log, I can't see no DP_QUERY message in it:

2024-01-31 09:49:24.111 [DEBUG] [.internal.local.handlers.TuyaEncoder] - 123bogo/192.168.50.196:6668: Sending DP_REFRESH, payload {protocol=5, t=1706690964, data={ctype=0, dpId=[4, 5, 6, 18, 19, 20], cid=123bogo}}
2024-01-31 09:49:24.112 [TRACE] [.internal.local.handlers.TuyaEncoder] - 123bogo/192.168.50.196:6668: Sending encoded '000055AA000000090000001200000094A4AD652E86CBA5CFF957DC038E5A29555C83F742920AA7A3A06C441D9DC1F9D2A10194151479984B58E7F8663EC232FDC53BDDE114C3C81E5DF12C14FE805A7A70DD9AD61F6FA8A6D33B9F143EB08AFC59FF765F9F936962DA531B3F83112672D0C824B35E43F594C859FE7442EACAAE527546551E5F0C74476300728572889FC9DB09E6C9AC5044609E0B3180D221870000AA55'
2024-01-31 09:49:24.195 [TRACE] [.internal.local.handlers.TuyaDecoder] - 123bogo/192.168.50.196:6668: Received encoded '000055AA00000BD00000001200000038000000016A41BF07A12BAEE6449F8D87B11013CEB965FCA9A966E40FC0778B5AB0AF1DD70420EAA9A156629CB7AABEF5BBCCD06F0000AA55'
2024-01-31 09:49:24.196 [TRACE] [.internal.local.handlers.TuyaDecoder] - 123bogo/192.168.50.196:6668: Decoded raw payload: 7175657279206470206661696C6564
2024-01-31 09:49:24.196 [DEBUG] [.internal.local.handlers.TuyaDecoder] - 123bogo/192.168.50.196:6668: Received MessageWrapper{commandType=DP_REFRESH, content='[B@2d6a76f9'}
2024-01-31 09:49:28.977 [DEBUG] [.internal.local.handlers.TuyaDecoder] - udpListener: Received MessageWrapper{commandType=BROADCAST_LPV34, content='DiscoveryMessage{ip='192.168.50.196', deviceId='123bogo', active=2, ability=0, mode=0, encrypt=true, productKey='keyuh3jxk9wu8ruj', version='3.4', token= true, wf_cfg=true}'}

This is instead what I see in the logs when I refresh from the app:

2024-01-30 21:33:57.077 [DEBUG] [.internal.local.handlers.TuyaDecoder] - xyz1234bogo/192.168.50.196:6668: Received MessageWrapper{commandType=STATUS, content='TcpStatusPayload{protocol=4, devId='', gwId='', uid='', t=1706650436, dps=null, data=Data{dps={20=2162.0, 18=11399.0, 19=24185.0}}}'}

Is there anything I could do to help diagnose the problem / fix it?

Thanks in advance!

stale[bot] commented 3 months ago

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.