KC868-A8M configure yaml 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-A8M (https://www.kincony.com/forum/forumdisplay.php?fid=48) +--- Thread: KC868-A8M configure yaml for ESPhome (/showthread.php?tid=2791) Pages:
1
2
|
KC868-A8M configure yaml for ESPhome - admin - 04-14-2023 esphome: name: a8m platform: ESP32 board: esp32dev remote_receiver: pin: 16 dump: - rc_switch tolerance: 50% filter: 250us idle: 2ms buffer_size: 2kb # Example configuration entry for ESP32 i2c: sda: 5 scl: 4 scan: true id: bus_a # Example configuration entry ethernet: type: LAN8720 mdc_pin: GPIO23 mdio_pin: GPIO18 clk_mode: GPIO17_OUT phy_addr: 0 # Optional manual IP manual_ip: static_ip: 192.168.1.199 gateway: 192.168.1.1 subnet: 255.255.255.0 # Example configuration entry pcf8574: - id: 'pcf8574_hub_out_1' # for output channel 1-8 address: 0x24 - id: 'pcf8574_hub_in_1' # for input channel 1-8 address: 0x22 # Individual outputs switch: - platform: gpio name: "light1" id: light1 pin: pcf8574: pcf8574_hub_out_1 number: 0 mode: OUTPUT inverted: true - platform: gpio name: "light2" id: light2 pin: pcf8574: pcf8574_hub_out_1 number: 1 mode: OUTPUT inverted: true - platform: gpio name: "light3" id: light3 pin: pcf8574: pcf8574_hub_out_1 number: 2 mode: OUTPUT inverted: true - platform: gpio name: "light4" id: light4 pin: pcf8574: pcf8574_hub_out_1 number: 3 mode: OUTPUT inverted: true - platform: gpio name: "curtain1-up" id: relay5 pin: pcf8574: pcf8574_hub_out_1 number: 4 mode: OUTPUT inverted: true - platform: gpio name: "curtain1-down" id: relay6 pin: pcf8574: pcf8574_hub_out_1 number: 5 mode: OUTPUT inverted: true - platform: gpio name: "curtain2-up" id: relay7 pin: pcf8574: pcf8574_hub_out_1 number: 6 mode: OUTPUT inverted: true - platform: gpio name: "curtain2-down" id: relay8 pin: pcf8574: pcf8574_hub_out_1 number: 7 mode: OUTPUT inverted: true binary_sensor: - platform: gpio name: "input1" on_press: then: - switch.toggle: light1 pin: pcf8574: pcf8574_hub_in_1 number: 0 mode: INPUT inverted: true - platform: gpio name: "input2" on_press: then: - switch.toggle: light2 pin: pcf8574: pcf8574_hub_in_1 number: 1 mode: INPUT inverted: true - platform: gpio name: "input3" on_press: then: - switch.toggle: light3 pin: pcf8574: pcf8574_hub_in_1 number: 2 mode: INPUT inverted: true - platform: gpio name: "input4" on_press: then: - switch.toggle: light4 pin: pcf8574: pcf8574_hub_in_1 number: 3 mode: INPUT inverted: true - platform: gpio name: "input5" on_press: then: - switch.toggle: relay5 pin: pcf8574: pcf8574_hub_in_1 number: 4 mode: INPUT inverted: true - platform: gpio name: "input6" on_press: then: - switch.toggle: relay6 pin: pcf8574: pcf8574_hub_in_1 number: 5 mode: INPUT inverted: true - platform: gpio name: "input7" on_press: then: - switch.toggle: relay7 pin: pcf8574: pcf8574_hub_in_1 number: 6 mode: INPUT inverted: true - platform: gpio name: "input8" on_press: then: - switch.toggle: relay8 pin: pcf8574: pcf8574_hub_in_1 number: 7 mode: INPUT inverted: true - platform: remote_receiver name: "remoter1" rc_switch_raw: code: '000101000101010100000011' protocol: 2 on_press: then: - switch.toggle: light1 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter2" rc_switch_raw: code: '000101000101010100001100' protocol: 2 on_press: then: - switch.toggle: light2 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter3" rc_switch_raw: code: '001111010111001010110100' protocol: 2 on_press: then: - switch.toggle: light3 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter4" rc_switch_raw: code: '001111010111001010111001' protocol: 2 on_press: then: - switch.toggle: light4 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter5" rc_switch_raw: code: '001111010111001010110010' protocol: 2 on_press: then: - switch.toggle: relay5 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter6" rc_switch_raw: code: '001111010111001010110101' protocol: 2 on_press: then: - switch.toggle: relay6 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter7" rc_switch_raw: code: '001111010111001010110001' protocol: 2 on_press: then: - switch.toggle: relay7 filters: - delayed_off: 200ms - platform: remote_receiver name: "remoter8" rc_switch_raw: code: '001111010111001010110011' protocol: 2 on_press: then: - switch.toggle: relay8 filters: - delayed_off: 200ms # Enable logging logger: # Enable Home Assistant API api: KC868-A8M-ha-config.txt (Size: 5.68 KB / Downloads: 274) RE: KC868-A8M configure yaml for ESPhome - multimax - 09-15-2023 Hello i use your esp home example, but i get this error - see pic it is like the adress for pcf8574 is wrong - i have two kc868-a8m it says the same error RE: KC868-A8M configure yaml for ESPhome - admin - 09-15-2023 take a photo how you connect wire with your A8M board. RE: KC868-A8M configure yaml for ESPhome - multimax - 09-15-2023 (09-15-2023, 06:35 AM)admin Wrote: take a photo how you connect wire with your A8M board. Hello the board is only connectet with the usb cable, and an network cable. nothing else. i just upload your code. i tryed to change the code, to see if i get an new result. but no se txt file RE: KC868-A8M configure yaml for ESPhome - admin - 09-15-2023 you have not connect with dc12v power supply?? RE: KC868-A8M configure yaml for ESPhome - multimax - 09-15-2023 (09-15-2023, 08:11 AM)admin Wrote: you have not connect with dc12v power supply?? Sorry - yes power is on :-) here is pic RE: KC868-A8M configure yaml for ESPhome - admin - 09-15-2023 your esphome LOG showed, have not detected i2c bus device. i suggest you download KCS v2 firmware to test control relay whether work well firstly. here is details: https://www.kincony.com/esp32-kcsv2-firmware.html if KCS firmware work well, then go to next step for check ESPHOME config. RE: KC868-A8M configure yaml for ESPhome - multimax - 09-20-2023 Hello sorry for the late reply, i deleted the code, and wrote it again - and so it works :-) about the rf part, if i read an rf433 key, i get differnt codes everytime.... if i recive it in pronto format, i get the same code everytime :-) so do you have and pice of esp home code, where i can use pronto code to trigger an light in esp, insted off raw code ? RE: KC868-A8M configure yaml for ESPhome - admin - 09-20-2023 what remote you have used? suggest use "RC-switch" signal type for decode. RE: KC868-A8M configure yaml for ESPhome - multimax - 09-21-2023 Hello itis an remote for my garage. if i use rc_switch i get this [07:30:57][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0110110000100011101001101010001011010010101010111111111111111011' [07:30:58][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='1110100100101100011000001000000011010010101010111111111111111' [07:31:00][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0111011101110001000110110111110111010010101010111111111111111011' [07:31:01][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='01100111000001110010011110100001110100101' [07:31:02][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='110000101001100111110101010011101101001010' [07:31:03][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0101100111001100010000100101010011010010101010111111111111111011' [07:31:04][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='1011111101110001111100111011011111010010101010111111111111111011' [07:31:05][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='1101001000010000011110111011001111010010101010111111111111111011' [07:31:05][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='1100010110001010000000011110110111010010101010111111111111111011' [07:31:06][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0110010010000011010010011100010011010010101010111111111111111011' [07:31:06][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='01100100100' [07:31:07][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010101110000011100001111110000111010010101010111111111111111011' [07:31:08][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='0010110010010101101111100000001011010010101010111111111111111011' [07:31:09][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='100010000011011001000' [07:31:10][D][remote.rc_switch:261]: Received RCSwitch Raw: protocol=1 data='11110011011000011110011101000000110100101' and it is the same button ! |