Cool! Good to hear you are still working on it. I had a stab at making one of these a while ago but it didn’t appear to communicate with my fan unit, I couldn’t do much to find out why.
I was thinking about giving it another go, and wondering if it would be possible to also do some troubleshooting if I run in to the same problem again. E.G. once I have the esp and the cc1101 wired up and the firmware installed, can I also try to read the signals from the ITHO factory remote with the CC1101? Or do I need to flash some other program for that?
I’m able to read signals from the remote, but never figured out determining exactly how/which remote was which though looking at it recently it clearly shows repetitive mac-alike addresses. There is the issue that if you ‘miss’ the signal, you’d interpret the fan being in another state, though the solution route Setting remote ID's · Issue #8 · CoMPaTech/esphome_ct · GitHub took would be a very valid option.
So back to your question, they way I’ve still got it wired up (ESP8266) it shows the below (so 6a-9a-aa....
is one of the remotes (and indeed, there is no debouncer in there, but timer does work as it’s fortunately a command being send and not just the button press)
[06:58:35][D][c1101_fan:233]: Debug - RemoteID1:
[06:58:35][D][c1101_fan:234]: Debug - RemoteID2: B\xbd\x9a/\xxxx
[06:58:35][D][c1101_fan:235]: Debug - LastID: 42-bd-14-8-9a-2f-xx-xx
[06:58:35][D][c1101_fan:233]: Debug - RemoteID1:
[06:58:35][D][c1101_fan:234]: Debug - RemoteID2: \x84lP܋xx
[06:58:35][D][c1101_fan:235]: Debug - LastID: 5-6-84-6c-50-dc-xx-xx
[06:58:36][D][c1101_fan:233]: Debug - RemoteID1:
[06:58:36][D][c1101_fan:234]: Debug - RemoteID2: j\x9a\xaaY\xa9\xxx\xxxV
[06:58:36][D][c1101_fan:235]: Debug - LastID: 6a-9a-aa-59-a9-a9-xx-xx
[06:58:36][D][c1101_fan:240]: 1 / Low (or 0 / Off)
[06:58:36][D][c1101_fan:233]: Debug - RemoteID1:
[06:58:36][D][c1101_fan:234]: Debug - RemoteID2: j\x9a\xaaY\xa9\xxx\xxxV
[06:58:36][D][c1101_fan:235]: Debug - LastID: 6a-9a-aa-59-a9-a9-xx-xx
[06:58:36][D][c1101_fan:240]: 1 / Low (or 0 / Off)
[06:58:36][D][c1101_fan:233]: Debug - RemoteID1:
[06:58:36][D][c1101_fan:234]: Debug - RemoteID2: j\x9a\xaaY\xa9\xxx\xxxV
[06:58:36][D][c1101_fan:235]: Debug - LastID: 6a-9a-aa-59-a9-a9-xx-xx
[06:58:36][D][c1101_fan:240]: 1 / Low (or 0 / Off)
(...)
[07:02:26][D][c1101_fan:234]: Debug - RemoteID2: j\x9a\xaaY\xa9\xxx\xxxV
[07:02:26][D][c1101_fan:235]: Debug - LastID: 6a-9a-aa-59-a9-a9-xx-xx
[07:02:26][D][c1101_fan:283]: Timer2
Oh, in my case, I have only one remote so I don’t care about the ID or anything. I would just want to use that to do a sanity check, to see if there is actual communication between both a) the CC1101 and the outside world and b) the CC1101 and the ESP. And if there is communication, whether or not the signals my remote sends are the ones that are programmed in this firmware.
Last time I concluded that either my CC1101 was broken, or the signals it was sending were not the correct ones. If I try it again I would at least want to be able to distinguish between those two scenarios, and preferably solve them too.
What did you do to get this output? Is it supposed to be in the logfile?
According to (maybe start at the bottom if at all reading) I cannot get it working · Issue #5 · CoMPaTech/esphome_ct · GitHub he had issues actually even booting up when his CC1101 didn’t work. If I recall correctly one of the pins was optional to attach (and it was the one you need for reading) - but I didn’t flag it - nor did any of the repositories I gathered back in the ESPeasy era.
What is important though, if you have it set-up - the first thing you have to do is send a ‘join’ command. If memory serves correctly, you need to unplug the unit - power it up again - and within the first 30 seconds send the join command. The unit should ‘flare up/down’ as to communicate it received the join command.
The output log is what you should get if you either a) from the esphome add-on, select your device and click logs or b) physically usb-connect it to your device running HA and mostly the same as a) or c) physically usb-connect it to any device with a browser (just go to https://web.esphome.io - choose connect - select the correct serial port - click logs).
Mine booted up just fine, everything appeared to be working from the ESPHome side of things.
Yes, I did this. About ten times at least. No reaction whatsoever from the fan unit.
I have another CC board ordered, I will try this again when it arrives and report back
Thanks for your updated repository, I finally got my setup to work partially. I needed to change datapin D1 to 5 in the yaml file as I’m running an older ESP07 board.
I tried to make some buttons to manually set the speed:
- platform: template
name: "Set speed to high"
on_press:
then:
- lambda: |-
((cc1101fan::CC1101Fan*)(&id(mech_fan)))->set_fan_speed(3);
but this doesn’t seem to work. As I have an older fan (CVE ECO RFT SE) I think I need message 1 instead of message 2 but it seems you commented out the message 1 line items in IthoCC1101.cpp. Why is that? They’re supposed to be able to co-exist together
Tbh I wouldn’t know - I had this from some old ESPeasy configuration ‘way back’ (when my Itho unit still ran on 433mhz if I recall correctly) and as indicated in the file you found (here’s it’s predecessor) if was copied from two earlier inceptions by different people.
That file hasn’t been touched in 6 years - and I’m only just know trying to (again?) check what it actually does - so if we can uncomment things to get it working on you unit, we can have a go at it. Anything specific - or just those few lines in message1?
I solved it, you declared the parameter for set_fan_speed as an int but it should be a uint8 just like with send_other_command. Works now, thanks!
I’ll have to fix that, tnx for finding out
So it works but not all the time not sure why but could it be b/c of the comparison between the current state and the requested state? My remote just sends every command 3 times so it always works, tempted to build the same logic
Note: Sending the rf.command 3 times seems to do the trick
BTW I incorporated the latest 3.0.0 library from Arjen as well, has a lot of updates and is a drop-in replacement, see GitHub - arjenhiemstra/IthoEcoFanRFT: Control the Itho Daalderop Eco Fan RFT using a microcontroller and CC1101 chip. The original code is fully tested using a STK500 and ATMega328P, this fork is modified for use with an Arduino or ESP8266. The following Itho commands are working: low, medium, full, 3 different timers, join and leave. The code will give you full remote control over the Itho Eco Fan RFT.