Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lesson9 - integrate KC868-Server to home assistant by MQTT
#31
format problem. you are using ‘output-1’, it should be 'output-1'
that is different character.
Reply
#32
Hello sir, i have integrate E16s relay module with KC868-Server - but - manual control button on E16s module is not working
i have attached a screenshot - see output is "on" but when i am trying to manually make it "off" with control button on E16s module it not working
please share a code


Attached Files Image(s)
   
Thanks & Regards,
Arshad Abbas
Smile
Reply
#33
it's normal, work well, because you have not set the INPUT trigger OUTPUT command.
such as these code:

switch:
- platform: gpio
name: "light1"
id: light1
pin:
pcf8574: pcf8574_hub_out_1
number: 0
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

-----------------------------------------

the important is add these code:

on_press:
then:
- switch.toggle: light1
Reply
#34
(04-21-2023, 10:49 AM)admin Wrote: it's normal, work well, because you have not set the INPUT trigger OUTPUT command.
such as these code:

switch:
- platform: gpio
name: "light1"
id: light1
pin:
pcf8574: pcf8574_hub_out_1
number: 0
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

-----------------------------------------

the important is add these code:

on_press:
then:
- switch.toggle: light1


i have write the code in file , getting some error - tried to fix but seems some "TAB" "SPACE" issue please help below code 

switch:
  - platform: gpio
    name: "e16s-output1"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true


binary_sensor:
  - platform: gpio
    name: "e16s-input1"
    on_press:
    then:
    - switch.toggle: output1
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
Thanks & Regards,
Arshad Abbas
Smile
Reply
#35
i have corrected my code , Manual button on E16s are working now.
Automations and Templates — ESPHome

switch:
  - platform: gpio
    name: "e16s-output1"
    id: output1    >>>>>>>>>>> add id 
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true

binary_sensor:
  - platform: gpio
    name: "e16s-input1"
    on_press:
      then:
        - switch.toggle: output1 >>>>>>>> map id 
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
Thanks & Regards,
Arshad Abbas
Smile
Reply
#36
ok
Reply
#37
(12-17-2022, 07:01 AM)admin Wrote: here is my config file for KC868-Server work with home assistant 2022.12.5

Hello, can you send an new file config to work with new update of home assistant? 
I tried as per youtube video but not working.
Reply
#38
you can see here, have sample code: https://www.kincony.com/kc868-h32b-integ...-mqtt.html
Reply
#39
i just bought the server , AIO and couple of AP . 
How do you recommed to start and configure them? by MQTT or ESP Home?
Reply
#40
suggest config by ESPHome, it's easy and stable.
Reply


Forum Jump:


Users browsing this thread: