owenb321 / hampton-bay-fan-mqtt

MQTT / RF Bridge for Hampton Bay Fan control
69 stars 18 forks source link

a Question #6

Closed canadank0 closed 4 months ago

canadank0 commented 4 months ago

I have a question. I followed your instructions and bought an ESP8266 module and a CC1101 module E07-M11010, which operates at a 433MHz frequency. I installed all the drivers and changed the network settings (which seem to work because I see the MQTT login in Home Assistant). I set the frequency for my Hampton Bay to 303.947MHz and configured the fan ID to 0101 in the HA config. However, when I try to turn on the light, nothing happens. I set up an MQTT listener for my light with the topic: home/hamptonbay/0101/light/set, and Home Assistant is responding correctly. Could the issue be with my CC1101 module?

patrickdk77 commented 4 months ago

I am not sure, this isn't very much info go to off of. What model remote is used to control your fan? hamptonbay has become a reseller of chinese made fans, and it seems every model could have a new random protocol to control them, so we need to make sure there is a compatible protocol configured, or add one if there is not. Then the Freq part, that you seem to have configured, make sure you configured the TX freq, the RX isn't as needed, but good if you also like to use a remote to control it also, so it can know what is going on.

Likely best best debugging can be done by watching the serial console on the esp8266 and see what it says when you push a button on the fans origional remote. If that looks good, then move to seeing what changing in mqtt using mqtt explorer. That should cover all debugging points.

canadank0 commented 4 months ago

my console send this message when i click on light on: Message arrived [home/hamptonbay/0101/light/set] ON Message arrived [home/hamptonbay/0101/on/state] OFF

my remote control is old Hampton bay UC7078T - I want to use only alexa to control it. also with new HA versions i am getting this message for fan speeds: extra keys not allowed @ data['speed_state_topic'].

patrickdk77 commented 4 months ago

From looking at this, in my branch of this project, I created a new controller to handle that remote, called hamptonbay3 This code only supports the hamptonbay1 as I called it.

patrickdk77 commented 4 months ago

Also, HA changed how fan speeds work 2 years ago, and this project is too old to support the new method.

canadank0 commented 4 months ago

Oh, okay, I found the new repository, but to be honest, I'm a bit lost. I don't know how to flash this to my ESP8266. I see you're setting up different kinds of controllers and doorbells. I don't want to bother you, but I would appreciate some help. I just need the section for light on/off and the three fan speeds. Could you provide some direction? Thank you.

patrickdk77 commented 4 months ago

You flash it the same way you would have for this project. You just need to edit the config.h to enable the parts you want, and comment out with // the parts you do not want.

You will configure HA like the first example given, but use hamptonbay3 instead, unless you also edit the name in the config.h that is used there.

The doorbell stuff can be ignored, and commented out. I placed my fan controller inside my doorbell, as it gave it good coverage over the house, and also doubled up to detect the doorbell.

canadank0 commented 4 months ago

Thanks Patrick, I must sound clueless, but after commenting out the unnecessary parts, the code compiled and uploaded successfully. The WiFi connection established with the message: WiFi connected IP address: 192.168.1.212 Attempting MQTT connection...connected Message arrived [stat/hamptonbay3/heapsize] 45568 in Mqtt explorer i see tele/hamptonbay3 LWT=online my home assistant code is: fan:

light:

In Home Assistant under devices/entities, I can only see the light. When I click ON/OFF, nothing happens, and there is no activity in MQTT Explorer either. i don't know what i am doing wrong ;-(