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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,692
» Latest member: purpleshopcanna
» Forum threads: 4,195
» Forum posts: 20,850

Full Statistics

Online Users
There are currently 77 online users.
» 0 Member(s) | 66 Guest(s)
Amazonbot, Applebot, Baidu, Bing, Crawl, PetalBot, bot

Latest Threads
KC868-meter-7pv-rs485
Forum: Development
Last Post: admin
9 hours ago
» Replies: 7
» Views: 3,744
N60 configure yaml for ES...
Forum: N60
Last Post: admin
08-23-2026, 01:42 AM
» Replies: 7
» Views: 1,917
KCS VERSUS ESPHOME
Forum: "KCS" v3 firmware
Last Post: EDVALDO DE MARINGA
08-22-2026, 01:31 PM
» Replies: 2
» Views: 56
KC868-AGv3
Forum: Getting Started with ESPHome and Home Assistant
Last Post: admin
08-20-2026, 10:18 PM
» Replies: 5
» Views: 126
[arduino code examples fo...
Forum: KC868-A32/A32 Pro
Last Post: huanmarie
08-19-2026, 07:09 AM
» Replies: 2
» Views: 1,627
KC868-H32B V5.08 firmware
Forum: News
Last Post: meoowu77
08-18-2026, 11:46 AM
» Replies: 24
» Views: 8,483
KinCony B2 Smart Controll...
Forum: News
Last Post: admin
08-17-2026, 01:07 PM
» Replies: 0
» Views: 69
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: 92
CT Clamp Compatibility
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
08-16-2026, 11:08 PM
» Replies: 12
» Views: 2,220
N60 Sensor channel label
Forum: N60
Last Post: marekd1
08-14-2026, 09:14 PM
» Replies: 18
» Views: 2,586

  B16M ESPHome yaml for home assistant with tuya
Posted by: admin - 09-27-2024, 02:16 AM - Forum: B16M - No Replies

Code:
esphome:
  name: b16m
  friendly_name: b16m
  platformio_options:
    board_build.flash_mode: dio
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:
  encryption:
    key: "WeVOuL5oNhjXcfzXtTirlOwvtWvCD5yqIxd3oV4es1k="

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

i2c:
   - id: bus_a
     sda: 38
     scl: 39
     scan: true
     frequency: 400kHz

pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16
    i2c_id: bus_a
    address: 0x25
    pcf8575: true

  - id: 'pcf8574_hub_in_1'  # for input channel 1-16
    i2c_id: bus_a
    address: 0x24
    pcf8575: true

uart:
  - id: uart_1
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 18
    rx_pin: 8

switch:
  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "b16m-output01"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output02"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output03"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output04"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output05"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output06"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output07"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output08"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output09"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 8
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output10"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 9
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output11"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 10
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output12"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 11
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output13"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 12
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output14"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 13
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output15"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 14
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "b16m-output16"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 15
      mode: OUTPUT
      inverted: true

binary_sensor:
  - platform: gpio
    name: "b16m-input01"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input02"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input03"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input04"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input05"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input06"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input07"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input08"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input09"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 8
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input10"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 9
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input11"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 10
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input12"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 11
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input13"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 12
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input14"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 13
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input15"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 14
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "b16m-input16"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 15
      mode: INPUT
      inverted: true
##pull-up resistance on PCB
  - platform: gpio
    name: "b16m-W1-io40"
    pin:
      number: 40
      inverted: true

  - platform: gpio
    name: "b16m-W1-io15"
    pin:
      number: 15
      inverted: true

  - platform: gpio
    name: "b16m-W1-io48"
    pin:
      number: 48
      inverted: true

  - platform: gpio
    name: "b16m-W1-io47"
    pin:
      number: 47
      inverted: true
## without resistance on PCB
  - platform: gpio
    name: "b16m-W1-io13"
    pin:
      number: 13
      inverted: false

  - platform: gpio
    name: "b16m-W1-io14"
    pin:
      number: 14
      inverted:  false

  - platform: gpio
    name: "b16m-W1-io21"
    pin:
      number: 21
      inverted: false

ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    resolution: 16_BITS
    name: "ADS1115 Channel A0-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A1_GND'
    gain: 6.144
    name: "ADS1115 Channel A1-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A2_GND'
    gain: 6.144
    name: "ADS1115 Channel A2-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A3_GND'
    gain: 6.144
    name: "ADS1115 Channel A3-GND"
    update_interval: 5s

web_server:
  port: 80
download yaml file:
.txt   B16M_HA.txt (Size: 7.15 KB / Downloads: 752)

Print this item

  B16M ESP32-S3 IO pins define
Posted by: admin - 09-27-2024, 02:13 AM - Forum: B16M - Replies (2)

IIC Bus:

SDA:GPIO38
SCL:GPIO39

PCF8575:U57 (relay1-16): i2c address:0x25
PCF8575:U58 (input1-16): i2c address:0x24

DS3231 RTC i2c address: 0x68
SSD1306 display: i2c address:0x3c
ADS1115 (4CH ADC): i2c address:0x48
-----------------

1-wire (pull-up resistance on PCB):
1-wire1:GPIO40
1-wire2:GPIO15
1-wire3:GPIO48
1-wire4:GPIO47

free GPIOs (without pull-up resistance on PCB):
free gpio-1:GPIO13
free gpio-2:GPIO14
free gpio-3:GPIO21
-----------------

Ethernet (W5500) I/O define:

clk_pin: GPIO42
mosi_pin: GPIO43
miso_pin: GPIO44
cs_pin: GPIO41

interrupt_pin: GPIO2
reset_pin: GPIO1

--------------------
RS485:
RXD:GPIO8
TXD:GPIO18

Tuya module:
RXD:GPIO17
TXD:GPIO16

Tuya network button: Tuya module's P28
Tuya network LED: Tuya module's P16
--------------------
SD Card:
SPI-MOSI:GPIO10
SPI-SCK:GPIO11
SPI-MISO:GPIO12
SPI-CS:GPIO9

Print this item

  ESPHome PCF8575 and XL9535 yaml format define updated
Posted by: admin - 09-25-2024, 12:54 AM - Forum: Getting Started with ESPHome and Home Assistant - No Replies

if using PCF8575 , the pin number will begin 0-7 and 8-15
if using XL9535 , the pin number will begin 0-7 and 10-17

Print this item

  OLED display for A4
Posted by: tarajas - 09-24-2024, 10:02 PM - Forum: KC868-A4 - Replies (6)

Hi,

Is it possible to add an I2C OlED display to the A4 via using the 433MHz PINs? On 1.2.4 board I have those available...

Maybe I could add the display to the DIN plastic enclosure creating a cutout with a dremel and fixing the display with screws, so that some important info could be shown there...

P3 has looking the board from head on:
VCC ? ? GND
Where should the SDA and SCL be connected?

Print this item

  Any plans for KC868-D16 update?
Posted by: VKAN - 09-24-2024, 05:55 PM - Forum: Suggestions and feedback on KinCony's products - Replies (1)

Hi,

Time to time I see that Kincony updates and improves existing boards. Do you considering updating KC868-D16?
Probably running with ESP32?

Print this item

  Free sample for IT/tech education in a countryside school
Posted by: tarajas - 09-24-2024, 05:31 PM - Forum: Apply for free sample product - Replies (1)

Hi,

I was wondering if a countryside school's IT/technology teacher in Hungary (my cousin actually) could be eligible for a sample pack. After my own experiences and hobby tinkering with Kincony products I bought up the idea for my cousin to introduce the product to interested kids at the high school and she is all in about this... potentially sparking more interest out of the average bored student... What is your take on this? Is this an initiative that Kincony could support?

Kind Regards

Print this item

  PIR Sensor A6
Posted by: BalcdLeo - 09-24-2024, 04:46 PM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Hello, everyone!
I'm relatively new to using the models here, so I have a few questions:
I’m trying to connect some sensors for testing. The only one I’ve successfully used is the DHT22, and now I’m attempting to get the PIR Sensor (the cheap ones) to work, but I haven’t been able to do so. Do you know if there’s anything specific regarding the setup, or is it just how the sensor operates?
Regarding the setup, I powered the PIR using both the 12V input of the A6 (the sensor operates from 5V to 20V) and an external power supply. I can see a reading of P0 indicating it’s connected to P0 or P1, P2... Pn. However, when I try to display the data obtained from the sensor, it doesn’t print in the Arduino IDE Serial monitor.
Do you know if these sensors work with the A6? I’m looking to use basic components for future automation projects.
Thank you all!


Here is my code:

#include <Wire.h>
#include "PCF8574.h"

#define SDA 4
#define SCL 15
#define PIR_SENSOR_PIN P0  // P0 pin on PCF8574 for the PIR sensor

PCF8574 pcf8574(0x22, SDA, SCL);  // I2C address 0x22, SDA GPIO4, SCL GPIO15

unsigned long timeElapsed;  // Variable to measure time
int warm_up = 1;  // Variable to control PIR warm-up

void setup() {
  Serial.begin(115200);  // Initialize serial communication
  Serial.println(__FILE__);
  delay(2000);

  Serial.println("System ready!");
  delay(2000);

  pcf8574.pinMode(PIR_SENSOR_PIN, INPUT);  // Set P0 pin as input for the PIR
  Serial.println("Init pcf8574...");
  if (pcf8574.begin()){
      Serial.println("OK");
  } else {
      Serial.println("KO");
  }
}

void loop() {
  // Read the value of the PIR connected to P0 of the PCF8574
  uint8_t sensor_output = pcf8574.digitalRead(PIR_SENSOR_PIN);

  // Check if the PIR detected motion
  if (sensor_output == LOW) {
    Serial.println("PIR ACTIVATED (Nothing detected)");
  } else {
    Serial.println("PIR DETECTED (Motion)");
  }

  delay(200);  // Delay to avoid excessive readings
}

Print this item

  how to check PCF8574/PCF8575 i2c address
Posted by: admin - 09-24-2024, 10:43 AM - Forum: KC868-A series and Uair Smart Controller - No Replies

   

Print this item

  Pulse Counter Sensor
Posted by: remiasz - 09-23-2024, 10:19 PM - Forum: KC868-A series and Uair Smart Controller - No Replies

ESPHome has Pulse Counter Sensor.
In yaml I can set count_mode to increment or decrement.
Can I change count_mode in runtime
My yaml file:

Code:
sensor:
  - platform: pulse_counter
    name: "impulse_counter"
    id: motor_pulse_counter
    pin:
      ...
    update_interval: 1s
    total:
      name: "Total"

binary_sensor:
  - platform: gpio
    name: "input01"
    id: opening
    pin: ...
    on_press:
      then:
        - lambda: |
            id(motor_pulse_counter).set_rising_edge_mode(esphome::pulse_counter::PulseCounterCountMode::PULSE_COUNTER_INCREMENT);

  - platform: gpio
    name: "input02"
    id: closing
    pin: ...
    on_press:
      then:
        - lambda: |
            id(motor_pulse_counter).set_rising_edge_mode(esphome::pulse_counter::PulseCounterCountMode::PULSE_COUNTER_DECREMENT);

I want add precise position to "Feedback Cover" by counting impulses from motor sensor.
But this konfiguration always count up in opening and closing cover.

Print this item

  Power supply
Posted by: salvolivigni - 09-23-2024, 03:38 PM - Forum: KC868-E16S/E16P - Replies (1)

Hi, how many watts does the 12VDC power supply need to have, to power with all 16 relays turned on?

Print this item