Posts

Showing posts with the label alexa

Caprice ceiling fan voice control - Part 2 of 2

Image
The Mission To enable voice control for the fans and lights of our new Mercator Caprice ceiling fans. So we can say things like: Alexa turn the office fan on/off Alexa start/stop the office fan Alexa turn the office fan to 80% (The same commands can be used for the fan light) The Steps Step 1. Figure out the radio frequency (RF) commands for the fans Step 2. Set up an RF sender on one of my Raspberry PIs Step 3. Develop a script to control the fan Step 4. Configure voice control via Alexa Step 1 and 2 are covered here . Step 3. Develop a script to control the fan I use two scripts, available here . send_rf.py -- Handles sending the command to the RF sender on the Raspberry Pi rf_control.py -- Receives commands in the format rf_control.py <room> <cmd>. For example: python rf_control.py office light These scripts handle converting the room and command into the string of 0's and 1's, which are then broadcast. Step 4. Configure voice

Caprice ceiling fan voice control - Part 1 of 2

Image
The Mission To enable voice control for the fans and lights of our new Mercator Caprice ceiling fans. The Steps Step 1. Figure out the radio frequency (RF) commands for the fans Step 2. Set up an RF sender on one of my Raspberry PIs Step 3. Develop a script to control the fan Step 4. Configure voice control via Alexa Step 1 - Determine the RF commands I purchased a DVB-T 820T2 radio tuner. Like  this one  on ebay. I used my Windows desktop, and installed the USB dongle and the Universal Radio Hacker (URH) software from here . (These would work on my Raspberry Pi3, but required quite a bit of memory and were a bit slow). 1. Determine fan radio frequency I fired up the URH Spectrum Analyzer. I knew the fans were likely be around 433 MHz or 315 MHz. Once running press a button on the remote, I could see a signal spike. Ok so close to 433 Mhz. 2. Analyse and decode the signals This probably took the longest amount of time, but decoding the signal was pretty fun. This time I