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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,406
» Latest member: harleybryan
» Forum threads: 2,586
» Forum posts: 13,432

Full Statistics

Online Users
There are currently 57 online users.
» 0 Member(s) | 37 Guest(s)
Amazonbot, Applebot, Bing, Crawl, Facebook, Google, PetalBot, Semrush, Yandex, bot, facebookexternalhit

Latest Threads
AS ESPHome yaml for home ...
Forum: KinCony AS
Last Post: eyevisions
30 minutes ago
» Replies: 17
» Views: 937
How to control RGBW 5pin ...
Forum: KC868-A16
Last Post: MariusM
3 hours ago
» Replies: 14
» Views: 328
error on compling - ethen...
Forum: KC868-A2
Last Post: tugra
7 hours ago
» Replies: 2
» Views: 107
Удлинение провода датчика...
Forum: DIY Project
Last Post: admin
7 hours ago
» Replies: 5
» Views: 20
How to use D1 and D2 dry ...
Forum: KC868-A2
Last Post: admin
8 hours ago
» Replies: 5
» Views: 1,909
change wake up name
Forum: KinCony AS
Last Post: admin
10 hours ago
» Replies: 27
» Views: 229
Using a different pull-up...
Forum: KC868-A16
Last Post: admin
Today, 07:24 AM
» Replies: 5
» Views: 32
K868-A16 433 RF MHz recei...
Forum: KC868-A16
Last Post: admin
Today, 07:23 AM
» Replies: 51
» Views: 49,838
How to Use Single Click, ...
Forum: KC868-E16S/E16P
Last Post: engrezk
Today, 06:28 AM
» Replies: 0
» Views: 9
Manual Control Switches N...
Forum: KC868-E16S/E16P
Last Post: admin
Yesterday, 11:48 PM
» Replies: 3
» Views: 11

  [Arduino source code for KC868-A8M]-01 ADC
Posted by: KinCony Support - 04-14-2023, 03:15 AM - Forum: KC868-A8M - No Replies

Code:
/*Code for KC868-A8S*/
#include "Arduino.h"

#define ANALOG_A1   34        // IO36 
#define ANALOG_A2   35        // IO39   
#define ANALOG_A3   39        // IO34   
#define ANALOG_A4   36        // IO35   
void setup()
{
    Serial.begin(115200);
    delay(1000);

  pinMode(ANALOG_A1,INPUT);
  pinMode(ANALOG_A2,INPUT);
  pinMode(ANALOG_A3,INPUT);
  pinMode(ANALOG_A4,INPUT);
}

void loop()
{
  if(analogRead(ANALOG_A1)!=0)
    {  Serial.printf("A1 on Pin(%d)=%d\n",ANALOG_A1,analogRead(ANALOG_A1));delay(500);}
  if(analogRead(ANALOG_A2)!=0)
    {  Serial.printf("A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));delay(500);}
  if(analogRead(ANALOG_A3)!=0)
    {  Serial.printf("A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));delay(500);}
  if(analogRead(ANALOG_A4)!=0)
    {  Serial.printf("A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));delay(500);}

}
[Arduino source code for KC868-A8M]-01 ADC



Attached Files
.zip   KC868-A8M_ADC.zip (Size: 643 bytes / Downloads: 202)
Print this item

  [Arduino source code for KC868-A16S]-06 DS18B20
Posted by: KinCony Support - 04-14-2023, 02:47 AM - Forum: KC868-A16S - No Replies

Code:
#include <DS18B20.h>

#define A16S_RS485_RX  32
#define A16S_RS485_TX  33
#define DL 0
DS18B20 ds(14);

void setup() {
  Serial.begin(115200);
  Serial2.begin(115200,SERIAL_8N1,A16S_RS485_RX,A16S_RS485_TX); //A16S
  Serial2.println("A16S RS485 SEND OK");
  pinMode(DL,INPUT);
  Serial2.print(ds.getTempC());
  Serial2.println(" C");
}
void loop() {
  if(digitalRead(DL)==LOW)
  {
    delay(20);
     if(digitalRead(DL)==LOW)
  {
    Serial2.println("Download key ok");
    Serial2.print(ds.getTempC());
    Serial2.println(" C");
   
  }
  }
  while(Serial2.available()>0)
   {
    Serial2.print((char)Serial2.read());//print rs485 receive
   }
   delay(200);
}
[Arduino source code for KC868-A16S]-06 DS18B20



Attached Files
.zip   A16S_DS18B20.zip (Size: 852 bytes / Downloads: 190)
Print this item

  [Arduino source code for KC868-A16S]-05 LAN8720_UDP
Posted by: KinCony Support - 04-14-2023, 02:46 AM - Forum: KC868-A16S - No Replies

Code:
#include <ETH.h>
#include <WiFiUdp.h>

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN   18   
#define ETH_TYPE       ETH_PHY_LAN8720
#define ETH_CLK_MODE   ETH_CLOCK_GPIO17_OUT

WiFiUDP Udp;                      //Create UDP object
unsigned int localUdpPort = 4196; //local port

// Set it based on the IP address of the router
IPAddress local_ip(192, 168, 1, 200);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(192, 168, 1, 1);

void setup()
{
  Serial.begin(115200);
  Serial.println();
   
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH

  // write confir for static IP, gateway,subnet,dns1,dns2
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
    Serial.println("LAN8720 Configuration failed.");
  }else{Serial.println("LAN8720 Configuration success.");}
 
/* while(!((uint32_t)ETH.localIP())) //wait for IP
  {

  }*/
  Serial.println("Connected");
  Serial.print("IP Address:");
  Serial.println(ETH.localIP());

  Udp.begin(localUdpPort); //begin UDP listener
}

void loop()
{
  int packetSize = Udp.parsePacket(); //get package size
  if (packetSize)                     //if have received data
  {
    char buf[packetSize];
    Udp.read(buf, packetSize); //read current data

    Serial.println();
    Serial.print("Received: ");
    Serial.println(buf);
    Serial.print("From IP: ");
    Serial.println(Udp.remoteIP());
    Serial.print("From Port: ");
    Serial.println(Udp.remotePort());

    Udp.beginPacket(Udp.remoteIP(), Udp.remotePort()); //ready to send data
    Udp.print("Received: ");   
    Udp.write((const uint8_t*)buf, packetSize); //copy data to sender buffer
    Udp.endPacket();            //send data
  }
}
[Arduino source code for KC868-A16S]-05 LAN8720_UDP



Attached Files
.zip   A16S_LAN8720_UDP.zip (Size: 1.1 KB / Downloads: 186)
Print this item

  [Arduino source code for KC868-A16S]-04 ADC_code
Posted by: KinCony Support - 04-14-2023, 02:46 AM - Forum: KC868-A16S - No Replies

Code:
#include "Arduino.h"

#define ANALOG_A1   36       
#define ANALOG_A2   34           
#define ANALOG_A3   35       
#define ANALOG_A4   39       

void setup()
{
    Serial.begin(115200);
    delay(1000);

  pinMode(ANALOG_A1,INPUT);
  pinMode(ANALOG_A2,INPUT);
  pinMode(ANALOG_A3,INPUT);
  pinMode(ANALOG_A4,INPUT);
}

void loop()
{
  if(digitalRead(ANALOG_A1)!=0){
    Serial.printf("A1 on Pin(%d)=%d\n",ANALOG_A1,analogRead(ANALOG_A1));
  }
  if(digitalRead(ANALOG_A2)!=0){
    Serial.printf("A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));
  }

  if(digitalRead(ANALOG_A3)!=0){
    Serial.printf("A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));
  }

  if(digitalRead(ANALOG_A4)!=0){
    Serial.printf("A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));
  }
  delay(100);

}
[Arduino source code for KC868-A16S]-04 ADC_code



Attached Files
.zip   A16S_ADC.zip (Size: 580 bytes / Downloads: 174)
Print this item

  [Arduino source code for KC868-A16S]-03 433_DECODE
Posted by: KinCony Support - 04-14-2023, 02:46 AM - Forum: KC868-A16S - No Replies

Code:
#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableReceive(digitalPinToInterrupt(16));   
}

void loop() {
  if (mySwitch.available()) {
   
    Serial.print("Received ");
    Serial.print( mySwitch.getReceivedValue() );
    Serial.print(" / ");
    Serial.print( mySwitch.getReceivedBitlength() );
    Serial.print("bit ");
    Serial.print("Protocol: ");
    Serial.println( mySwitch.getReceivedProtocol() );

    mySwitch.resetAvailable();
  }
}
[Arduino source code for KC868-A16S]-03 433_DECODE



Attached Files
.zip   A16S_433-decode.zip (Size: 584 bytes / Downloads: 185)
Print this item

  [Arduino source code for KC868-A16S]-02 PCF8574-OUTPUT
Posted by: KinCony Support - 04-14-2023, 02:45 AM - Forum: KC868-A16S - Replies (3)

Code:
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address
PCF8574 pcf8574_1(0x24,4,5);
PCF8574 pcf8574_2(0x25,4,5);

void setup()
{
  Serial.begin(115200);
//  delay(1000);

  // Set pinMode to OUTPUT
  pcf8574_1.pinMode(P0, OUTPUT);
  pcf8574_1.pinMode(P1, OUTPUT);
  pcf8574_1.pinMode(P2, OUTPUT);
  pcf8574_1.pinMode(P3, OUTPUT);
  pcf8574_1.pinMode(P4, OUTPUT);
  pcf8574_1.pinMode(P5, OUTPUT);
  pcf8574_1.pinMode(P6, OUTPUT);
  pcf8574_1.pinMode(P7, OUTPUT);

  pcf8574_2.pinMode(P0, OUTPUT);
  pcf8574_2.pinMode(P1, OUTPUT);
  pcf8574_2.pinMode(P2, OUTPUT);
  pcf8574_2.pinMode(P3, OUTPUT);
  pcf8574_2.pinMode(P4, OUTPUT);
  pcf8574_2.pinMode(P5, OUTPUT);
  pcf8574_2.pinMode(P6, OUTPUT);
  pcf8574_2.pinMode(P7, OUTPUT);


  Serial.print("Init pcf8574_1...");
  if (pcf8574_1.begin()){
    Serial.println("PCF8574_1_OK");
  }else{
    Serial.println("PCF8574_1_KO");
  }

  Serial.print("Init pcf8574_2...");
  if (pcf8574_2.begin()){
    Serial.println("PCF8574_2_OK");
  }else{
    Serial.println("PCF8574_2_KO");
  }


}

void loop()
{
  for(int i=0;i<=7;i++)
  {
    pcf8574_1.digitalWrite(i, LOW);
    delay(500);
  }
  for(int j=0;j<=7;j++)
  {
    pcf8574_2.digitalWrite(j,LOW);
    delay(500);
  }
for(int i=0;i<=7;i++)
  {
    pcf8574_1.digitalWrite(i, HIGH);
    delay(500);
  }
  for(int j=0;j<=7;j++)
  {
    pcf8574_2.digitalWrite(j,HIGH);
    delay(500);
  }
 
}
[Arduino source code for KC868-A16S]-02 PCF8574-OUTPUT



Attached Files
.zip   A16S_RELAY_OUT.zip (Size: 717 bytes / Downloads: 216)
Print this item

  [Arduino source code for KC868-A16S]-01 PCF8574-INPUT
Posted by: KinCony Support - 04-14-2023, 02:45 AM - Forum: KC868-A16S - No Replies

Code:
#include "Arduino.h"
#include "PCF8574.h"

// Set i2c address

PCF8574 pcf8574_1(0x24,4,5);
PCF8574 pcf8574_2(0x25,4,5);

PCF8574 pcf8574_IN1(0x22,4,5);
PCF8574 pcf8574_IN2(0x23,4,5);

void setup()
{
  Serial.begin(115200);
//  delay(1000);

  // Set pinMode to OUTPUT
  for(int i=0;i<=7;i++)
  {
    pcf8574_IN1.pinMode(i, INPUT);
  }
  for(int i=0;i<=7;i++)
  {
    pcf8574_IN2.pinMode(i, INPUT);
  }

  for(int i=0;i<=7;i++)
  {
    pcf8574_1.pinMode(i, OUTPUT);
  }

  for(int i=0;i<=7;i++)
  {
    pcf8574_2.pinMode(i,OUTPUT);
  }

    pcf8574_1.begin();
    pcf8574_2.begin();
    pcf8574_IN1.begin();
    pcf8574_IN2.begin();
  /*pcf8574_IN1.pinMode(P0, INPUT);
  pcf8574_IN1.pinMode(P1, INPUT);
  pcf8574_IN1.pinMode(P2, INPUT);
  pcf8574_IN1.pinMode(P3, INPUT);
  pcf8574_IN1.pinMode(P4, INPUT);
  pcf8574_IN1.pinMode(P5, INPUT);
  pcf8574_IN1.pinMode(P6, INPUT);
  pcf8574_IN1.pinMode(P7, INPUT);

  pcf8574_IN2.pinMode(P0, INPUT);
  pcf8574_IN2.pinMode(P1, INPUT);
  pcf8574_IN2.pinMode(P2, INPUT);
  pcf8574_IN2.pinMode(P3, INPUT);
  pcf8574_IN2.pinMode(P4, INPUT);
  pcf8574_IN2.pinMode(P5, INPUT);
  pcf8574_IN2.pinMode(P6, INPUT);
  pcf8574_IN2.pinMode(P7, INPUT);

pcf8574_IN1.begin();
pcf8574_IN2.begin();
  /*Serial.print("Init pcf8574_IN1...");
  if (pcf8574_IN1.begin()){
    Serial.println("pcf8574_IN1_OK");
  }else{
    Serial.println("pcf8574_IN1_KO");
  }

  Serial.print("Init pcf8574_IN2...");
  if (pcf8574_IN2.begin()){
    Serial.println("pcf8574_IN2_OK");
  }else{
    Serial.println("pcf8574_IN2_KO");
  }*/


}

void loop()
{
    for(int i=0;i<=7;i++)
    {
      if(pcf8574_IN1.digitalRead(i)==LOW)
      {
        Serial.printf("KEY  %d PRESSED\n",i+1);
        pcf8574_1.digitalWrite(i,LOW);
      }else pcf8574_1.digitalWrite(i,HIGH);
      delay(10);
    }


for(int i=0;i<=7;i++)
    {
      if(pcf8574_IN2.digitalRead(i)==LOW)
      {
        Serial.printf("KEY %d PRESSED\n",i+9);
        pcf8574_2.digitalWrite(i,LOW);
      }else pcf8574_2.digitalWrite(i,HIGH);
      delay(10);
    }
 
}
[Arduino source code for KC868-A16S]-01 PCF8574-INPUT



Attached Files
.zip   A16S__INPUT.zip (Size: 824 bytes / Downloads: 208)
Print this item

  KC868-A8M configure yaml for ESPhome
Posted by: admin - 04-14-2023, 02:10 AM - Forum: KC868-A8M - Replies (11)

esphome:
  name: a8m
  platform: ESP32
  board: esp32dev
 
 
remote_receiver:
  pin: 16
  dump:
    - rc_switch
  tolerance: 50%
  filter: 250us
  idle: 2ms
  buffer_size: 2kb



# Example configuration entry for ESP32
i2c:
  sda: 5
  scl: 4
  scan: true
  id: bus_a


# 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: 192.168.1.199
    gateway: 192.168.1.1
    subnet: 255.255.255.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
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
     
     
     
  - platform: gpio
    name: "curtain1-down"
    id: relay6
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true
     

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

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

     
binary_sensor:
  - platform: gpio
    name: "input1"
    on_press:
      then:
        - switch.toggle: light1
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - 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

  - platform: remote_receiver
    name: "remoter1"
    rc_switch_raw:
      code: '000101000101010100000011'
      protocol: 2
    on_press:
      then:
        - switch.toggle: light1
    filters:
      - delayed_off: 200ms

  - platform: remote_receiver
    name: "remoter2"
    rc_switch_raw:
      code: '000101000101010100001100'
      protocol: 2
    on_press:
      then:
        - switch.toggle: light2
    filters:
      - delayed_off: 200ms
     
  - platform: remote_receiver
    name: "remoter3"
    rc_switch_raw:
      code: '001111010111001010110100'
      protocol: 2
    on_press:
      then:
        - switch.toggle: light3
    filters:
      - delayed_off: 200ms
     
  - platform: remote_receiver
    name: "remoter4"
    rc_switch_raw:
      code: '001111010111001010111001'
      protocol: 2
    on_press:
      then:
        - switch.toggle: light4
    filters:
      - delayed_off: 200ms 
   
  - platform: remote_receiver
    name: "remoter5"
    rc_switch_raw:
      code: '001111010111001010110010'
      protocol: 2
    on_press:
      then:
        - switch.toggle: relay5
    filters:
      - delayed_off: 200ms

  - platform: remote_receiver
    name: "remoter6"
    rc_switch_raw:
      code: '001111010111001010110101'
      protocol: 2
    on_press:
      then:
        - switch.toggle: relay6
    filters:
      - delayed_off: 200ms
     
  - platform: remote_receiver
    name: "remoter7"
    rc_switch_raw:
      code: '001111010111001010110001'
      protocol: 2
    on_press:
      then:
        - switch.toggle: relay7
    filters:
      - delayed_off: 200ms
     
  - platform: remote_receiver
    name: "remoter8"
    rc_switch_raw:
      code: '001111010111001010110011'
      protocol: 2
    on_press:
      then:
        - switch.toggle: relay8
    filters:
      - delayed_off: 200ms
     

# Enable logging
logger:

# Enable Home Assistant API
api:


.txt   KC868-A8M-ha-config.txt (Size: 5.68 KB / Downloads: 284)

Print this item

  KC868-A8M ESP32 I/O pin define
Posted by: admin - 04-14-2023, 02:09 AM - Forum: KC868-A8M - No Replies

#define ANALOG_A1  34
#define ANALOG_A2  35
#define ANALOG_A3  36
#define ANALOG_A4  39

IIC SDA:5
IIC SCL:4

Relay_IIC_address 0x24

Input_IIC_address 0x22

DS18B20/DHT11/DHT21/LED strip -2: 14

RF433MHz wireless receiver: 16


Ethernet (LAN8720) I/O define:

#define ETH_ADDR        0
#define ETH_POWER_PIN  -1
#define ETH_MDC_PIN    23
#define ETH_MDIO_PIN  18
#define ETH_TYPE      ETH_PHY_LAN8720
#define ETH_CLK_MODE  ETH_CLOCK_GPIO17_OUT


GSM/RS485:
RXD:GPIO15
TXD:GPIO13

CAN bus:
TXD:GPIO32
RXD:GPIO33

Print this item

  KC868-A16S configure yaml for ESPhome
Posted by: admin - 04-14-2023, 02:08 AM - Forum: KC868-A16S - Replies (19)

   

esphome:
  name: kc868-a16s
  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

  # Optional manual IP
#  manual_ip:
#    static_ip: 192.168.1.199
#    gateway: 192.168.1.1
#    subnet: 255.255.255.0 


# Example configuration entry
pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-8
    address: 0x24

  - id: 'pcf8574_hub_out_2'  # for output channel 9-16
    address: 0x25

  - id: 'pcf8574_hub_in_1'  # for input channel 1-8
    address: 0x22

  - id: 'pcf8574_hub_in_2'  # for input channel 9-16
    address: 0x23

# Individual outputs
switch:
  - platform: gpio
    name: "a16s-output1"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16s-output2"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output3"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output4"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output5"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output6"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16s-output7"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output8"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output9"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 0
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16s-output10"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 1
      mode: OUTPUT
      inverted: true

  - platform: gpio
    name: "a16s-output11"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 2
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output12"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 3
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output13"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 4
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output14"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 5
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output15"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 6
      mode: OUTPUT
      inverted: true
     
  - platform: gpio
    name: "a16s-output16"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 7
      mode: OUTPUT
      inverted: true
     
binary_sensor:
  - platform: gpio
    name: "a16s-input1"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input2"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input3"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input4"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input5"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input6"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input7"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input8"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input9"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 0
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input10"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 1
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input11"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 2
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input12"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 3
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input13"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 4
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input14"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 5
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input15"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 6
      mode: INPUT
      inverted: true

  - platform: gpio
    name: "a16s-input16"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true

# Enable logging
logger:

# Enable Home Assistant API
api:


.txt   Made_for_ESPHome_KC868-A16S.txt (Size: 5.63 KB / Downloads: 431)

Print this item