AMoo-Miki / homebridge-tuya-lan

Homebridge plugin for IoT devices that use Tuya Smart's platform
MIT License
204 stars 52 forks source link

Convector with problems (or adding a new device) #39

Closed fparrav closed 4 years ago

fparrav commented 5 years ago

I have problems with a convector Betterlife brand, when configured as a convector, it works without problems when changing the temperature, but something happens with the ignition button that does not respond. When changing the temperature (previously turned on in the convector app [Smartlife or Tuyasmart] after a few seconds it turns off, even leaving the fan speed to the maximum.) I do not notice that the fan speed modifies parameters of LOW or High.

The link of the convector panel

Image of the app: IMG_2317

Signature Ready to handle Calefactor Dormitorio with signature {"1":false,"2":19,"3":16,"4":"low","12":0}

AMoo-Miki commented 5 years ago

@fparrav, can you please post your config too.

Also, I see that your signature is missing dp of "7" and has a few extra ones, "1" and "12". This must be why things are not working the way they should. I have a feeling "1" does what "7" does so let's try something:

Lemme know how things go.

fparrav commented 5 years ago

Thank you very much for the response, it is already working almost perfect.

Now it turns on and off, sets the temperature, but the fan speed setting does not seem to affect, it does not change to "High" mode. It would also be possible to select the option "AF" (Anti freeze) ?. I attach my current configuration:


{
            "platform": "TuyaLan",

            "devices": [
            {   "dpActive": 1,
                "name": "Calefactor Dormitorio",
                "type": "Convector",
                "manufacturer": "Betterlife",
                "model": "CG-10LED",
                "id": "05200674dc4f222ac1c1",
                "key": "4bac481723a6c641",
                "cmdLow": "Low",
                "cmdHigh": "High",
                "minTemperature": 5,
                "maxTemperature": 50,
                "noChildLock": true

            }
        ]
        }

Again, thank you very much for the excellent plugin and time to adapt it to my device.

AMoo-Miki commented 5 years ago

@fparrav, looking at the log you posted in your first message, the device expects "low" in all lower case; it most probably wants "high" in lower case too. Change cmdLow to "low" and cmdHigh to "high" and see if that gets the fan to work.

regarding the AF mode, can you tell me a bit more? what is it and what it does? knowing that I can look up HomeKit specs to see if it can be mapped to anything in particular.

fparrav commented 5 years ago

@AMoo-Miki Thanks for the reply, the plugin has worked perfectly all this time, and now I did what you told me and change cmdLow to "low" and cmdHigh to "high" and it works! there is only a small detail that, being a slider, my convector sounds while I slide my finger confirming each position (it does not sound slowly) at the moment I created an ambientation with the setting low and another high and sent the instruction in a single command.

Regarding the AF mode, it corresponds to "antifreeze" when activating the temperature controls are deactivated and enters an automatic mode of operation if the temperature is below 5 degrees Celcius to prevent freezing.

But the most important thing is that it is working at 99% and that's great, thanks!

AMoo-Miki commented 5 years ago

Thanks for clarifying and I am glad things are working.

Sadly I can't find anything in HomeKit that matches AF. I will remember to look out for anything new that we might be able to use.

Regarding the sound, since I don't have this device, I am not sure what you were referring to. Does it make the sound when you change the temperature or the fan speed? If yes, that is super simple for me to handle; let me know :)

AMoo-Miki commented 5 years ago

I just pushed some changes that should eliminate the repeated setting. See if that helps the sound. Update your plugin to the latest version with npm i -g AMoo-Miki/homebridge-tuya-lan.

Good luck (to us both)

fparrav commented 5 years ago

sorry for my poor English, regarding the sound is a confirmation beep that sounds every time I send a command or slide a control, unfortunately in my convector it sounds very strong, but with the scenes or settings I send the whole configuration in a single “beep "

AMoo-Miki commented 5 years ago

@fparrav you English is fine :) Were you able to update the plugin and check if it is better?

Try npm i -g homebridge-tuya-lan@rc to get the latest rc release or npm i -g homebridge-tuya-lan for the latest stable release.

fparrav commented 5 years ago

Sorry for the delay, holiday season in my country. I did the tests and noticed that the stable version responds much better, in the rc repeated commands are sent as I see in the log ... for example when switching on the command is sent 3 times (with their respective 3 response beeps)

AMoo-Miki commented 5 years ago

That is odd. I will check to see what causes it to send 3 commands.

fparrav commented 5 years ago

The 3 commands occur sometimes (maybe it's api problems). Sometimes it also happens that if you turn off the convector while it is in a "low" state, when you turn on it sends the power command and sends the "high" command. But not always happening I have no evidence of under what conditions it occurs.

Edit : Here is an example of what happens sometimes when turning on the heater

2|homebrid | [TuyaAccessory] Sending Calefactor Dormitorio {"1":true}
2|homebrid | [TuyaAccessory] Sending Calefactor Dormitorio {"1":true,"4":"high"}
AMoo-Miki commented 4 years ago

This must be the Home app's logic and I don't believe I can override it. Lemme know if I can help in any other way.