BigAssFan Binding: Fans with Firmware 3.x
Fans running firmware 3.x use a different protocol: a persistent TCP connection on port 31415 over which the fan reports every change immediately. The fan-v3 thing type implements this protocol. It is based on the reverse-engineered protocol descriptions in homebridge-bigassfans-2 and aiobafi6. Fans with older (SenseME) firmware use the fan, light and controller thing types described in the overview. See Which Thing Type Do I Need? if you are not sure which firmware a fan runs.
Getting Started
- Find the IP address of the fan, for example in the device list of your router. Haiku fans typically have MAC addresses starting with
20:F8:5E. Give the fan a fixed IP address (a DHCP reservation in your router), because the thing connects to the configured address. - If the fan has been discovered, add it from the inbox. Otherwise add a thing manually: Settings → Things → + → BigAssFan Binding → Big Ass Fan (Firmware 3.x), and enter the IP address.
- The thing goes ONLINE within a few seconds. The fan then reports which features it has, and the thing keeps only the channels for those features.
- Link items to the channels, for example with Add Equipment to Model on the thing's page.
Discovery
Fans announce themselves over mDNS as an _api._tcp service, and are added to the inbox when found. Discovered things are identified by the UUID the fan announces, which is also stored in the uuid thing property, so a fan that was added manually is not discovered a second time.
Some Wi-Fi access points do not forward multicast traffic to wireless clients, in which case fans are not discovered. They can still be added manually.
Thing Configuration
| Parameter | Parameter ID | Required/Optional | Description |
|---|---|---|---|
| Network Address | host | Required | Host name or IP address of the fan. |
| Refresh Interval | refreshInterval | Optional | Seconds between keep-alive queries (default 60, minimum 10). Changes are reported instantly. |
When it connects, the fan reports which features it has. Channels for features the fan does not have (for example the uplight, UV-C light or humidity sensor) are then removed from the thing.
The thing properties show the model, firmware version, MAC address, UUID and the name given to the fan in the Big Ass Fans app.
Channels
| Channel Name | Item Type | Description |
|---|---|---|
| fan-power | Switch | Turn the fan on and off |
| fan-speed | Dimmer | Speed of the fan in percent, mapped onto the 7 speed levels |
| fan-speed-level | Number | Speed of the fan as a level from 0 (off) to 7 |
| fan-direction | String | Direction of the fan: FWD or REV |
| fan-auto | Switch | Fan auto mode. Turning it off turns the fan off. |
| fan-whoosh | Switch | Whoosh mode |
| fan-eco | Switch | Eco mode |
| fan-rpm | Number:Frequency | Rotation speed reported by the fan (read-only, advanced, updated infrequently) |
| light-power | Switch | Turn the light on and off |
| light-level | Dimmer | Brightness of the light |
| light-auto | Switch | Light auto mode. Turning it off turns the light off. |
| light-color-temperature | Number:Temperature | Color temperature of the light |
| light-dim-to-warm | Switch | Make the light warmer as it is dimmed |
| light-target | String | On fans with downlight and uplight: which light the light channels control (ALL, DOWN, UP) |
| light-uvc | Switch | UV-C light |
| motion | Switch | The fan's occupancy sensor has detected motion (read-only) |
| temperature | Number:Temperature | Temperature measured by the fan (read-only) |
| humidity | Number:Dimensionless | Humidity measured by the fan (read-only) |
How the Channels Behave
Setting a speed or brightness above zero switches the fan or light on; setting it to zero switches it off.
The fan has 7 speed levels.
fan-speedmaps percentages onto them: a command is rounded to the nearest level (at least level 1 for anything above zero), and the state always shows the percentage of the current level:Level 1 2 3 4 5 6 7 fan-speed(%)14 29 43 57 71 86 100 To step through the levels from a rule or a slider, use a step of about 14.5 %, or use
fan-speed-leveldirectly.fan-autoandlight-autoswitch the fan or light to the mode the Big Ass Fans app calls Auto. Switching auto mode off switches the fan or light off.fan-directionacceptsFWDandREV. Use a widget that offers both options (for example a list item with the options action), not a toggle.Changes made with the remote, a wall control or the Big Ass Fans app are reported to openHAB immediately.
Migrating From the fan Thing Type
A fan updated to firmware 3.x cannot be controlled through its old fan thing any more. Items keep their names when they are linked to the new thing, so pages and rules that use them continue to work.
- Add a
fan-v3thing for the fan as described in Getting Started. - For every item linked to the old thing, remove the link to the old channel and add a link to the channel with the same name on the new thing (see the table below). Do not link an item to both things.
- Delete or repurpose the items whose channels have no counterpart, and check rules and pages that use them.
- Delete the old
fanthing.
fan channel | fan-v3 channel | Notes |
|---|---|---|
| fan-power | fan-power | |
| fan-speed | fan-speed | Mapped onto the 7 speed levels, see above |
| fan-direction | fan-direction | Now writable: FWD or REV |
| fan-auto | fan-auto | |
| fan-whoosh | fan-whoosh | |
| light-power | light-power | |
| light-level | light-level | |
| light-auto | light-auto | |
| motion | motion | Only on fans with an occupancy sensor |
| fan-smartmode, fan-wintermode, fan-sleep | none | Not available in firmware 3.x |
| fan-speed-min, fan-speed-max | none | Not available in firmware 3.x |
| fan-learn-speed-min, fan-learn-speed-max | none | Not available in firmware 3.x |
| light-smarter, light-level-min, light-level-max | none | Not available in firmware 3.x |
| light-present | none | Fans without a light have no light channels |
| time | none | Not available in firmware 3.x |
New channels worth linking: fan-speed-level, fan-eco, temperature and, depending on the model, humidity, light-color-temperature and light-dim-to-warm.
Full Example
bigassfan.things:
Thing bigassfan:fan-v3:livingroom "Living Room Fan" [ host="192.168.1.50" ]bigassfan.items:
Group gLivingRoomFan "Living Room Fan" ["CeilingFan"]
Switch LivingRoomFanPower "Fan Power" (gLivingRoomFan) ["Switch", "Power"] { channel="bigassfan:fan-v3:livingroom:fan-power" }
Number LivingRoomFanSpeed "Fan Speed [%d]" (gLivingRoomFan) ["Control", "Speed"] { channel="bigassfan:fan-v3:livingroom:fan-speed-level" }
String LivingRoomFanDirection "Direction [%s]" (gLivingRoomFan) ["Control"] { channel="bigassfan:fan-v3:livingroom:fan-direction" }
Switch LivingRoomFanEco "Eco Mode" (gLivingRoomFan) ["Switch"] { channel="bigassfan:fan-v3:livingroom:fan-eco" }
Switch LivingRoomFanLight "Light" (gLivingRoomFan) ["Switch", "Light"] { channel="bigassfan:fan-v3:livingroom:light-power" }
Dimmer LivingRoomFanLightLevel "Light [%d %%]" (gLivingRoomFan) ["Control", "Light"] { channel="bigassfan:fan-v3:livingroom:light-level" }
Number:Temperature LivingRoomFanTemperature "Temperature [%.1f %unit%]" (gLivingRoomFan) ["Measurement", "Temperature"] { channel="bigassfan:fan-v3:livingroom:temperature" }bigassfan.sitemap:
sitemap bigassfan label="Living Room Fan" {
Frame label="Fan" {
Switch item=LivingRoomFanPower
Setpoint item=LivingRoomFanSpeed minValue=0 maxValue=7 step=1
Selection item=LivingRoomFanDirection mappings=[FWD="Forward", REV="Reverse"]
Switch item=LivingRoomFanEco
Text item=LivingRoomFanTemperature
}
Frame label="Light" {
Switch item=LivingRoomFanLight
Slider item=LivingRoomFanLightLevel
}
}bigassfan.rules: switch the fan on at speed 2 when it gets warm.
rule "Living room fan on when warm"
when
Item LivingRoomFanTemperature changed
then
val temperature = (LivingRoomFanTemperature.state as QuantityType<Temperature>).toUnit("°C").doubleValue
if (temperature > 26 && LivingRoomFanPower.state == OFF) {
LivingRoomFanSpeed.sendCommand(2)
}
endTroubleshooting
| Problem | What to check |
|---|---|
| Thing is OFFLINE (communication error) | Is the fan powered and connected to Wi-Fi, and is the configured IP address still correct? The binding reconnects by itself, waiting up to 2 minutes between attempts. |
| Thing is OFFLINE with "No data received from device" | The fan accepted the connection but sent nothing for three refresh intervals, so it probably does not speak the firmware 3.x protocol. Check its firmware version; older fans need the fan thing type. |
| Fan is not discovered | The access point may filter multicast traffic. Add the thing manually. |
| A channel is missing | The fan reported that it does not have this feature, so the channel was removed (for example color temperature on fans without a tunable light). |
| Items do not change after a firmware update | The items are probably still linked to an old fan thing. See Migrating From the fan Thing Type. |
To see what the binding exchanges with the fan, enable debug logging in the openHAB console:
log:set DEBUG org.openhab.binding.bigassfan.internal.v3