CoMPaTech / esphome_c1101

ESPHome approach on ITHO EcoFan control through 868 MHz ESP8266 for https://www.home-assistant.io
24 stars 5 forks source link

How add ITHO remotes #8

Closed poudenes closed 1 year ago

poudenes commented 1 year ago

Hi There,

Great script and love the way how it is created. I have 2 remotes using in Kitchen and Bathroom:

Device-ID:65:99:96:55:96:a9:9a:56 - Keuken - 42,c,51
Device-ID:6a:59:6a:55:96:a9:9a:56 - Badkamer - 3c,c,51

The first is old ID and after the name its the new ID. Tried other esphome scripts but my Wemos freeze when put GD02 on D1 pin. On pin D0 it work, when put wire on D1 is saw those 2 new ID's in log. But Wemos is very unstable and freeze within seconds.

So how can I add those remotes into your scripts?

In other scripts they all use this:

  on_boot:
    then:
      - lambda: |-
          Idlist[0]={"3c,c,51","Badkamer"};
          Idlist[1]={"42,c,51","Toilet"};
          Idlist[2]={"ID3","ID3"};
          Mydeviceid="Homeassistant"; 
          rf.setDeviceID(10,87,81); //ID for sending: 10,87,81 was used in old library
          id(swfan_low).turn_on(); //This ensures fan is at low-speed at boot
CoMPaTech commented 1 year ago

Hi @poudenes, I've never been able to figure out which remote is which. I was tinkering with https://github.com/CoMPaTech/esphome_c1101/blob/9efe1660d6f9eb64b2b729c84f3c27130573b386/config/esphome/ITHO/fancontrol.h#L172 but that generates commands from 'elsewhere' and I've never been able to figure out (even when timing and pressing buttons on them standing next to them) how the IDs were comprised.

What 'works for me' is that if someone 'overrides' from the remote, I at least see it in HA which is enough to trigger automations against (i.e. no long-running high fan etc.). But debugging and toying with the code never gave the IDs as clear as you have them.

(I'm aware that the answer doesn't help directly - long day/bit tired, but couldn't resist responding)

ESPhome logging Scherm­afbeelding 2023-04-27 om 20 01 35

As for the next screenshot, I only pressed one of them to create the above (black) screenshot of the logging, mind the abundance of ID's right in the 'last sensor' (which is from debugging it a year ago or so and giving up on it). It might be dead simple to get it right and have a big improvement :) (Tnx for poking)

Scherm­afbeelding 2023-04-27 om 20 05 08

I'll poke someone who's also tinkering with this (but not sure what his Github handle is)

poudenes commented 1 year ago

Thank you for the long reply. The whole point now for me is that I don't see my remotes at all in de log back. I tried everything to let it work. Control the fan with HA using the switches created in ESPHome are working.

I tried many pinout connections but I think something there is wrong...

Can you send me how you connect your CC1101 to your board you use. And what board do you use?

I have a Nodemcu and a Wemos D1 R1.

poudenes commented 1 year ago

second. If you want explain in dutch, dan is dat ook prima :)

poudenes commented 1 year ago

I'll poke someone who's also tinkering with this (but not sure what his Github handle is) ESPhome - https://github.com/jodur/ESPHOME-ITHO ESPhome - https://github.com/Scriptman/ESPHome_ITHO_Eco_Fan_CC1101 ESPEasy - https://github.com/svollebregt/ESPEASY_Plugin_ITHO *.h file - https://github.com/arjenhiemstra/IthoEcoFanRFT

I know those 2 as well

poudenes commented 1 year ago
Pinout - CC1101

This is my cc1101

poudenes commented 1 year ago

Hi,

When I pin everything on Wemos D7, D6, D5, D8 and D1 it stuck on

� �l�l��n�[I][logger:259]: Log initialized [C][ota:469]: There have been 4 suspected unsuccessful boot attempts. [I][app:029]: Running through setup()...

When use pin D13, D12, D11, D10 and D0 same. With other builds it process but no remotes.

Maybe my CC1101 only send but reviewing part on board is damaged?

CoMPaTech commented 1 year ago

I'll have to recheck my wiring schema, but I also have an older board I guess: Scherm­afbeelding 2023-04-28 om 09 15 37

It runs of a Wemos D1 mini with the pinout as in the readme. But I do remember slightly that in the beginning I didn't connect the readout one

poudenes commented 1 year ago

Hi,

Replaced the wires and now everything is running. Even my remotes are shown in Home Assistant. Used this Github for testing and worked directly:

https://github.com/Scriptman/ESPHome_ITHO_Eco_Fan_CC1101