R0yk3 wrote:cyberclwn wrote:Hey,
Since last weekend i control my (semi-cheap) Westinghouse ceilingfan with Domoticz.
For this i use the optional InfraRed remote from Westinghouse and an InfraRed LED connected to my Raspberry Pi.
It requires some hassle, but i found it not that hard.
You got my attention! Can you make a tutorial for this, or give me some direction.
I'll try to make one but i'm kinda busy at the moment, so it might take some time.
In short:
Used (extra)hardware:
- KY-005 InfraRed LED
- KY-022 InfraRed Receiver (to learn/record IR-codes)
Connect both to your Raspberry PI and install "lirc" (required software) using another tutorial, see google for that. (I don't remember which one i used, i'll try later to find it)
Record you IR-codes with the receiver and the original remote, using other tutorial/google (command "irrecord")
You see the LED on the KY-022 blink red when it is receving, meaning it works.
Create a lircd.conf from the recorded codes, for the sender.
Try sending the ir-code with irsend (again, enough tutorials for that).
If that works, create a dummy device and put in the on-action a script that contains the irsend command to turn on, and an off script for off.
(remember script:// needs probable 3x / script:// /home/pi/domoticz....)
I created a multi-state device, since my fan has 3 speeds (and off). So the off/level0 send the off ir-command, level 10 = speed 1 ... and so on.
ps. i'll try add link for tutorials later, but google was helpfull to me.