Open svenkopp opened 1 year ago
can you post some photos? you mean total power consumption or real time power?
Its both. But the most importend for me is the real time power.
can you see if homebridge accessory page can show the power related info? are they the same value as tuya app? I have no idea yet :(
I get this in de Homebridge logs. And this is good i think.
It did work for but after the update is stopped working.
I am having the same problem and tried everything mentioned in #274. Everything works like a charm but the sensor data for power consumption (cur_power) doesnt update in Homebridge. I have set the devices (cz, outlet) to DP instruction and the Tuya debugging shows the correct value. Yet, Homebridge doesnt update the power consumption. Any ideas on what I can try to mitigate this? It is mentioned that one should open up a ticket at Tuya but I dont know what to ask them to do actually. Appreciate any help on this. Thanks!
EDIT: There are no errors in the log. API connects (MQ) correctly and all devices are added as intented. It is just the power consumption that doesnt get updated. Its not updating at all after initial adding of devices. So the problem is not that the update doesnt happen regularly. It doesnt happen at all.
I'm having the same issue, but voltage, consumption and current are not updated. Clearing accessory cache fixes it temporarily, but after restarting Homebridge the values no longer are updated.
Tuya IOT cloud confirms the values are being updated:
I can confirm that Tuya IoT platform updates just fine for my devices as well. There seems to be some problem either with this plugin or with the API this plugin uses.
When enabling debug logging in the plugin, this is how the updates show up:
[1/12/2024, 12:23:25 PM] [Tuya] [Escritório Nobreak Mesa] [Outlet/switch_1/Amperes] Update value: 0.864 => 0.852
[1/12/2024, 12:23:25 PM] [Tuya] [Escritório Nobreak Mesa] [Outlet/switch_1/Watts] Update value: 90.2 => 88.4
[1/12/2024, 12:23:25 PM] [Tuya] [Escritório Nobreak Mesa] [Outlet/switch_1/Volts] Update value: 119.8 => 118.1
However, after restarting Homebridge, these updates no longer show up. Removing the cached accessory fixes the issue until Homebridge is restarted.
I've enabled Homebridge debug logs, and it seems like the plugin is getting the data from the cloud, but is not updating the values for some reason.
Here's the logs when it works:
[1/12/2024, 1:23:56 PM] [Tuya] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/new0fc7e8c1a59d9e93a873cdb8ab2c50d1
protocol = 4
message = {
"devId": "REDACTED",
"dataId": "ad2c5989-72f2-48e9-b4e4-f85696507303",
"productKey": "REDACTED",
"status": [
{
"18": 987,
"code": "cur_current",
"t": 1705076636,
"value": 987
},
{
"19": 983,
"code": "cur_power",
"t": 1705076636,
"value": 983
},
{
"20": 1174,
"code": "cur_voltage",
"t": 1705076636,
"value": 1174
}
]
}
t = 1705076636
[1/12/2024, 1:23:56 PM] [Tuya] [Escritório Nobreak Mesa] [Outlet/switch_1/Amperes] Update value: 0.742 => 0.987
[1/12/2024, 1:23:56 PM] [Tuya] [Escritório Nobreak Mesa] [Outlet/switch_1/Watts] Update value: 80.4 => 98.3
[1/12/2024, 1:23:56 PM] [Tuya] [Escritório Nobreak Mesa] [Outlet/switch_1/Volts] Update value: 117.9 => 117.4
And here's the logs when it does not work:
[1/12/2024, 1:32:07 PM] [Tuya] [TuyaOpenMQ] onMessage:
topic = cloud/token/in/new0fc7e8c1a59d9e93a873cdb8ab2c50d1
protocol = 4
message = {
"devId": "REDACTED",
"dataId": "cdac07e7-f084-443d-be82-49f448521cb0",
"productKey": "REDACTED",
"status": [
{
"18": 923,
"code": "cur_current",
"t": 1705077127,
"value": 923
},
{
"19": 954,
"code": "cur_power",
"t": 1705077127,
"value": 954
},
{
"20": 1174,
"code": "cur_voltage",
"t": 1705077127,
"value": 1174
}
]
}
t = 1705077127
As always, clearing the accessory cache makes it work again, until the next restart.
@vfontes Thanks for the information, I guess the issue is located on the way of adding characteristic in EnergyUsage.ts I don't have such device, please help to test if 1.7.0-beta.53 fixed
It didn’t fix it, unfortunately. Same exact situation as before. On 13 Jan 2024, at 06:15, gaosen @.***> wrote: @vfontes Thanks for the information, I guess the issue is located on the way of adding characteristic in EnergyUsage.ts I don't have such device, please help to test if 1.7.0-beta.53 fixed
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@0x5e Thanks for working on this. Much appreciated. I have now tested this and can share the following observations.
All in all, I would say, that it does the job. If possible, it might be convenient if updates would get fetched more consistently (frequency-wise).
@cbornBerlin The update frequency is decided by the device's firmware, homebridge plugin is not able to change this. What I can do is to fix "data not get update everytime when homebridge restarted", but seems not working :(
@0x5e is there anything else I can provide you to help fix this issue?
Can you confirm version is beta.53 and clear cache once after upgrade? I have no idea yet. @vfontes
Sorry, I had upgraded to beta.53 but I hadn't removed the outlet accessories from the cache.
I did just that and it seems like it is updating the values after Homebridge restarts! I'll do some more tests, but the outlook is pretty good.
Prerequisite
Version
1.7.0-beta.33
Device Infomation JSON File
Device Control Mode
Standard Instruction
Logs
No response
Other Infomations
The consumption remains the same while the power plug is switched off, in the tuya app the consumption is zero. And other plugs that give zero while they consume something.