iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
395 stars 165 forks source link

Unable to use the regulator in gang switch (Retrofit) #311

Open akshay66666 opened 3 years ago

akshay66666 commented 3 years ago

I have setup this on smartlife app then on homebridge, configured it as "CustomMultiOutlet".

Using the correct DP's i am able to turn on and off all the switches but the regulator/dimmer doesn't seem to work as i dont see an option of adding something like "dpRotationSpeed" for individual outlet.

-------------------------------------LOG------------------------------------------------- Ready to handle SwitchBoard (CustomMultiOutlet:3.3) with signature {"1":false,"2":true,"3":false,"9":0,"10":0,"11":0,"101":false,"102":"level_4","103":0}

DP : 1,2,3 are switches connected to lights and a socket... 101 is fan switch and 102 is an enum supporting 1 to 4 (Regulator speeds).

Please help with getting the 4 speed regulator to get to work as its really important for me to have it in the home app. Thank you.

ElphaX commented 3 years ago

No worries @akshay66666, definitely can be done. Can you please comment and confirm the string values of all 4 values for the fan, I can see 4 is "level_4", do they all follow the same convention?

akshay66666 commented 3 years ago

Thanks a lot @ElphaX for your response. Coming to the question, yes its "level_1", "level_2", "level_3" and "level_4" for the 4 step regulator.

akshay66666 commented 3 years ago

@ElphaX @iRayanKhan Hey, Any further update on this one? Sorry for being impatient as I cant wait to get this working.

ElphaX commented 2 years ago

It comes down to the plugin sending the level values to the device itself and I don't believe Rayan and I have a similar device to test. Are you familiar with JS at all?

akshay66666 commented 2 years ago

Not really familiar with JS. May be you can send in your changes and I can verify it here on my device?

sanskardhanda commented 2 years ago

Did you manage to add and control fan? I have similar product (Homemate) and can't figure out way to add.

akshay66666 commented 2 years ago

@sanskardhanda : I haven't got it working yet. Still waiting for the support.

@ElphaX @iRayanKhan Can you check and update me on this please ?

akshay66666 commented 1 year ago

@ElphaX @iRayanKhan Is there any way this can be done? May be you can share the code edits required for this which i can do locally on my rasberry pi. Thank You.

soxrok2212 commented 1 month ago

My Hunter fan uses level_x to set the fan speed.

{
        "code": "fan_speed_enum",
        "custom_name": "",
        "dp_id": 3,
        "time": 1722972465651,
        "type": "enum",
        "value": "level_4"
      },

Values range from level_1 through level_4... hence the rotation speed as an integer is never used.

{
        "code": "fan_speed",
        "custom_name": "",
        "dp_id": 4,
        "time": 1668643271399,
        "type": "value",
        "value": 0
      },

The value for fan_speed is always 0.