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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,664
» Latest member: rr88bbettop
» Forum threads: 4,195
» Forum posts: 20,848

Full Statistics

Online Users
There are currently 80 online users.
» 0 Member(s) | 63 Guest(s)
AhrefsBot, Amazonbot, Baidu, Crawl, PetalBot, Semrush, bot

Latest Threads
N60 configure yaml for ES...
Forum: N60
Last Post: admin
8 hours ago
» Replies: 7
» Views: 1,880
KCS VERSUS ESPHOME
Forum: "KCS" v3 firmware
Last Post: EDVALDO DE MARINGA
Yesterday, 01:31 PM
» Replies: 2
» Views: 37
KC868-AGv3
Forum: Getting Started with ESPHome and Home Assistant
Last Post: admin
08-20-2026, 10:18 PM
» Replies: 5
» Views: 97
[arduino code examples fo...
Forum: KC868-A32/A32 Pro
Last Post: huanmarie
08-19-2026, 07:09 AM
» Replies: 2
» Views: 1,598
KC868-H32B V5.08 firmware
Forum: News
Last Post: meoowu77
08-18-2026, 11:46 AM
» Replies: 24
» Views: 8,452
KinCony B2 Smart Controll...
Forum: News
Last Post: admin
08-17-2026, 01:07 PM
» Replies: 0
» Views: 55
KC868-A8v3 PCB layout CAD...
Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file
Last Post: admin
08-17-2026, 08:44 AM
» Replies: 0
» Views: 64
CT Clamp Compatibility
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
08-16-2026, 11:08 PM
» Replies: 12
» Views: 2,137
N60 Sensor channel label
Forum: N60
Last Post: marekd1
08-14-2026, 09:14 PM
» Replies: 18
» Views: 2,513
solar production and cons...
Forum: N30
Last Post: admin
08-14-2026, 01:46 AM
» Replies: 3
» Views: 146

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: 586)
   
   
   
   
   
   
   
   
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: 599)

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: 572)

Print this item

  KC868-A32M Using GPIO from 4G module for SPI / P9813 board
Posted by: giliardi - 08-28-2024, 12:09 AM - Forum: KC868-A32M - Replies (5)

Hi,

I need to connect P9813 board, which uses serial interface, to A32M board.

Idea

I wondering if I could use the GPIO33 AND GPIO32, both from 4G A32M`s RX AND TX, to expose to SPI and configure Esphome like bellow:

spi:
  clk_pin: GPIO33
  mosi_pin: GPIO32
  id: spi_a32m

light:
  - platform: spi_led_strip
    name: "P9813 RGB LED"
    num_leds: 1
    default_transition_length: 1s
    spi_id: spi_a32m

Thanks in advance.

Print this item

  kc868-A8S v2 not working with SIM7600E
Posted by: t0urista - 08-27-2024, 04:17 PM - Forum: KC868-A8S - Replies (9)

HI

SIM7600E module plugged in kc868-A8S v2.0 , running KCS 2.2.2. 

  • cannot send message, 
  • cannot receive message (crash/reboot when message is received) 
  • cannot receive call
  • can only place test phone call

also : 
  • the SIM7600E module was successfuly tested with an usb-to-Serial converter and putty. --> the SIM7600 module works fine, can send/receive messages
  • I also tried Tasmota on the kc868, impossible to establish connection to the SIM7600 in serial bridge --> Issue with RX/TX GPIO13/GPIO15 ?
     

Board Model
KC868_A8S
Software Version
v2.2.2
Build Date
Dec 6 2023 22:18:36
Serial Number
08F9E08BCAD4
Board Time
2024-8-27 11:58:45
Time Zone
UTC+2
Lan IP
Lan Netmask
Lan Gateway
Lan MAC
08:F9:E0:8B:CABig Grin7
Wifi STA IP
192.168.0.21
Wifi MAC
08:F9:E0:8B:CABig Grin4


Tests :

Outgoing 
when issuing test;  I got this :

MAKE A CALL ;  OK, my Mobile phone is properly called.

log :   
Code:
I (121694) SIM7600: call +32xxxxxxxxx

SEND A MESSAGE,  ERROR (no message received on mobile phone)

Log :

Code:
I (689066) SIM7600: [1/1] 0011000B912374940999F500007A2654747A0E4ACF416110BD3CA783DAE5F93C7C2E83CCF2771BB41CE26CB84810377501
 

INCOMING

CALL : nothoing happens, no log

Print this item

  Presence sensor issue
Posted by: sebagarayco - 08-26-2024, 04:42 PM - Forum: DIY Project - Replies (1)

Hi, I bought Presence Sensor MTDx61 and after wiring it I always see Input turned ON.

Wiring is:
RED: 12v+
BLACK: 12v-
WHITE: 12v-
GREEN: INPUT 1

Is wiring OK? what's missing?

Print this item