KC868-A32 configure for ESPhome - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20) +--- Forum: KC868-A32/A32 Pro (https://www.kincony.com/forum/forumdisplay.php?fid=27) +--- Thread: KC868-A32 configure for ESPhome (/showthread.php?tid=1772) Pages:
1
2
|
KC868-A32 configure for ESPhome - admin - 03-23-2022 esphome: name: a32 platform: ESP32 board: esp32dev # Enable logging logger: # Enable Home Assistant API api: # Example configuration entry i2c: - id: bus_a sda: 15 scl: 13 scan: true - id: bus_b sda: 4 scl: 5 scan: true # Example configuration entry ethernet: type: LAN8720 mdc_pin: GPIO23 mdio_pin: GPIO18 clk_mode: GPIO17_OUT phy_addr: 0 # Example configuration entry pcf8574: - id: 'pcf8574_hub_out_1' # for output channel 1-8 i2c_id: bus_a address: 0x24 - id: 'pcf8574_hub_out_2' # for output channel 9-16 i2c_id: bus_a address: 0x25 - id: 'pcf8574_hub_out_3' # for output channel 17-24 i2c_id: bus_a address: 0x21 - id: 'pcf8574_hub_out_4' # for output channel 25-32 i2c_id: bus_a address: 0x22 - id: 'pcf8574_hub_in_1' # for input channel 1-8 i2c_id: bus_b address: 0x24 - id: 'pcf8574_hub_in_2' # for input channel 9-16 i2c_id: bus_b address: 0x25 - id: 'pcf8574_hub_in_3' # for input channel 17-24 i2c_id: bus_b address: 0x21 - id: 'pcf8574_hub_in_4' # for input channel 25-32 i2c_id: bus_b address: 0x22 # Individual outputs switch: - platform: gpio name: "light1" pin: pcf8574: pcf8574_hub_out_1 number: 0 mode: OUTPUT inverted: true - platform: gpio name: "light2" pin: pcf8574: pcf8574_hub_out_1 number: 1 mode: OUTPUT inverted: true - platform: gpio name: "light3" pin: pcf8574: pcf8574_hub_out_1 number: 2 mode: OUTPUT inverted: true - platform: gpio name: "light4" pin: pcf8574: pcf8574_hub_out_1 number: 3 mode: OUTPUT inverted: true - platform: gpio name: "light5" pin: pcf8574: pcf8574_hub_out_1 number: 4 mode: OUTPUT inverted: true - platform: gpio name: "light6" pin: pcf8574: pcf8574_hub_out_1 number: 5 mode: OUTPUT inverted: true - platform: gpio name: "light7" pin: pcf8574: pcf8574_hub_out_1 number: 6 mode: OUTPUT inverted: true - platform: gpio name: "light8" pin: pcf8574: pcf8574_hub_out_1 number: 7 mode: OUTPUT inverted: true - platform: gpio name: "light9" pin: pcf8574: pcf8574_hub_out_2 number: 0 mode: OUTPUT inverted: true - platform: gpio name: "light10" pin: pcf8574: pcf8574_hub_out_2 number: 1 mode: OUTPUT inverted: true - platform: gpio name: "light11" pin: pcf8574: pcf8574_hub_out_2 number: 2 mode: OUTPUT inverted: true - platform: gpio name: "light12" pin: pcf8574: pcf8574_hub_out_2 number: 3 mode: OUTPUT inverted: true - platform: gpio name: "light13" pin: pcf8574: pcf8574_hub_out_2 number: 4 mode: OUTPUT inverted: true - platform: gpio name: "light14" pin: pcf8574: pcf8574_hub_out_2 number: 5 mode: OUTPUT inverted: true - platform: gpio name: "light15" pin: pcf8574: pcf8574_hub_out_2 number: 6 mode: OUTPUT inverted: true - platform: gpio name: "light16" pin: pcf8574: pcf8574_hub_out_2 number: 7 mode: OUTPUT inverted: true - platform: gpio name: "light17" pin: pcf8574: pcf8574_hub_out_3 number: 0 mode: OUTPUT inverted: true - platform: gpio name: "light18" pin: pcf8574: pcf8574_hub_out_3 number: 1 mode: OUTPUT inverted: true - platform: gpio name: "light19" pin: pcf8574: pcf8574_hub_out_3 number: 2 mode: OUTPUT inverted: true - platform: gpio name: "light20" pin: pcf8574: pcf8574_hub_out_3 number: 3 mode: OUTPUT inverted: true - platform: gpio name: "light21" pin: pcf8574: pcf8574_hub_out_3 number: 4 mode: OUTPUT inverted: true - platform: gpio name: "light22" pin: pcf8574: pcf8574_hub_out_3 number: 5 mode: OUTPUT inverted: true - platform: gpio name: "light23" pin: pcf8574: pcf8574_hub_out_3 number: 6 mode: OUTPUT inverted: true - platform: gpio name: "light24" pin: pcf8574: pcf8574_hub_out_3 number: 7 mode: OUTPUT inverted: true - platform: gpio name: "light25" pin: pcf8574: pcf8574_hub_out_4 number: 0 mode: OUTPUT inverted: true - platform: gpio name: "light26" pin: pcf8574: pcf8574_hub_out_4 number: 1 mode: OUTPUT inverted: true - platform: gpio name: "light27" pin: pcf8574: pcf8574_hub_out_4 number: 2 mode: OUTPUT inverted: true - platform: gpio name: "light28" pin: pcf8574: pcf8574_hub_out_4 number: 3 mode: OUTPUT inverted: true - platform: gpio name: "light29" pin: pcf8574: pcf8574_hub_out_4 number: 4 mode: OUTPUT inverted: true - platform: gpio name: "light30" pin: pcf8574: pcf8574_hub_out_4 number: 5 mode: OUTPUT inverted: true - platform: gpio name: "light31" pin: pcf8574: pcf8574_hub_out_4 number: 6 mode: OUTPUT inverted: true - platform: gpio name: "light32" pin: pcf8574: pcf8574_hub_out_4 number: 7 mode: OUTPUT inverted: true # Individual outputs binary_sensor: - platform: gpio name: "input1" pin: pcf8574: pcf8574_hub_in_1 number: 0 mode: INPUT inverted: true - platform: gpio name: "input2" pin: pcf8574: pcf8574_hub_in_1 number: 1 mode: INPUT inverted: true - platform: gpio name: "input3" pin: pcf8574: pcf8574_hub_in_1 number: 2 mode: INPUT inverted: true - platform: gpio name: "input4" pin: pcf8574: pcf8574_hub_in_1 number: 3 mode: INPUT inverted: true - platform: gpio name: "input5" pin: pcf8574: pcf8574_hub_in_1 number: 4 mode: INPUT inverted: true - platform: gpio name: "input6" pin: pcf8574: pcf8574_hub_in_1 number: 5 mode: INPUT inverted: true - platform: gpio name: "input7" pin: pcf8574: pcf8574_hub_in_1 number: 6 mode: INPUT inverted: true - platform: gpio name: "input8" pin: pcf8574: pcf8574_hub_in_1 number: 7 mode: INPUT inverted: true - platform: gpio name: "input9" pin: pcf8574: pcf8574_hub_in_2 number: 0 mode: INPUT inverted: true - platform: gpio name: "input10" pin: pcf8574: pcf8574_hub_in_2 number: 1 mode: INPUT inverted: true - platform: gpio name: "input11" pin: pcf8574: pcf8574_hub_in_2 number: 2 mode: INPUT inverted: true - platform: gpio name: "input12" pin: pcf8574: pcf8574_hub_in_2 number: 3 mode: INPUT inverted: true - platform: gpio name: "input13" pin: pcf8574: pcf8574_hub_in_2 number: 4 mode: INPUT inverted: true - platform: gpio name: "input14" pin: pcf8574: pcf8574_hub_in_2 number: 5 mode: INPUT inverted: true - platform: gpio name: "input15" pin: pcf8574: pcf8574_hub_in_2 number: 6 mode: INPUT inverted: true - platform: gpio name: "input16" pin: pcf8574: pcf8574_hub_in_2 number: 7 mode: INPUT inverted: true - platform: gpio name: "input17" pin: pcf8574: pcf8574_hub_in_3 number: 0 mode: INPUT inverted: true - platform: gpio name: "input18" pin: pcf8574: pcf8574_hub_in_3 number: 1 mode: INPUT inverted: true - platform: gpio name: "input19" pin: pcf8574: pcf8574_hub_in_3 number: 2 mode: INPUT inverted: true - platform: gpio name: "input20" pin: pcf8574: pcf8574_hub_in_3 number: 3 mode: INPUT inverted: true - platform: gpio name: "input21" pin: pcf8574: pcf8574_hub_in_3 number: 4 mode: INPUT inverted: true - platform: gpio name: "input22" pin: pcf8574: pcf8574_hub_in_3 number: 5 mode: INPUT inverted: true - platform: gpio name: "input23" pin: pcf8574: pcf8574_hub_in_3 number: 6 mode: INPUT inverted: true - platform: gpio name: "input24" pin: pcf8574: pcf8574_hub_in_3 number: 7 mode: INPUT inverted: true - platform: gpio name: "input25" pin: pcf8574: pcf8574_hub_in_4 number: 0 mode: INPUT inverted: true - platform: gpio name: "input26" pin: pcf8574: pcf8574_hub_in_4 number: 1 mode: INPUT inverted: true - platform: gpio name: "input27" pin: pcf8574: pcf8574_hub_in_4 number: 2 mode: INPUT inverted: true - platform: gpio name: "input28" pin: pcf8574: pcf8574_hub_in_4 number: 3 mode: INPUT inverted: true - platform: gpio name: "input29" pin: pcf8574: pcf8574_hub_in_4 number: 4 mode: INPUT inverted: true - platform: gpio name: "input30" pin: pcf8574: pcf8574_hub_in_4 number: 5 mode: INPUT inverted: true - platform: gpio name: "input31" pin: pcf8574: pcf8574_hub_in_4 number: 6 mode: INPUT inverted: true - platform: gpio name: "input32" pin: pcf8574: pcf8574_hub_in_4 number: 7 mode: INPUT inverted: true # Example configuration entry sensor: - platform: adc pin: 39 name: "analog-1" update_interval: 10s attenuation: 11db - platform: adc pin: 34 name: "analog-2" update_interval: 10s attenuation: 11db - platform: adc pin: 36 name: "analog-3" update_interval: 10s attenuation: 11db - platform: adc pin: 35 name: "analog-4" update_interval: 10s attenuation: 11db RE: KC868-A32 configure for ESPhome - nwells - 03-03-2023 I'm having trouble connecting up remote transmitters as they won't accept the pcf8574 settings: Code: remote_transmitter: Also, I have multiple binary gpio setup but none of them are triggering. I can confirm they all work as I've setup them up previously on a smaller ESP32 supported board and I'm in the process of upgrading to the large A32 relay board. Code: binary_sensor: RE: KC868-A32 configure for ESPhome - admin - 03-03-2023 check your A32 board PCF8574 IIC address value whether correct. after download firmware by ESPHome, see the LOG output, it will show the IIC scan address result. RE: KC868-A32 configure for ESPhome - nwells - 03-03-2023 (03-03-2023, 02:36 AM)admin Wrote: check your A32 board PCF8574 IIC address value whether correct. after download firmware by ESPHome, see the LOG output, it will show the IIC scan address result. What about the remote transmitters? This is the compile error I get: Code: rc/main.cpp: In function 'void setup()': The compile message appears as soon as I add pcf8574: pcf8574_hub_in_3 RE: KC868-A32 configure for ESPhome - nwells - 03-03-2023 I've updated the firmware but still no progress. I used the settings above: Code: i2c: The logs report: Code: [19:09:08][C][i2c.arduino:052]: I2C Bus: Any ideas? RE: KC868-A32 configure for ESPhome - admin - 03-03-2023 KC868-A32 no interface for RF receiver module, how do you use remote transmitters ? RE: KC868-A32 configure for ESPhome - nwells - 03-03-2023 (03-03-2023, 09:02 AM)admin Wrote: KC868-A32 no interface for RF receiver module, how do you use remote transmitters ? I don't need a receiver. The transmitter is defined in my first post above. It worked fine when I had this on a different board - it just needs to send an output signal which is generated by the climate platform. Could the GPIO issue be pullup related? RE: KC868-A32 configure for ESPhome - admin - 03-03-2023 you are using PCF8574 IIC for GPIO work as transmitter. maybe PCF8574 speed not fast enough. you can try to set the PCF8574 frequency high, if also can't work , i think transmitter need use ESP32's GPIO, not PCF8574's. RE: KC868-A32 configure for ESPhome - nwells - 03-03-2023 How do I set the frequency to high? RE: KC868-A32 configure for ESPhome - admin - 03-03-2023 about I2C bus setting in ESPHome, there ia a "frequency" setting. details see here: https://esphome.io/components/i2c.html |