lprhodes / homebridge-broadlink-rm

Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
574 stars 284 forks source link

Possible correction to homebridge-broadlink-rm/accessories/fan.js #655

Open Corpsman09355 opened 4 years ago

Corpsman09355 commented 4 years ago

Newb here. I had a problem with the fan accessory doing some strange ux in iOS of a temperature setting and heating and cooling/auto as if the fan were a thermostat and rendered my fan non-functional as I had it configured in json. I poked around the internet and apple's documentation on fan vs fanv2 and it led me to examine the fan.js file....I noticed that on line 4 it is shown as:

    serviceType () { return Service.Thermostat }

I dove into my raspi's folder: /usr/lib/node_modules/homebridge-broadlink-rm/accessories/Fan.js

and nano'd the service from "Thermostat" to "Fanv2"

    serviceType () { return Service.Fanv2 }

and restarted homebridge. In iOS this brought back the old speed slider and the oscillation icon that I was used to previously before I upgraded and had found this problem and my fan became functional again. I don't know if any one else was having this issue, if I'm grasping the problem correctly, or if there was some way of configuring my fan as a thermostat that would have taken advantage of a temperature reading somehow to use with automations...but I thought I would post this in case it was an error or might help someone else. I really appreciate the work that went into these plug ins. I can kinda decipher and troubleshoot some things like this, but I'm nowhere near being able to build these myself, thanks for all you do!

josemunozmatos commented 4 years ago

Wow!! Im so happy to read this, I was having the same issue with no idea how to fix it haha I will try thiis :)

Starbub commented 4 years ago

I've tried this out but got the following error :\

"UnhandledPromiseRejectionWarning: Error: homebridge-broadlink-rm doesn't support accessories of type "fanv2"."

Corpsman09355 commented 4 years ago

Im wondering if the capitalization of Fanv2 vs fanv2 is an issue? If thats not it, I believe that “Fan” is still a valid term. Try those and let me know...If neither works, I would try copy and paste from my above into the file and see if that might do it. I hope that helps!

axelra82 commented 4 years ago

THANK YOU! 👌💯 This should be corrected ASAP in public release. Would also be great if the fans from Broadlink acted like other fans in HomeKit (like a simple one I have with a good old "dumb thing = smart plug", from EVE), where I can choose the "correct" icon for it (e.g. floor, desk or ceiling) 🤓

gabriuelucho commented 4 years ago

Thank you! I've been struggling with that for a long!