Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,357
» Latest member: Dharani
» Forum threads: 4,118
» Forum posts: 20,640

Full Statistics

Online Users
There are currently 32 online users.
» 0 Member(s) | 17 Guest(s)
Amazonbot, Baidu, Bytespider, Semrush, bot

Latest Threads
Loxone RS485
Forum: KinCony integrate with Loxone home automation
Last Post: marekzerzan
40 minutes ago
» Replies: 13
» Views: 3,182
ESP system with BTS7960 I...
Forum: DIY Project
Last Post: SchmidtGundersen
Yesterday, 03:53 PM
» Replies: 4
» Views: 50
B32M maximum voltage
Forum: DIY Project
Last Post: admin
Yesterday, 12:37 PM
» Replies: 1
» Views: 9
KC868-A8M reading Etherne...
Forum: KC868-A8M
Last Post: hayat
07-07-2026, 01:39 PM
» Replies: 10
» Views: 3,608
KinCony F16 work with Con...
Forum: KinCony integrate with Control4 home automation
Last Post: admin
07-07-2026, 07:34 AM
» Replies: 0
» Views: 27
KinCony Driver File For C...
Forum: KinCony integrate with Control4 home automation
Last Post: admin
07-07-2026, 07:05 AM
» Replies: 0
» Views: 19
KinCony Gateway User Guid...
Forum: KinCony integrate with Control4 home automation
Last Post: admin
07-07-2026, 07:03 AM
» Replies: 0
» Views: 14
KinCony Contact Driver Us...
Forum: KinCony integrate with Control4 home automation
Last Post: admin
07-07-2026, 07:03 AM
» Replies: 0
» Views: 12
KinCony Light Driver User...
Forum: KinCony integrate with Control4 home automation
Last Post: admin
07-07-2026, 07:02 AM
» Replies: 0
» Views: 12
KinCony Relay Driver User...
Forum: KinCony integrate with Control4 home automation
Last Post: admin
07-07-2026, 07:02 AM
» Replies: 0
» Views: 10

  Extending H32B Pro
Posted by: titan - 09-01-2024, 10:50 AM - Forum: KC868-HxB series Smart Controller - Replies (1)

Hello,

I am using a H32B Pro and Home Assistant to control an irrigation system and would like to add another 32 channels? How should I do this? Should I get another H32B Pro or is there an extension module I could use?

Thank you,

David

Print this item

  KC868-A8 Roller Blinds
Posted by: Paul - 08-31-2024, 02:10 PM - Forum: DIY Project - Replies (1)

Hello!!
Could I ask for instructions on how to make roller blinds for ESPhome ? I need some code to run it.
I can't find it on the Internet and what I found doesn't work. I have KC868-A8-V1.6


TXH

Print this item

  Inputs on KC868-A16. What is correct?
Posted by: Brouk - 08-30-2024, 10:55 AM - Forum: KC868-A16 - Replies (20)

I purchased KC868-A16 from you via Aliexpress ( Order ID: 3034630932938839).
As the menu/specification table says (see the attached image), the device should have:
> 16 digital input LOG1 = +8 to 12VDC
> and 2 analog inputs 4-20mA.

But
> the device does not have digital inputs working with a positive signal, i.e. PNP. So I have to buy logic signal converters :o( .

> and even (now I found out on your site https://www.kincony.com/esp32-board-16-c...dware.html ) that there are no analog current inputs. Is that so?

Do you have inaccurate information when selling? What is the truth?
Regards



Attached Files Thumbnail(s)
       
Print this item

Lightbulb eth and mqtt for KC868-A16
Posted by: lron - 08-30-2024, 09:34 AM - Forum: KC868-A16 - Replies (1)

Hallo kincony!
I need a code for aduino IDE with:
 - Ethernet
 - MQTT
 - 16 inputs
 - 16 outputs
 - small web server just for entering (and save it to eprom):
     - static ip
     - server\broker ip
     - server subnet
     - server mask
     - subscribe topic
     - publish topic

Print this item

  KC868-D16 dimmer controller MQTT configuration for home assistant fixed linear issue
Posted by: admin - 08-30-2024, 06:23 AM - Forum: KC868-HxB series Smart Controller - Replies (13)

new configuration.yaml file for home assistant MQTT. this file fixed linear issue.
   
   

Code:
mqtt:
  light:
    - name: D16-1
      unique_id: D16-1
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer1":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer1":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer1":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer1.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer1.value is defined -%}
        {{ (value_json.dimmer1.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}
       
    - name: D16-2
      unique_id: D16-2
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer2":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer2":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer2":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer2.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer2.value is defined -%}
        {{ (value_json.dimmer2.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}
       
    - name: D16-3
      unique_id: D16-3
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer3":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer3":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer3":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer3.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer3.value is defined -%}
        {{ (value_json.dimmer3.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-4
      unique_id: D16-4
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer4":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer4":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer4":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer4.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer4.value is defined -%}
        {{ (value_json.dimmer4.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-5
      unique_id: D16-5
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer5":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer5":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer5":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer5.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer5.value is defined -%}
        {{ (value_json.dimmer5.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-6
      unique_id: D16-6
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer6":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer6":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer6":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer6.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer6.value is defined -%}
        {{ (value_json.dimmer6.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-7
      unique_id: D16-7
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer7":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer7":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer7":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer7.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer7.value is defined -%}
        {{ (value_json.dimmer7.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}


    - name: D16-8
      unique_id: D16-8
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer8":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer8":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer8":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer8.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer8.value is defined -%}
        {{ (value_json.dimmer8.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-9
      unique_id: D16-9
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer9":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer9":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer9":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer9.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer9.value is defined -%}
        {{ (value_json.dimmer9.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-10
      unique_id: D16-10
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer10":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer10":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer10":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer10.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer10.value is defined -%}
        {{ (value_json.dimmer10.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-11
      unique_id: D16-11
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer11":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer11":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer11":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer11.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer11.value is defined -%}
        {{ (value_json.dimmer11.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-12
      unique_id: D16-12
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer12":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer12":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer12":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer12.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer12.value is defined -%}
        {{ (value_json.dimmer12.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-13
      unique_id: D16-13
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer13":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer13":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer13":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer13.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer13.value is defined -%}
        {{ (value_json.dimmer13.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-14
      unique_id: D16-14
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer14":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer14":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer14":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer14.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer14.value is defined -%}
        {{ (value_json.dimmer14.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-15
      unique_id: D16-15
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer15":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer15":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer15":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer15.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer15.value is defined -%}
        {{ (value_json.dimmer15.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

    - name: D16-16
      unique_id: D16-16
      schema: template
      command_topic: "dimmer/be06d3fd6311b55a970bba37/set"
      state_topic: "dimmer/be06d3fd6311b55a970bba37/state"
      command_on_template: >
        {%- if brightness is defined -%}
        {"dimmer16":{"value":{{ (brightness / 255 * 99) | int }}}
        {%- else -%}
        {"dimmer16":{"value":99}}
        {%- endif -%}
      command_off_template: '{"dimmer16":{"value":0}}'
      state_template: >
        {%- if value_json.dimmer16.value == 0 -%}
          off
        {%- else -%}
          on
        {%- endif -%}
      brightness_template: >
        {%- if value_json.dimmer16.value is defined -%}
        {{ (value_json.dimmer16.value / 99 * 255) | int }}
        {%- else -%}
        0
        {%- endif -%}

yaml file download: 
.txt   mqtt-kc868-d16-home-assistant-16-channel-config.txt (Size: 12.37 KB / Downloads: 541)
   
   
   
   
   
   
   
   
linedddar issuedd

Print this item

  A32 pro and traditional switch
Posted by: Nikola - 08-29-2024, 10:07 PM - Forum: KC868-A32/A32 Pro - Replies (1)

When connect traditional switch to digital input A32 pro and turn light ON with tradition swich, can I turn OFF light in HA or Tuya if traditional switch stay in ON position? Thaks

Print this item

  DHT22 with A32PRO
Posted by: Marcin - 08-28-2024, 07:53 PM - Forum: KC868-A32/A32 Pro - Replies (5)

I am trying to connect DHT22 to A32PRO. I connected three DHT22 pins in the following way:
data pin -> W1
VCC -> 3V3
GND -> GND

There is 10kOm pull up resistor between 3V3 and W1 installed. 

This is how I configure DHT22 in ESPHOME:

sensor:
  - platform: dht
    pin: GPIO1  
    model: DHT22
    temperature:
      name: "Temperature"
    humidity:
      name: "Humidity"
    update_interval: 10s

The status in Home Assistant is "unknown".

What am I doing wrong? Did I connected and configured correctly?  
[Image: t-mq0YTWcdl6]
Thank you for explanation in advance.

Print this item

  433hz how create sensori?
Posted by: ulfgar - 08-28-2024, 01:24 PM - Forum: KC868-A16 - Replies (3)

I connected the 433hz receiver to the sc868-a16 board with esp home from home assistant in the esphome log I see the magnetic sensor code when I close or open it. How do I integrate it into home assistant? How do I create a sensor that indicates if the door is open or closed? Kindly does anyone have the sensor code and know where to insert it?

Print this item

  how to use binary sensor send SMS by SIM7600E 4G module in ESPHome
Posted by: admin - 08-28-2024, 01:11 AM - Forum: Getting Started with ESPHome and Home Assistant - No Replies


the ESPHome yaml demo made for KinCony KC868-A8S relay board. Actually you can use for any KinCony SIM7600 relay board, just replace 4G module's TXD,RXD define.
   
   
   
here is ESPHome yaml demo:

Code:
esphome:
  name: a8s
  platform: ESP32
  board: esp32dev
 
# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a


# 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
    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
    interlock: [relay6]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
     
     
     
  - platform: gpio
    name: "curtain1-down"
    id: relay6
    interlock: [relay5]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true
     

  - platform: gpio
    name: "curtain2-up"
    id: relay7
    interlock: [relay8]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true

     
  - platform: gpio
    name: "curtain2-down"
    id: relay8
    interlock: [relay7]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true

# UART configuration for SIM7600E
uart:
  id: uart_2
  tx_pin: GPIO13
  rx_pin: GPIO15
  baud_rate: 115200
  debug:
    direction: BOTH
    dummy_receiver: true
    after:
      timeout: 10ms
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);
     
binary_sensor:
  - platform: gpio
    name: "Call Button"
    on_press:
      then:
        - uart.write:
            id: uart_2
            data: "ATD15381188302;\r\n"  # Replace with the phone number you want to dial
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "Send SMS Button"
    on_press:
      then:
        - uart.write:
            id: uart_2
            data: "AT+CMGF=1\r\n"  # Set SMS to text mode
        - delay: 1s
        - uart.write:
            id: uart_2
            data: "AT+CMGS=\"15381188302\"\r\n"  # Replace with the recipient's phone number
        - delay: 1s
        - uart.write:
            id: uart_2
            data: "KinCony-SMS-Sensor\x1A"  # Send the message "KinCony-SMS-Sensor" and terminate with Ctrl+Z
    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


# Enable logging
logger:

# Enable Home Assistant API
api:

web_server:
  port: 80
download yaml file:

.txt   KC868-A8S-HA-INPUT-SIM7600-SMS.txt (Size: 4.45 KB / Downloads: 569)

Print this item

  how to use binary sensor make VOICE CALL by SIM7600E 4G module in ESPHome
Posted by: admin - 08-28-2024, 12:58 AM - Forum: Getting Started with ESPHome and Home Assistant - Replies (9)


the ESPHome yaml demo made for KinCony KC868-A8S relay board. Actually you can use for any KinCony SIM7600 relay board, just replace 4G module's TXD,RXD define.
   
   
here is ESPHome yaml demo:

Code:
esphome:
  name: a8s
  platform: ESP32
  board: esp32dev
 
# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a


# 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
    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
    interlock: [relay6]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
     
     
     
  - platform: gpio
    name: "curtain1-down"
    id: relay6
    interlock: [relay5]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true
     

  - platform: gpio
    name: "curtain2-up"
    id: relay7
    interlock: [relay8]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true

     
  - platform: gpio
    name: "curtain2-down"
    id: relay8
    interlock: [relay7]
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true

# UART configuration for SIM7600E
uart:
  id: uart_2
  tx_pin: GPIO13
  rx_pin: GPIO15
  baud_rate: 115200
  debug:
    direction: BOTH
    dummy_receiver: true
    after:
      timeout: 10ms
    sequence:
      - lambda: UARTDebug::log_string(direction, bytes);
     
binary_sensor:
  - platform: gpio
    name: "Call Button"
    on_press:
      then:
        - uart.write:
            id: uart_2
            data: "ATD15381188302;\r\n"  # Replace with the phone number you want to dial
    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


# Enable logging
logger:

# Enable Home Assistant API
api:

web_server:
  port: 80
download yaml file:
.txt   KC868-A8S-HA-INPUT-SIM7600-CALL.txt (Size: 4.03 KB / Downloads: 535)

Print this item