kiwi-cam / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
304 stars 95 forks source link

Fan Speed / Steps #620

Closed krozgrov closed 1 year ago

krozgrov commented 1 year ago

Describe the bug Trying to setup a fan that has 3 speeds on the remote 1,2,3 and off. I am trying to get the HomeKit to have three steps at each speed 33%, 66%, 100% instead of it having a number slider. But for the life of me I cannot figure out how the syntax should work for the different options in the config. Here is what I have today. Any ideas I assume I am missing something simple.

"accessories": [
    {
        "name": "Hunter Fan",
        "type": "fan",
        "hideSwingMode": true,
        "hideRotationDirection": true,
        "alwaysResetToDefaults": true,
        "defaultFanSpeed": 33,
        "defaultSpeedStep": 33,
        "speedSteps": 33,
        "data": {
            "off": "b1c07c02ba9e06000c0d0d0c0d0e0c0d0c0e0c0d0c0e0c0e0c0d0c0d0e0d0ca61a0d0c1a0c1b0c1a0c1a1a0d0c1a190e190d190d0c1b0c1a190d0d1b0b1a190f180e180d1a0e180d190e190d190e190e0b1b180e190e180e180f180e0c1a0c1b180e180f180e180e0c1b0c1a0c1a190e0c1a0c1b0c1a0c1a0c1b0c1a0c1b0c1a0c1a0c1b0c1a0c1a1a0d190d190e190d190d1a0d190d190e190d190d1a0d190e0b1b0c0003360c0d0c0d0d0e0c0d0c0d0d0d0c0e0c0e0c0d0c0d0c0f0ca61a0d0c1a0c1b0d190c1a1a0d0c1a190d1a0d190d0c1b0c1a190d0d1a0c1a190e190d190d1a0d190d190d1a0e180d190f0b1b180e190e180e180f180e0b1b0c1b180d190e190e180e0b1c0b1b0b1b190e0c1a0c1b0c1a0c1a0c1b0c1a0c1a0d1a0c1a0c1b0c1a0c1a190e180e180f180e180e1a0d190d190d1a0d1b0b180f190d0c1a0d00036f0c0e0c0d0d0d0c0d0c0e0d0d0c0d0c0e0c0e0c0d0c0e0ca7190d0c1b0c1a0c1a0d1a190d0c1b190d190d1a0d0c1a0c1b190d0c1a0c1b190d190d1a0d190d190e190d190d1a0e180e0b1c180e180e190e180e180e0d1a0c1a180f180e180e190e0c1a0b1c0b1b180e0c1b0c1a0c1a0d1a0c1a0c1b0c1a180e0d1a0c1a0c1b180e0c1a190e190d190d1a0d190d190e0c1a190d1a0d190d0c1b190d0c0003360c0e0c0d0d0d0c0d0c0e0d0d0c0d0c0d0d0e0c0d0c0e0ca7190d0c1b0c1a0c1a0d1a190d0c1b190d190d190e0c1a0c1a190e0c1a0c1b180e190d1a0d190d190f180d190e190e180e0b1a1a0e180e190d190e180e0c1b0b1b180f180d190e190e0b1b0b1b0d1a190d0c1b0c1a0c1a0c1b0b1b0b1c0c1a180e0c1b0c1a0c1a190e0c1a190e180e180e190e180e180f0c1a180e190e180e0c1a190e0c0005dc00000000000000000000",
            "on": "b1c04001ba9e06000c0d0c0d0d0d0d0d0c0d0c0d0e0d0c0d0c0d0d0d0d0d0da7190d0c190d1b0c1a0c1a190e0c1a190e190d180e0d1a0c1a190e0c1a0c1a1a0d190d190e180e190d1a0d190d190e190d0c1a1a0d190d190d1a0d190d0c1b0c1a190d1a0d190d190e0c1a0c1a0c1b190d0c1b0c1b0b1a0c1b0c1a0c1a0d1a0c1a0c1b0c1a0c1a1a0e0b1a190e190e180d1a0d190d190f180e180e190e180e0c1a190e0b0003360c0e0d0d0c0d0c0d0d0e0c0d0c0d0c0d0e0d0c0d0c0e0ca7190d0c1b0c1a0c1b0c1a190d0c1b190d190d1a0d0c1a0c1b190d0c1a0d1a190d190e190d190e190e180e180f180e180e0b1c180e180d1a0d190d1a0e0c1a0c1a190e180e180f180e0c1a0d1a0c1a180f0c1a0c1a0c1b0c1a0c1a0d1a0c1a0c1b0c1a0c1a0d1a180e0c1b190d180e1a0d190d190e190d190d1a0d190d190e0c1a190d0c0005dc000000000000",
            "fanSpeed33": "b1c04001ba9e06000c0d0c0d0d0d0d0d0c0d0c0d0e0d0c0d0c0d0d0d0d0d0da7190d0c190d1b0c1a0c1a190e0c1a190e190d180e0d1a0c1a190e0c1a0c1a1a0d190d190e180e190d1a0d190d190e190d0c1a1a0d190d190d1a0d190d0c1b0c1a190d1a0d190d190e0c1a0c1a0c1b190d0c1b0c1b0b1a0c1b0c1a0c1a0d1a0c1a0c1b0c1a0c1a1a0e0b1a190e190e180d1a0d190d190f180e180e190e180e0c1a190e0b0003360c0e0d0d0c0d0c0d0d0e0c0d0c0d0c0d0e0d0c0d0c0e0ca7190d0c1b0c1a0c1b0c1a190d0c1b190d190d1a0d0c1a0c1b190d0c1a0d1a190d190e190d190e190e180e180f180e180e0b1c180e180d1a0d190d1a0e0c1a0c1a190e180e180f180e0c1a0d1a0c1a180f0c1a0c1a0c1b0c1a0c1a0d1a0c1a0c1b0c1a0c1a0d1a180e0c1b190d180e1a0d190d190e190d190d1a0d190d190e0c1a190d0c0005dc000000000000",
            "fanSpeed66": "b1c0b004ba9e06000b1b0b1b190e180e180f180e180e16110b1b161012151412180f180e0b0003360c0e0c0d0d0d0c0d0c0f0c0d0c0d0d0d0c0e0c0d0c0e0ca7190d0c1b0c1a0c1a0c1b190d0c1a1a0d190d190e0c1b0b1b190d0c1a0c1a1a0d190d1a0d190e180e190e180e180f180e0b1b190e170f180e190e180e0b1d0604041b180e190e180e180e0d1a0b1b0c1b180e0b1c0a1c0c1a0c1b0c1a0c1a0c1b180f0b1a0d1a0c1a0c1b0c1a180f180f170f170f190e180e0b1c180e180e190d190e180e0c0003360c0d0c0d0d0d0d0d0c0d0d0d0c0d0d0d0d0d0c0d0c0e0da61a0d0c1a0c1a0d1a0c1a190e0c1a190d1a0d190d0c1a0d1a190d0c1b0c1a190d1a0d190d190d1a0d190d190e190d190d0d1a190d190f180e180e190e0c1a0c1a190e180e180f180e0c1a0b1c0b1b180e0d1a0c1a0c1b0c1a0c1a0c1b0c1a180e0d1a0c1a0c1b0c1a0c1a1a0d190d190e190d190d1a0d0c1a190d1a0d190d190e190d0c0003350d0d0d0d0c0d0d0d0c0d0e0d0c0d0c0d0c0e0d0d0c0d0da7190d0c1a0d1a0c1a0c1b190d0c1a1a0d190d190e0c1a0c1a1a0d0c1a0c1a1a0d190d190e190d190d1a0d190d190d1a0d0c1a190e190d190e190e180e0b1c0b1b180e190e180e180e0c1b0b1b0b1c180e0b1b0c1b0b1b0b1b0d1a0c1a0c1b180e0c1a0c1b0c1a0c1a0d1a180e180f180e180e190e180e0c1b180e180e190e180e180e0d0003350d0d0c0d0c0d0e0d0c0d0c0d0d0d0d0d0c0d0d0d0c0d0da6190e0d1a0c1a0c1b0c1a190d0d1a190d180f190d0c1a0c1b190d0c1b0c1a190d1a0d190d190d1a0d190d190e190d190d0c1b190d190d1a0d190d190e0c1a0c1a1a0d190d190d1a0d0c1a0c1b0c1b180d0d1a0c1a0c1b0c1b0b1a0c1b0c1a190e0c1b0b1a0c1c0b1b0b1b190e180e180e190e180e180f0b1b180e190e180e180e190e0c0003350d0c0d0e0c0d0c0d0d0d0d0d0c0e0c0d0c0d0e0d0c0d0ca7190d0d190e190d190d1a190d0d1a190e180e180e0d190d19190f0c1a0c1a190e180e180f190d190d1a0d180e190d190e0c1a180f180e190d1a0d190d0c1a0d1a190d190e190d190d0c1b0c1a0c1a1a0d0c1a0c1b0c1a0c1a0c1b0c1a0c1b190d0c1a0c1b0c1a0c1a0d1a190e180f180e180e190e180e0b1b190e180e180f180e180e0b0003370c0d0d0d0c0d0c0e0d0d0c0d0c0d0d0e0c0d0c0d0d0d0ca7190e0d190c1a0c1b0c1a190d0d1a190d190e190d0d190d1a190d0c1b0d1a180e180f180e180e190e180e180e190e180e0c1b180e180e190e180e180f0c1a0c1a190e180e180e190e0c1a0c1b0c1a180e0c1b0c1a0c1a0d1a0c1a0c1b0c1a190d0c1b0c1a0c1b0c1a0c1a1a0d190d190d1a0d190d190e0c1a190d1a0d190e180e190e0b0003360c0d0c0e0d0d0c0d0c0d0d0e0c0d0c0e0c0d0c0e0c0d0da7190d0c1a0c1b0c1a0c1b190d0c1a1a0d190d190d0d1a0c1a190e0c1a0c1a1a0d190d190d1a0d190d190e190d190d1a0e0b1b180e190e180e180f180e0b1b0b1c180e180f180e180e0c1b0b1b0b1b190e0c1a0c1b0b1b0c1a0c1b0b1b0c1a190e0c1a0c1b0c1a0c1a0c1b180e180e190e180e180f180e0c1a190e180f170f180f170e0c0003360d0d0c0d0c0d0d0e0c0d0d0c0d0d0c0e0c0e0c0d0c0d0da7190d0d1a0c1a0c1b0c1a190d0c1b190d190d1a0d0c1a0c1b190d0c1a0d1a190d000000000000",
            "fanSpeed100": "b1c0b004ba9e06000d0d0c0e0d0c0d0d0c0d0d0d0d0d0c0d0d0c0d0e0ca61b0c0d1a0c190e1a0c1a190d0d191a0c1a0d190e0c190e19190d0d1b0c1a180e190e190d190e190d180e190e180e180e0d1a180e180f190d180e1a0d0c1a0c1a1a0d190d190e190d0c1a0c1b0c1a190e0c1a0c1a0c1b0c1a0c1a0d1a190d0c1b0c1a0c1a0c1b0c1a0c1a1a0d190d190e190e180d0c1b190d190d1a0d190d190e190e0b0003360c0d0e0c0d0d0c0d0d0c0e0d0c0d0d0c0d0e0c0d0d0c0da7190d0c1b0c1a0c1a0c1b190d0c1a1a0d190d190e0c1a0c1a1a0d0c1a0c1a1a0d190d190e190d190d1a0d190e180f180e0b1a1a0e180d190d1a0e180e0b1c0c1a180e190e180e180e0c1b0c1a0b1c180e0c1a0c1b0c1a0c1a0d1a0c1a180f0c1a0c1a0c1b0c1a0c1b0c1a180e190e180e190d1a0d0c1a190e190d190d1a0d180e190d0d0003350d0d0c0d0c0d0e0d0c0d0c0d0d0d0d0d0d0c0d0d0c0d0da7190e0c1a0c1a0d1a0c1a190d0d191a0c1b0c1a0d0c1a0d1a190d0c1b0c1a190d1a0d190d190d1a0d190d190e190d190d0c1b190d190e190d190d190e0c1a0c1a1a0d190d190e190d0c1a0c1b0c1a190d0d1a0c1a0c1b0c1a0c1a0c1b190d0c1a0d1a0c1a0c1b0c1b0b1b190e180e180f180e180e0c1a190e180e190e180e180f180e0b0003360c0d0e0c0d0d0c0d0d0c0e0d0d0c0d0d0c0d0d0d0d0d0ca7190d0d190e190d190d1a190d0d191a0d190d190e0d190d191a0d0d1a0c1a190d190e180f180e180e190e180e180e190e0c1a180f180e180e190e180e0c1a0d1a180e180f180e180e0c1b0c1a0c1b190d0c1a0c1b0c1a0c1a0d1a0c1a190e0c1a0c1a0c1b0c1a0c1a0d1a190d190e190d190d1a0d0c1a190d1a0d190d190e190d190e0c0003350d0d0c0d0d0c0e0d0d0c0d0d0c0d0d0d0d0d0c0d0c0d0ea6190e0c1a0c1a0c1b0c1a190d0d1a190d190e190d0c1a0c1b190d0c1a0d1a190d190e190d190d1a0d190d190e190d190d0c1b190d190d1a0d190e180f0b1a0c1a1a0d190d190d1a0d0c1b0b1c0b1a190d0c1b0c1a0c1b0c1a0d190d1b180d0d1a0d1a0c1a0b1c0b1b0b1b190e180e180e190e180e0c1b180e180e1a0d180e180e190e0c0003350d0c0d0e0c0d0d0c0d0d0c0e0d0c0d0d0c0d0d0d0d0d0ca7190d0d190e190d190d1a190d0d191a0d190d190d0e190d191a0d0d1a0c1a190e190d180e1a0d180e180f180e180e190e0c1a180f190d190d190e180e0c1a0d1a180e180f180e180e0c1b0c1a0c1a1a0d0c1a0c1b0c1a0c1a0c1b0c1a190d0d1a0c1a0c1b0c1a0c1a0d1a190d190e190d190d1a0d0c1a190d1a0d190d190e190e180d0c0003370c0d0d0c0d0d0c0e0d0c0d0d0c0d0d0d0d0d0c0d0d0d0ca7190d0d1a0c1a0c1b0c1a190d0d1a190d190e190d0c1a0d1a190d0c1a0e19190d190e190d190d1a0d190d190d1a0e180e0c1a190d190e190e180e180e0c1b0b1b190e180e180e190e0c1a0c1b0c1a180e0c1b0c1a0c1a0d1a0c1a0c1b180e0c1a0c1b0c1a0c1a0d1a0c1a190e190d190d1a0e180d0c1b190d190d1a0d190d190d1a0d0c0003360c0d0c0e0d0c0d0d0c0d0d0d0d0d0c0d0d0d0c0e0d0c0da71a0c0c1a0c1b0c1a0c1a1a0d0c1a190e190d190d0d1a0c1a190e0c1a0c1a1a0d190d190d1a0d190d190e190d190d1a0e0b1a190d1a0d190d190f180e0b1a0c1b190e180e000000000000"
        }
    }
],
krozgrov commented 1 year ago

Think I have this figured out - speedSteps = the number of steps individual fan steps you want. In this case I updated to 3 and now I have 3 steps 33 > 66 > 99 which represents the 3 speeds of the fan.

JasonGoldenDDT commented 10 months ago

New here, researching fan controls, I have a dyson AM09 and a TROTRONICS tower fan. I came across this thread and I have similar challenges with fan speed implementation.

I did find a solution to my TROTRONICS tower fan, which behaves similar to your situation described above.

    {
        "name": "Fan Name",
        "type": "fan",
        "**alwaysResetToDefaults**": false,
        "**defaultSpeedStep**": 1,
        "persistState": true,
        "**speedCycle**": true,
        "**speedSteps**": 3,
        "**allowResend**": true,
        "hideRotationDirection": true,
        "data": {
            "on": "2600500000012f97131311141213121312381138121312141138123712381138111412131237123712131214123712371213121312141138123712371213121312381237123712131200051400012a4a12000d05000000000000",
            "off": "260050000001259413121213121411141237123712131214113812371237123712141114123712371213121411381237121312131214123712371237121411141138123712371213120005160001284a12000d05000000000000",
            "swingToggle": "2600500000012594121312141213121312371238121313121238113812371336121412131237123811141213123712381237121312141138133612371313111412131238113812131300051400012a4a13000d05000000000000",
            "**fanSpeed**": "260058000001249413121213121312141138123712131213123712371237123712131214113811381213121312131237121411141213123712381237123712141138123712371213120005140001294a12000c3f0001294a12000d050000000000000000000000000000"
        }

This works near perfectly with HomeKit. But I noticed this approach was not described in the git's documentation, specifically using "fan speed" as a variable for hex code. I found it by reviewing the fan.js file.

This approach works for the tower fan, but it doesn't work for my dyson fan (AM09 Cool+Hot). I'm only interested in controlling the cooling aspects of this fan.

I've reviewed the program files for this git and found it does not currently support remotes that have a "speed up" and "slow down" button configuration.

Seems odd, I think I come across this type of control more often than discreet speed commands.

I found others have similar challenges with this git. I'm wondering if the owner has changed their plans to implement support for this type of common fan control OR has anyone found a reliable fork that does?

Many thanks, I have a few of these dyson am09 fans I plan to automate once I get this solved. The other approach found sends multiple commands repeatedly to "reset" the fan, kinda work... but not great.