Closed IvanHorban closed 5 years ago
If the input is connected to the ground when ESP8266 loading , it does not react to the state change.
Could you be more specific? What input is connected to ground? What point in time do you mean by ESP8266 loading?
From the logs I only see that the PCF8574 is sending 0xFE and 0xFF data - for me it sounds like the issue is with the PCF8574 unit and not the sw.
The PCF8574 module has 8 pins. If at the moment of the start of the ESP8266 any pin is connected to the ground, it does not react to a change of state. To fix this you need to unplug it from the ground, restart the ESP8266. Then, when connected or disconnected this pin from the ground, this message will appear in the logs. ('Input_01': Sending state OFF or 'Input_01': Sending state ON)
Sounds like a problem with the chip again.
The PCF has a really simple protocol - to read the chip state ESPHome only reads 8bits from the chip over i2c which represents the binary state of each pin. There's notable no setup routine or so involved, so there can't be an issue with wrong sw setup.
Had a similar issue some days ago. I replaced the PCF8574 board and everything worked as expected. I believe there are some bad fake chips on the market. Here's a pic of the bad module:
The original jumpers are black, i replaced them. To be complete, here's a pic of the good modules:
I guess that concludes the issue, I'm pretty certain there's nothing wrong with the code (it's mainly only 1 line, and I checked that pretty thoroughly). The bad chip explanation would also explain why it only happens to some people.
Operating environment/Installation (Hass.io/Docker/pip/etc.):
*ESP (ESP32/ESP8266, Board/Sonoff):ESP8266-07*
*Affected component:PCF8574*
*Description of problem:If the input is connected to the ground when ESP8266 loading , it does not react to the state change.*
Problem-relevant YAML-configuration entries:
Traceback (if applicable):
log when INPUT is working.
log when input does not work.
Additional information and things you've tried: