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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,365
» Latest member: StaysDxb
» Forum threads: 2,574
» Forum posts: 13,305

Full Statistics

Online Users
There are currently 45 online users.
» 2 Member(s) | 30 Guest(s)
Bing, Bytespider, Crawl, Google, PetalBot, Yandex, bot, gal, StaysDxb

Latest Threads
change wake up name
Forum: KinCony AS
Last Post: gal
12 minutes ago
» Replies: 12
» Views: 69
A32 Pro ESPHome yaml incl...
Forum: KC868-A32/A32 Pro
Last Post: xarouli5
1 hour ago
» Replies: 17
» Views: 177
Need help with configurat...
Forum: KC868-HxB series Smart Controller
Last Post: admin
3 hours ago
» Replies: 32
» Views: 381
ESP32 S3 set up issue
Forum: Extender module
Last Post: admin
8 hours ago
» Replies: 10
» Views: 58
KC868-A8 Schematic
Forum: KC868-A8
Last Post: admin
8 hours ago
» Replies: 7
» Views: 41
"KCS" v2.2.8 firmware BIN...
Forum: "KCS" firmware system
Last Post: admin
8 hours ago
» Replies: 2
» Views: 159
Dimensions/drawings of bo...
Forum: Schematic and diagram
Last Post: admin
8 hours ago
» Replies: 1
» Views: 18
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: admin
12-16-2024, 10:55 PM
» Replies: 12
» Views: 446
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: admin
12-16-2024, 10:53 PM
» Replies: 5
» Views: 34
M16 SHT31 sensor disconne...
Forum: KC868-M16 / M1 / MB / M30
Last Post: bsarra
12-16-2024, 08:36 PM
» Replies: 4
» Views: 38

  Server 16 Raspberry Specs
Posted by: LandOfMosfet - 10-14-2024, 08:18 PM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - Replies (3)

I have trouble finding the specifications for this unit.

Just basic stuff like:

What is the DC voltage and current requirements?
Voltage rating for digital input

I have the unit in front of me but before I get started I would like to have all the

Thanks!

Print this item

  "KCS" v2.2.5 firmware BIN file download
Posted by: admin - 10-13-2024, 11:12 AM - Forum: "KCS" firmware system - Replies (6)

Here is "KCS" firmware for KinCony KC868-A series (ESP32) board.
How to download and use, online guide: https://www.kincony.com/esp32-kcsv2-firmware.html

v2.2.5 improment:
1. fixed bug: "INPUT" webpage have error items listed in "INTERLOCK GROUP" and OUTPUT count error.



Attached Files
.zip   KCS_KC868_A32M_V2.2.5.zip (Size: 794.81 KB / Downloads: 43)
.zip   KCS_KC868_A64_V2.2.5.zip (Size: 776.69 KB / Downloads: 40)
.zip   KCS_KC868_A128_V2.2.5.zip (Size: 776.58 KB / Downloads: 48)
.zip   KCS_KC868_AG_V2.2.5.zip (Size: 755.25 KB / Downloads: 40)
.zip   KCS_KC868_AI_V2.2.5.zip (Size: 779.44 KB / Downloads: 39)
.zip   KCS_KC868_AIO_V2.2.5.zip (Size: 796.55 KB / Downloads: 35)
.zip   KCS_KC868_AK_V2.2.5.zip (Size: 757.94 KB / Downloads: 44)
.zip   KCS_KC868_AM_V2.2.5.zip (Size: 772.41 KB / Downloads: 40)
.zip   KCS_KC868_AP_V2.2.5.zip (Size: 774.76 KB / Downloads: 38)
.zip   KCS_KC868_ASR_V2.2.5.zip (Size: 751.99 KB / Downloads: 41)
.zip   KCS_KC868_E16S_V2.2.5.zip (Size: 781.16 KB / Downloads: 36)
.zip   KCS_KC868_UAIR_V2.2.5.zip (Size: 758.66 KB / Downloads: 33)
.zip   KCS_KC868_A2_V2.2.5.zip (Size: 785.06 KB / Downloads: 40)
.zip   KCS_KC868_A4_V2.2.5.zip (Size: 772.34 KB / Downloads: 59)
.zip   KCS_KC868_A4S_V2.2.5.zip (Size: 795.99 KB / Downloads: 43)
.zip   KCS_KC868_A6_V2.2.5.zip (Size: 771.04 KB / Downloads: 67)
.zip   KCS_KC868_A8_V2.2.5.zip (Size: 779.1 KB / Downloads: 52)
.zip   KCS_KC868_A8M_V2.2.5.zip (Size: 795.66 KB / Downloads: 38)
.zip   KCS_KC868_A8S_V2.2.5.zip (Size: 797.1 KB / Downloads: 52)
.zip   KCS_KC868_A16_V2.2.5.zip (Size: 786.38 KB / Downloads: 107)
.zip   KCS_KC868_A16S_V2.2.5.zip (Size: 797.22 KB / Downloads: 41)
.zip   KCS_KC868_A32_V2.2.5.zip (Size: 776.62 KB / Downloads: 42)
Print this item

Information Retain Switch status ESPHome after reboot and update / Ethernet setup
Posted by: S.Krans - 10-13-2024, 10:15 AM - Forum: Getting Started with ESPHome and Home Assistant - Replies (5)

Hi  

if i update the boards A64 / A128 the outputs does not retain their status so if i have switch-1 on and reboot the switch-1 goes off




i run ESPHome true Home Assistant and run the automations true node-red is there a possibility to have it retain the previous state before reboot or update



Also i want to use my ethernet but it wont connect 


Code:
esphome:
  name: kincony-kc868-a64-rk
  friendly_name: Kincony KC868-A64-RK

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxx"

ota:
  password: "xxx"
  platform: esphome

#wifi:
#  ssid: !secret wifi_ssid
#  password: !secret wifi_password

#  # Enable fallback hotspot (captive portal) in case wifi connection fails
#  ap:
#    ssid: "Kincony-Kc868-A64-Rk"
#    password: !secret wifi_ap

#captive_portal:




# Example configuration entry
i2c:
  - id: bus_a
    sda: 5
    scl: 16
    scan: true
    frequency: 400kHz
  - id: bus_b
    sda: 15
    scl: 4
    scan: true
    frequency: 400kHz
   

# 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: 20.20.20.192
    gateway: 20.20.20.1
    subnet: 255.255.255.0



Thanks in advance
Sijmen

Print this item

Question Ghost trigger
Posted by: kbo - 10-12-2024, 10:40 AM - Forum: KC868-A64 - Replies (4)

Hi,

I have implemented a kc-868-a64 in my home. It works great. It is integrated with Home Assistant to do some automation but the kc-868-a64 works on itself (see config below)

But I have a problem. Sometime when a push button is pressed, the configured light goes on BUT an other, not configured light sometimes also goes on.
I have this for some push buttons, not all. 

I tried to troubleshoot it but I can't find the issue.
Is there any way to troubleshoot this issue or is this a known issue ?

I have impulse relays so most of the outputs will turn off again.

My ESP HOME config is attached (I have redacted some fields)



Attached Files
.txt   a64.txt (Size: 37.25 KB / Downloads: 31)
Print this item

Photo rs485 port with kc868-a16s.
Posted by: Alfred - 10-11-2024, 10:16 AM - Forum: KC868-A16S - Replies (3)

i want to receive 16 bytes data through rs485 port with kc868-a16s.
but the received value is strange.
please le me know what should i check.


#define A16S_RS485_RX  32
#define A16S_RS485_TX  33

void setup() {
  Serial.begin(115200);
  Serial2.begin(19200,SERIAL_8N1,A16S_RS485_RX,A16S_RS485_TX); //A16S
  Serial.println("A16S RS485 OK");
}
void loop() {
  if (Serial2.available() > 0) {
    Serial.print("rs485 received value : ");
    Serial.println(Serial2.read());         
  }
  delay(1000);
}


18:57:15.956 -> rs485 received value : 1
18:57:16.936 -> rs485 received value : 134
18:57:17.966 -> rs485 received value : 160
18:57:19.011 -> rs485 received value : 255
18:57:19.932 -> rs485 received value : 255
18:57:20.964 -> rs485 received value : 255
18:57:21.944 -> rs485 received value : 240
18:57:22.973 -> rs485 received value : 0
18:57:23.950 -> rs485 received value : 0
18:57:24.938 -> rs485 received value : 0
18:57:25.967 -> rs485 received value : 30
18:57:26.948 -> rs485 received value : 165




sending data attached.



Attached Files Thumbnail(s)
   
Print this item

Information How to Add an Extra Module for SD Card on the KC868-A6 Board?
Posted by: iagomendes - 10-10-2024, 09:48 PM - Forum: KC868-A6 - Replies (1)

I'm looking for information on how to add an extra module for an SD card to my KC868-A6 board. What are the necessary steps to connect the module and program it properly? Is there any specific code I should use to ensure that data recording works correctly? I appreciate any guidance or resources that can assist me in this process.

Print this item

  KC868-AI - input as output HomeAssistant
Posted by: fbuffolo - 10-10-2024, 12:39 PM - Forum: KC868-AI - Replies (1)

Good morning,

in order to upgrade my home allarm system, I want to buy a KC868-AI. I have a question: I read that the dry contacts inputs can work as output with a KCS firmware; but can I use the input ad output also in Home Assistant?

I need one input as output in order to turn on the siren when one input is in allarm mode.

Thanks in advance.
Fausto

Print this item

  [Arduino source code for KC868-A2]-05 RS485 modbus temperature humidity sensor
Posted by: admin - 10-09-2024, 07:44 AM - Forum: KC868-A2 - No Replies

Code:
/*
  RS485 Modbus Temperature and Humidity Sensor Reader
  Made by KinCony: https://www.kincony.com
 
  This program reads temperature and humidity data from a Modbus RS485 sensor
  and prints the values via the Serial monitor.

  Hardware configuration:
  - RS485 communication using GPIO TX (32) and RX (35)
  - Modbus RTU protocol
  - Temperature and humidity values are stored in separate registers

  You must install the ModbusMaster library in Arduino IDE.
*/

#include <ModbusMaster.h>  // Include the ModbusMaster library for Modbus communication

// Define GPIO pins for RS485 communication (TX and RX)
#define TXD_PIN 32  // Transmit pin for RS485
#define RXD_PIN 35  // Receive pin for RS485

// Define the Modbus slave ID (this should match the sensor's address)
#define SLAVE_ID 1

// Create a ModbusMaster object to handle Modbus communication
ModbusMaster node;

/*
  This function is called before starting a Modbus transmission.
  If your hardware needs control of RS485 DE/RE pins, configure them here.
*/
void preTransmission()
{
  // Optional: Control DE/RE pins for RS485 if necessary
}

/*
  This function is called after completing a Modbus transmission.
  If your hardware needs to reset DE/RE pins, configure them here.
*/
void postTransmission()
{
  // Optional: Control DE/RE pins for RS485 if necessary
}

void setup()
{
  // Start the Serial communication for debugging at 9600 baud rate
  Serial.begin(9600);
 
  // Start Serial2 for RS485 communication using GPIO 32 (TX) and GPIO 35 (RX) at 9600 baud rate
  Serial2.begin(9600, SERIAL_8N1, RXD_PIN, TXD_PIN);

  // Initialize the Modbus communication with the slave ID and associate it with Serial2
  node.begin(SLAVE_ID, Serial2);

  // Set the pre- and post-transmission handlers for controlling RS485 hardware if needed
  node.preTransmission(preTransmission);
  node.postTransmission(postTransmission);

  // Print an initial message to Serial monitor
  Serial.println("RS485 Modbus Sensor Example - Reading Temperature and Humidity");
}

void loop()
{
  uint8_t result;  // Variable to store the result of Modbus operations
  uint16_t data[2];  // Array to store the raw temperature and humidity data from the sensor

  // Read two input registers starting from address 0x0000, where temperature and humidity are stored
  result = node.readInputRegisters(0x0000, 2);  // Read 2 registers (temperature and humidity)

  // Check if the read operation was successful
  if (result == node.ku8MBSuccess)
  {
    // Retrieve raw temperature and humidity data from Modbus response buffer
    uint16_t temperatureRaw = node.getResponseBuffer(0);  // Temperature is in the first register
    uint16_t humidityRaw = node.getResponseBuffer(1);     // Humidity is in the second register

    // Parse temperature value
    float temperature;
    if (temperatureRaw < 10000)  // Check if the value represents a positive temperature
      temperature = temperatureRaw * 0.1;  // Positive temperature
    else
      temperature = -1 * (temperatureRaw - 10000) * 0.1;  // Negative temperature

    // Parse humidity value (always positive)
    float humidity = humidityRaw * 0.1;

    // Print the parsed temperature value to the Serial monitor
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.println(" °C");

    // Print the parsed humidity value to the Serial monitor
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.println(" %RH");
  }
  else
  {
    // If the read operation failed, print the error code to the Serial monitor
    Serial.print("Failed to read from sensor, error: ");
    Serial.println(result);
  }

  // Wait for 5 seconds before reading the sensor again
  delay(5000);
}
   
   
arduino ino file download:
.zip   rs485-sensor.zip (Size: 1.47 KB / Downloads: 42)
BIN file (you can use esp32 download tool download to ESP32 with address 0x0 then directly to use) download:
.zip   rs485-sensor.ino.merged.zip (Size: 172.69 KB / Downloads: 37)

Print this item

  B16M vS A16
Posted by: admin - 10-08-2024, 11:38 AM - Forum: KC868-A16 - No Replies

   

Print this item

  A32 Pro ESPHome yaml include RS485 modbus temperature humidity sensor
Posted by: admin - 10-08-2024, 01:51 AM - Forum: KC868-A32/A32 Pro - Replies (17)

   
   
here we use RS485 long distance sensor connect with A32 Pro controller using A and B.
the sensor default setting is 9600bps, RS485 address is 1
   
we can use USB-RS485 adapter connect PC with sensor , monitor the sensor value, or maybe you want change the sensor address and baud rate, so just use PC software to set. Then we can let sensor connect to A32 Pro's RS485 port directly.
   
mainly add these code for modbus:
uart:
  - id: uart_modbus
    baud_rate: 9600
    tx_pin: 9
    rx_pin: 8


# Config Modbus
modbus:
  uart_id: uart_modbus
  id: modbus1

modbus_controller:
  - id: modbus_sensor
    address: 0x01  # device address
    modbus_id: modbus1


sensor:
  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Temperature Sensor"
    id: temperature_sensor
    address: 0x0000
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
   
  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Humidity Sensor"
    id: humidity_sensor
    address: 0x0001
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "%"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1


whole ESPHome ymal code:

Code:
esphome:
  name: a32-pro-arduino
  friendly_name: a32-Pro-arduino
  platformio_options:
    board_build.extra_flags:
      # WIFI_CONTROL_SELF_MODE = 0
      # WIFI_CONTROL_SELF_MODE = 1
      - "-DWIFI_CONTROL_SELF_MODE=0"

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-tuya-wifi-mcu
      ref: v1.2.0

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

# Enable logging
# logger:

# Enable Home Assistant API
api:
  encryption:
    key: "fBpihEYPVlfKaE4ZIcY0uRcJ134u7DBKzzskk994+Lw="

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO44
  miso_pin: GPIO40
  cs_pin: GPIO39
  interrupt_pin: GPIO41
  reset_pin: GPIO43

uart:
  - id: uart_modbus
    baud_rate: 9600
    tx_pin: 9
    rx_pin: 8

  - id: tuya_mcu_uart
    baud_rate: 9600
    tx_pin: 15
    rx_pin: 16

tuya_wifi_mcu:
  # tuya mcu product id
  product_id: fwy7fk4mzay3kern
  uart_id: tuya_mcu_uart
  wifi_reset_pin: 21
  wifi_led_pin: 45

# Config Modbus
modbus:
  uart_id: uart_modbus
  id: modbus1

modbus_controller:
  - id: modbus_sensor
    address: 0x01  # device address
    modbus_id: modbus1

i2c:
   - id: bus_a
     sda: 11
     scl: 10
     scan: true
     frequency: 400kHz

xl9535:
  - id: xl9535_hub_out1 # for output channel 1-16
    address: 0x21
  - id: xl9535_hub_out2 # for output channel 17-32
    address: 0x22
  - id: xl9535_hub_in1 # for input channel 1-16
    address: 0x24
  - id: xl9535_hub_in2 # for input channel 17-32
    address: 0x25

pcf8574:
  - id: 'pcf8574_in_3'  # for input channel 33-40
    address: 0x23



switch:

  - platform: gpio
    pin: 45
    name: "LED"

  - platform: gpio
    name: A32 Pro Switch01
    id: "a32_pro_switch01"
    pin:
      xl9535: xl9535_hub_out1
      number: 0
      mode: OUTPUT
      inverted: true
 
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch01 Tuya
    dp_id: 101
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch01"
 
 
  - platform: gpio
    name: A32 Pro Switch02
    id: "a32_pro_switch02"
    pin:
      xl9535: xl9535_hub_out1
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch02 Tuya
    dp_id: 102
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch02"

  - platform: gpio
    name: A32 Pro Switch03
    id: "a32_pro_switch03"
    pin:
      xl9535: xl9535_hub_out1
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch03 Tuya
    dp_id: 103
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch03"

  - platform: gpio
    name: A32 Pro Switch04
    id: "a32_pro_switch04"
    pin:
      xl9535: xl9535_hub_out1
      number: 3
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch04 Tuya
    dp_id: 104
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch04"

  - platform: gpio
    name: A32 Pro Switch05
    id: "a32_pro_switch05"
    pin:
      xl9535: xl9535_hub_out1
      number: 4
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch05 Tuya
    dp_id: 105
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch05"

  - platform: gpio
    name: A32 Pro Switch06
    id: "a32_pro_switch06"
    pin:
      xl9535: xl9535_hub_out1
      number: 5
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch06 Tuya
    dp_id: 106
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch06"

  - platform: gpio
    name: A32 Pro Switch07
    id: "a32_pro_switch07"
    pin:
      xl9535: xl9535_hub_out1
      number: 6
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch07 Tuya
    dp_id: 107
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch07"

  - platform: gpio
    name: A32 Pro Switch08
    id: "a32_pro_switch08"
    pin:
      xl9535: xl9535_hub_out1
      number: 7
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch08 Tuya
    dp_id: 108
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch08"

  - platform: gpio
    name: A32 Pro Switch09
    id: "a32_pro_switch09"
    pin:
      xl9535: xl9535_hub_out1
      number: 10
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch09 Tuya
    dp_id: 109
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch09"

  - platform: gpio
    name: A32 Pro Switch10
    id: "a32_pro_switch10"
    pin:
      xl9535: xl9535_hub_out1
      number: 11
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch10 Tuya
    dp_id: 110
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch10"

  - platform: gpio
    name: A32 Pro Switch11
    id: "a32_pro_switch11"
    pin:
      xl9535: xl9535_hub_out1
      number: 12
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch11 Tuya
    dp_id: 111
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch11"

  - platform: gpio
    name: A32 Pro Switch12
    id: "a32_pro_switch12"
    pin:
      xl9535: xl9535_hub_out1
      number: 13
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch12 Tuya
    dp_id: 112
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch12"

  - platform: gpio
    name: A32 Pro Switch13
    id: "a32_pro_switch13"
    pin:
      xl9535: xl9535_hub_out1
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch13 Tuya
    dp_id: 113
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch13"

  - platform: gpio
    name: A32 Pro Switch14
    id: "a32_pro_switch14"
    pin:
      xl9535: xl9535_hub_out1
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch14 Tuya
    dp_id: 114
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch14"

  - platform: gpio
    name: A32 Pro Switch15
    id: "a32_pro_switch15"
    pin:
      xl9535: xl9535_hub_out1
      number: 16
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch15 Tuya
    dp_id: 115
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch15"

  - platform: gpio
    name: A32 Pro Switch16
    id: "a32_pro_switch16"
    pin:
      xl9535: xl9535_hub_out1
      number: 17
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch16 Tuya
    dp_id: 116
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch16"

  - platform: gpio
    name: A32 Pro Switch17
    id: "a32_pro_switch17"
    pin:
      xl9535: xl9535_hub_out2
      number: 0
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch17 Tuya
    dp_id: 117
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch17"

  - platform: gpio
    name: A32 Pro Switch18
    id: "a32_pro_switch18"
    pin:
      xl9535: xl9535_hub_out2
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch18 Tuya
    dp_id: 118
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch18"

  - platform: gpio
    name: A32 Pro Switch19
    id: "a32_pro_switch19"
    pin:
      xl9535: xl9535_hub_out2
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch19 Tuya
    dp_id: 119
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch19"

  - platform: gpio
    name: A32 Pro Switch20
    id: "a32_pro_switch20"
    pin:
      xl9535: xl9535_hub_out2
      number: 3
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch20 Tuya
    dp_id: 120
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch20"

  - platform: gpio
    name: A32 Pro Switch21
    id: "a32_pro_switch21"
    pin:
      xl9535: xl9535_hub_out2
      number: 4
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch21 Tuya
    dp_id: 121
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch21"

  - platform: gpio
    name: A32 Pro Switch22
    id: "a32_pro_switch22"
    pin:
      xl9535: xl9535_hub_out2
      number: 5
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch22 Tuya
    dp_id: 122
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch22"

  - platform: gpio
    name: A32 Pro Switch23
    id: "a32_pro_switch23"
    pin:
      xl9535: xl9535_hub_out2
      number: 6
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch23 Tuya
    dp_id: 123
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch23"

  - platform: gpio
    name: A32 Pro Switch24
    id: "a32_pro_switch24"
    pin:
      xl9535: xl9535_hub_out2
      number: 7
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch24 Tuya
    dp_id: 124
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch24"

  - platform: gpio
    name: A32 Pro Switch25
    id: "a32_pro_switch25"
    pin:
      xl9535: xl9535_hub_out2
      number: 10
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch25 Tuya
    dp_id: 125
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch25"

  - platform: gpio
    name: A32 Pro Switch26
    id: "a32_pro_switch26"
    pin:
      xl9535: xl9535_hub_out2
      number: 11
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch26 Tuya
    dp_id: 126
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch26"

  - platform: gpio
    name: A32 Pro Switch27
    id: "a32_pro_switch27"
    pin:
      xl9535: xl9535_hub_out2
      number: 12
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch27 Tuya
    dp_id: 127
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch27"

  - platform: gpio
    name: A32 Pro Switch28
    id: "a32_pro_switch28"
    pin:
      xl9535: xl9535_hub_out2
      number: 13
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch28 Tuya
    dp_id: 128
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch28"

  - platform: gpio
    name: A32 Pro Switch29
    id: "a32_pro_switch29"
    pin:
      xl9535: xl9535_hub_out2
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch29 Tuya
    dp_id: 129
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch29"

  - platform: gpio
    name: A32 Pro Switch30
    id: "a32_pro_switch30"
    pin:
      xl9535: xl9535_hub_out2
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch30 Tuya
    dp_id: 130
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch30"

  - platform: gpio
    name: A32 Pro Switch31
    id: "a32_pro_switch31"
    pin:
      xl9535: xl9535_hub_out2
      number: 16
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch31 Tuya
    dp_id: 131
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch31"

  - platform: gpio
    name: A32 Pro Switch32
    id: "a32_pro_switch32"
    pin:
      xl9535: xl9535_hub_out2
      number: 17
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro Switch32 Tuya
    dp_id: 132
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "a32_pro_switch32"

binary_sensor:
  - platform: gpio
    name: A32 Pro DI01

    on_press:
      then:
        - switch.toggle: a32_pro_switch01

    id: "a32_pro_di01"
    pin:
      xl9535: xl9535_hub_in1
      number: 0
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI01 Tuya
    dp_id: 133
    bind_binary_sensor_id: a32_pro_di01
    internal: true



  - platform: gpio
    name: A32 Pro DI02
    id: "a32_pro_di02"
    pin:
      xl9535: xl9535_hub_in1
      number: 1
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI02 Tuya
    dp_id: 134
    bind_binary_sensor_id: a32_pro_di02
    internal: true

  - platform: gpio
    name: A32 Pro DI03
    id: "a32_pro_di03"
    pin:
      xl9535: xl9535_hub_in1
      number: 2
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI03 Tuya
    dp_id: 135
    bind_binary_sensor_id: a32_pro_di03
    internal: true

  - platform: gpio
    name: A32 Pro DI04
    id: "a32_pro_di04"
    pin:
      xl9535: xl9535_hub_in1
      number: 3
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: A32 Pro DI04 Tuya
    dp_id: 136
    bind_binary_sensor_id: a32_pro_di04
    internal: true

  - platform: gpio
    name: A32 Pro DI05
    pin:
      xl9535: xl9535_hub_in1
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI06
    pin:
      xl9535: xl9535_hub_in1
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI07
    pin:
      xl9535: xl9535_hub_in1
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI08
    pin:
      xl9535: xl9535_hub_in1
      number: 7
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI09
    pin:
      xl9535: xl9535_hub_in1
      number: 10
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI10
    pin:
      xl9535: xl9535_hub_in1
      number: 11
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI11
    pin:
      xl9535: xl9535_hub_in1
      number: 12
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI12
    pin:
      xl9535: xl9535_hub_in1
      number: 13
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI13
    pin:
      xl9535: xl9535_hub_in1
      number: 14
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI14
    pin:
      xl9535: xl9535_hub_in1
      number: 15
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI15
    pin:
      xl9535: xl9535_hub_in1
      number: 16
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI16
    pin:
      xl9535: xl9535_hub_in1
      number: 17
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "A32 Pro TMP1"
    pin:
      number: 1
      inverted: true


  - platform: gpio
    name: "A32 Pro TMP2"
    pin:
      number: 2
      inverted: true

  - platform: gpio
    name: "A32 Pro DL"
    pin:
      number: 0
      inverted: true

  - platform: gpio
    name: "A32 Pro DTUYA"
    pin:
      number: 21
      inverted: true

  - platform: gpio
    name: A32 Pro DI17
    pin:
      xl9535: xl9535_hub_in2
      number: 0
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI18
    pin:
      xl9535: xl9535_hub_in2
      number: 1
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI19
    pin:
      xl9535: xl9535_hub_in2
      number: 2
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI20
    pin:
      xl9535: xl9535_hub_in2
      number: 3
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI21
    pin:
      xl9535: xl9535_hub_in2
      number: 4
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI22
    pin:
      xl9535: xl9535_hub_in2
      number: 5
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI23
    pin:
      xl9535: xl9535_hub_in2
      number: 6
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI24
    pin:
      xl9535: xl9535_hub_in2
      number: 7
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI25
    pin:
      xl9535: xl9535_hub_in2
      number: 10
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI26
    pin:
      xl9535: xl9535_hub_in2
      number: 11
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI27
    pin:
      xl9535: xl9535_hub_in2
      number: 12
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI28
    pin:
      xl9535: xl9535_hub_in2
      number: 13
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI29
    pin:
      xl9535: xl9535_hub_in2
      number: 14
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI30
    pin:
      xl9535: xl9535_hub_in2
      number: 15
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI31
    pin:
      xl9535: xl9535_hub_in2
      number: 16
      mode: INPUT
      inverted: true
  - platform: gpio
    name: A32 Pro DI32
    pin:
      xl9535: xl9535_hub_in2
      number: 17
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI33
    pin:
      pcf8574: pcf8574_in_3
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI34
    pin:
      pcf8574: pcf8574_in_3
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI35
    pin:
      pcf8574: pcf8574_in_3
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI36
    pin:
      pcf8574: pcf8574_in_3
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI37
    pin:
      pcf8574: pcf8574_in_3
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI38
    pin:
      pcf8574: pcf8574_in_3
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI39
    pin:
      pcf8574: pcf8574_in_3
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: A32 Pro DI40
    pin:
      pcf8574: pcf8574_in_3
      number: 7
      mode: INPUT
      inverted: true

gp8403:
  id: my_gp8403
  voltage: 10V

output:
  - platform: gp8403
    id: gp8403_output_1
    gp8403_id: my_gp8403
    channel: 0
  - platform: gp8403
    id: gp8403_output_2
    gp8403_id: my_gp8403
    channel: 1

light:
  - platform: monochromatic
    name: "A32 Pro-DAC-0"
    id: a32_pro_dac_0
    output: gp8403_output_1
    gamma_correct: 1.0

  - platform: tuya_wifi_mcu
    name: "Tuya A32 Pro-DAC-0"
    # bind other light, sync state
    bind_light_id: a32_pro_dac_0
    output: gp8403_output_1
    dp_id: 173
    # hide from homeassistant ui
    internal: true
    gamma_correct: 1.0

  - platform: monochromatic
    name: "A32 Pro-DAC-1"
    id: a32_pro_dac_1
    output: gp8403_output_2
    gamma_correct: 1.0

  - platform: tuya_wifi_mcu
    name: "Tuya A32 Pro-DAC-1"
    # bind other light, sync state
    bind_light_id: a32_pro_dac_1
    output: gp8403_output_2
    dp_id: 174
    # hide from homeassistant ui
    internal: true
    gamma_correct: 1.0


sensor:
  - platform: adc
    pin: 7
    name: "A32 Pro A1 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
  - platform: adc
    pin: 6
    name: "A32 Pro A2 Voltage"
    update_interval: 5s
    attenuation: 11db
    filters:
      # - multiply: 1.51515
      - lambda:
          if (x >= 3.11) {
            return x * 1.60256;
          } else if (x <= 0.15) {
            return 0;
          } else {
            return x * 1.51;
          }
  - platform: adc
    pin: 5
    name: "A32 Pro A3 Current"
    update_interval: 5s
    unit_of_measurement: mA
    attenuation: 11db
    filters:
      - multiply: 6.66666666
  - platform: adc
    pin: 4
    name: "A32 Pro A4 Current"
    update_interval: 5s
    unit_of_measurement: mA
    attenuation: 11db
    filters:
      - multiply: 6.66666666

  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Temperature Sensor"
    id: temperature_sensor
    address: 0x0000
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "°C"
    accuracy_decimals: 1
    filters:
      - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1;
   
  - platform: modbus_controller
    modbus_controller_id: modbus_sensor
    name: "RS485 Humidity Sensor"
    id: humidity_sensor
    address: 0x0001
    register_type: holding
    value_type: U_WORD
    unit_of_measurement: "%"
    accuracy_decimals: 1
    filters:
      - multiply: 0.1

web_server:
  port: 80

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "A32 Pro");

   
yaml file download: 
.txt   A32_Pro-ESPHome_arduino_type_RS485_MODBUS_SENSOR.txt (Size: 23.44 KB / Downloads: 42)

RS485 sensor config PC software:
.zip   RS485-sensor-PC-tool.zip (Size: 4.08 MB / Downloads: 51)

Print this item