TheAgentK / tuya-mqtt

Nodejs-Script to combine tuyaapi and openhab via mqtt
MIT License
173 stars 81 forks source link

Switch w/ Energy: DPS values reported only once at tuya-mqtt startup #77

Closed chrissv closed 3 months ago

chrissv commented 2 years ago

I realize this project is in maintenance mode, but I thought I'd ask a question to see if any of the followers would know the answer.

I have a switches which have energy monitoring capability. There are a lot of DPS values associated with the device. One of these switches used to work just fine with tuya-mqtt, configured as a SimpleSwitch and the energy values are reported as DPS values when they changed.

That switch broke, and I replaced it with the same model switch (which I purchased at the same time as the one which failed as part of a multi-pack).

This new switch works fine when changing the on/off power switch - that DPS value is reported by tuya-mqtt (along with the interpreted state) whenever it changes.

However, none of the other DPS values are ever reported, except when tuya-mqtt starts up initially (those reported values are correct by the way). After that initial publish at program start, there are no further DPS updated values except for DPS 1 (the main power state) when it changes.

I can query all of the DPS values with tuya-cli and they are all reported and are correct. But in the tuya-mqtt app, nothing ever comes out after the initial report when tuya-mqtt starts.

The strange thing is that the identical switch (purchased as part of a multi-pack) used to work reliably just fine.

I've done all the usual things, restarting the app and even rebooting the RPi that is running tuya-mqtt. No difference.

Has anyone seen this type of behavoir?

markuslaube commented 2 years ago

is the same problem with https://github.com/TheAgentK/tuya-mqtt/issues/65 i resolved under https://github.com/markuslaube/tuya-mqtt I wait on https://github.com/codetheweb/tuyapi/pull/582 if the pull request merged to tuyapi I send a pull request to tuya-mqtt

Xenomes commented 2 years ago

Nice that someone pick up this project! Kudos!!

markuslaube commented 2 years ago

Nice that someone pick up this project! Kudos!!

I'm not sure, I find the project interesting. I'm a smart home and Linux enthusiast myself. But neither developer nor have JavaScript experience. All I can do is try to read and understand, and then use trial and error to tackle problems. I don't think I would be able to record or even maintain the project. Not to mention that my English is as good as Google and Deepl can deliver ;)