Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/htruong/ceiling-fans-control
Quick-and-Dirty 304Mhz Ceiling Fan control with bare Raspberry Pi (rpitx) via HomeAssistant MQTT
https://github.com/htruong/ceiling-fans-control
homeassistant rf rpi
Last synced: 2 months ago
JSON representation
Quick-and-Dirty 304Mhz Ceiling Fan control with bare Raspberry Pi (rpitx) via HomeAssistant MQTT
- Host: GitHub
- URL: https://github.com/htruong/ceiling-fans-control
- Owner: htruong
- Created: 2024-07-24T16:10:17.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-07-25T05:32:42.000Z (5 months ago)
- Last Synced: 2024-09-30T19:04:16.993Z (3 months ago)
- Topics: homeassistant, rf, rpi
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a python daemon that exposes fan and light controls for the Casa Vieja fans to Home Assistant. The remote is called `Ceiling fan remote controller`, model is `TR301A`. The remote has a big SET button, but no DIP switches that can be configured for different fans.
Decoding the remote control signal and remote ids
--I had to use a RTL-SDR dongle to find out the serial number for the remotes. Please follow [this wonderful tutorial](https://www.youtube.com/watch?v=_GCpqory3kc) to understand how to capture and decode the ceiling fan signal.
Sending the remote control signal
--You can use a vanilla raspberry pi of any kind to transmit control signals (I used a Pi 0), using [rpitx](https://github.com/F5OEO/rpitx), at least in a hacky way, [without additional or customized hardware](https://www.youtube.com/watch?v=3lGU7PjJM7k).
Note that this only serves as a remote control, as we don't know what the fans are actually doing: we just send commands blindly and hope it works, just like the remotes.
How to use this repository
--Install prereqs:
```
sudo apt install python3-paho-mqtt python3-yaml
```Enter your remote ids into the config file, rename it to `config.yaml`, you should be ready to go. The easiest is to run the `onlyfansd` directly with python3:
```
python3 onlyfansd.py
```Just add the MQTT integration to HomeAssistant, you'll see each of the fans you configured appearing as a fan entity and a light entity.
If you can't control To debug, you should compare the signal that this daemon sends out and the actual signal that the remote sends out to understand what went wrong. Or you could spend some more minutes to figure out how the SET button works, and then add a program button to the integration. I can't be bothered to figure out how the SET button works, to send arbitrary ID we choose to the fans, but [I assume that's possible](https://www.amazon.com/review/R2VWOTH0LUT4XJ/).