Ceiling fan control with a Linknode R4
If you are just here for the code and can do the rest from there, great, here you go:
https://github.com/Rocinante36/Linknode-R4-ceiling-fan-control-w-Alexa
If you need a step by step follow along.
What you need:
LinkNode R4: WiFi relay controller 4-Channel Relay Module ->https://amzn.to/2JNUGM6
USB to TTL Serial Cable -> https://amzn.to/2IVqs8Y
USB to 5.5 mm/2.1 mm 5 Volt DC Barrel Jack Power Cable -> https://amzn.to/2HFvSpj
One-Port USB Wall Charger -> https://amzn.to/2JK6UWk (I have tons of these orphans)
I assume you have the ESP8266 extensions attached to your Arduino program.
here is a pic of the setting I used to upload.

Make sure you setup your port in the device manager to match.

you need to have good power to the barrel plug on the board.
5v works even if the board description says 7v-28v DC
make sure rx -> tx and tx -> rx
my TTL USB cable is white = rx (plug to tx on board) green = tx (plug to rx on board) black = gnd red = power (not used here)
put the board jumper on the two pins closest to the comm pins for flashing.
download the code:
https://github.com/Rocinante36/Linknode-R4-ceiling-fan-control-w-Alexa
edit the code in your Arduino editor to set your ssid and password.
after you upload the code set the jumper to the two pins closest to the power plug.
cycle the power.
wait about a minute for the boot.
make your Alexa run discovery.
test your relays.
it also works on the Alexa phone app.
next to come:
wiring to a ceiling fan.
remote reset button (I hear these things glitch and my ceiling fans are not on a switch.)
extend the antenna out from the LinkNode board.
rename the devices in the code so I can run 3 independent ceiling fans.



Comments