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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,129
» Latest member: 3patiokgamesz
» Forum threads: 4,063
» Forum posts: 20,400

Full Statistics

Online Users
There are currently 10 online users.
» 0 Member(s) | 4 Guest(s)
Amazonbot, Crawl, bot

Latest Threads
KC868-A32 PCB layout CAD ...
Forum: Schematic & diagram & Dimensions of KinCony PCB layout CAD file
Last Post: admin
5 minutes ago
» Replies: 0
» Views: 1
Help with Product Slectio...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
1 hour ago
» Replies: 9
» Views: 583
Input real isolation
Forum: KC868-AI
Last Post: admin
1 hour ago
» Replies: 3
» Views: 15
KC868-A8 OpenPLC Function...
Forum: KC868-A8
Last Post: admin
11 hours ago
» Replies: 0
» Views: 10
KinCony Pi5M16 – Raspberr...
Forum: News
Last Post: admin
11 hours ago
» Replies: 0
» Views: 10
KinCony Pi5R16 – Raspberr...
Forum: News
Last Post: admin
Yesterday, 12:59 PM
» Replies: 0
» Views: 8
E16v3 - CE
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
Yesterday, 12:53 PM
» Replies: 9
» Views: 489
B4 Smart Controller Wirin...
Forum: B4
Last Post: admin
Yesterday, 11:55 AM
» Replies: 4
» Views: 131
M30 Power Factor
Forum: KC868-M16 / M1 / MB / M30
Last Post: admin
06-03-2026, 12:37 PM
» Replies: 1
» Views: 37
Digital Input de-bounce
Forum: KC868-A6
Last Post: l0v4szl
06-01-2026, 09:40 PM
» Replies: 2
» Views: 36

  KinCony ALR ESP32-S3 LoRa SX1278 Gateway released
Posted by: admin - 07-21-2024, 05:18 AM - Forum: News - Replies (6)

We have designed ESP32 LoRa SX1278 Gateway - KinCony ALR. It support install into waterproof box. it use ESP32-S3-WROOM-1U N16R8 chip. small PCB with relay,SSD1306 LCD, 4 channel analog input, digital input, i2c bus extender, 1-wire GPIO, SX1278 LoRa module, DIP switch set for LoRa address.It can use for smart home IoT project use by home assistant. ESP32-S3 also support arduino IDE / MicroPython / ESP-IDF development tool.
[Image: ESP32-LoRa-1.jpg]
[Image: ALR_diagram.jpg]
Hardware resource:
Power supply: DC9-24V
USB-C: download firmware
Buttons: ESP32 Reset and Download
ESP32-S3-WROOM-1U N16R8
SX1278 LoRa module
Relay: MAX Load AC250v10A COM,NO,NC
SSD1306 i2c LCD
8bit DIP switch: set LoRa device address
Analog Input: 4 channel dc 0-5v signal
1-wire: 1 channel
digital input: 1 channel (dry contact signal)
I2C bus: 1

Print this item

  Arduino demo source code for LoRa "Receiver"
Posted by: admin - 07-21-2024, 05:11 AM - Forum: KinCony ALR - Replies (7)

Code:
#include <LoRa.h>
#include <SPI.h>


#include <Wire.h>
#include <Bonezegei_SSD1306.h>
Bonezegei_SSD1306 oled(128, 64);

#define ss 41
#define rst 2
#define dio0 40

#include "Arduino.h"


#define ANALOG_A1   4
#define ANALOG_A2   6
#define ANALOG_A3   5
#define ANALOG_A4   7

const int Relay1 = 48;

const int K1 = 47;
const int K2 = 21;
const int K3 = 14;
const int K4 = 13;
const int K5 = 12;
const int K6 = 11;
const int K7 = 10;
const int K8 = 9;

const int IO0 = 0;  //GPIO0
const int DI1 = 16;  //DI
const int DI2 = 15;  //1-wire


void setup()
{

 
  SPI.begin(42, 43, 44, 41);  //SPI.begin(PIN_SPI_SCK, PIN_SPI_MISO, PIN_SPI_MOSI, -1);   last one is SS not used, use -1
  Wire.begin(39, 38);

  oled.begin();
  oled.clear();
//  oled.drawText(1, 0, "Arial8", oled.Font_Arial8);
  oled.drawText(1, 0, "KinCony", oled.Font_Arial14);
//  oled.drawText(1, 24, "Arial12", oled.Font_Arial12);
//  oled.drawText(1, 40, "Arial14", oled.Font_Arial14);
  oled.draw();  //update the screen
 
  Serial.begin(115200);
  Serial.println("begin");
  LoRa.setPins(ss, rst, dio0);    //setup LoRa transceiver module
 
  while (!LoRa.begin(433E6))     //433E6 - Asia, 866E6 - Europe, 915E6 - North America
  {
    Serial.println(".");
    delay(500);
  }
  LoRa.setSyncWord(0xA5);
  Serial.println("LoRa Initializing OK!");
 
  pinMode(Relay1,OUTPUT);
 
  pinMode(K1,INPUT);
  pinMode(K2,INPUT);
  pinMode(K3,INPUT);
  pinMode(K4,INPUT);
  pinMode(K5,INPUT);
  pinMode(K6,INPUT);
  pinMode(K7,INPUT);
  pinMode(K8,INPUT);
 
  pinMode(DI1,INPUT);
  pinMode(DI2,INPUT);
  pinMode(IO0,INPUT);

  pinMode(ANALOG_A1,INPUT);
  pinMode(ANALOG_A2,INPUT);
  pinMode(ANALOG_A3,INPUT);
  pinMode(ANALOG_A4,INPUT);
  digitalWrite(Relay1, HIGH);
 


}

void loop()
{
uint8_t valk1 = digitalRead(K1);
uint8_t valk2 = digitalRead(K2);
uint8_t valk3 = digitalRead(K3);
uint8_t valk4 = digitalRead(K4);
uint8_t valk5 = digitalRead(K5);
uint8_t valk6 = digitalRead(K6);
uint8_t valk7 = digitalRead(K7);
uint8_t valk8 = digitalRead(K8);

uint8_t valdi1 = digitalRead(DI1);
uint8_t valdi2 = digitalRead(DI2);
uint8_t valIO0 = digitalRead(IO0);

   
if (valdi1==LOW) digitalWrite(Relay1, HIGH); else digitalWrite(Relay1, LOW);
if (digitalRead(DI2)==LOW)Serial.println("input2 down");
if (digitalRead(IO0)==LOW)Serial.println("DL Button down");

if (digitalRead(K1)==LOW)Serial.println("K1 down");
if (digitalRead(K2)==LOW)Serial.println("K2 down");
if (digitalRead(K3)==LOW)Serial.println("K3 down");
if (digitalRead(K4)==LOW)Serial.println("K4 down");
if (digitalRead(K5)==LOW)Serial.println("K5 down");
if (digitalRead(K6)==LOW)Serial.println("K6 down");
if (digitalRead(K7)==LOW)Serial.println("K7 down");
if (digitalRead(K8)==LOW)Serial.println("K8 down");


//-------------------------------------
  if (analogRead(ANALOG_A1)>0) Serial.printf("Current Reading A1 on Pin(%d)=%d\n",ANALOG_A1,analogRead(ANALOG_A1));
  if (analogRead(ANALOG_A2)>0) Serial.printf("Current Reading A2 on Pin(%d)=%d\n",ANALOG_A2,analogRead(ANALOG_A2));
  if (analogRead(ANALOG_A3)>0) Serial.printf("Current Reading A3 on Pin(%d)=%d\n",ANALOG_A3,analogRead(ANALOG_A3));
  if (analogRead(ANALOG_A4)>0) Serial.printf("Current Reading A4 on Pin(%d)=%d\n",ANALOG_A4,analogRead(ANALOG_A4));

//---------------------------------------
  int packetSize = LoRa.parsePacket();    // try to parse packet
  if (packetSize)
  {
   
    Serial.print("Received packet '");

    while (LoRa.available())              // read packet
    {
      String LoRaData = LoRa.readString();
      Serial.print(LoRaData);

      oled.begin();
      oled.clear();
      oled.drawText(1, 0, LoRaData.c_str(), oled.Font_Arial14);
      String temp=String(LoRa.packetRssi());
      oled.drawText(1, 40, temp.c_str(), oled.Font_Arial14);
      oled.draw();  //update the screen
     
    }
    Serial.print("' with RSSI ");         // print RSSI of packet
    Serial.println(LoRa.packetRssi());
  }



}

before use this code, need to install LoRa SX1278 arduino library firstly.
   

Print this item

  Arduino demo source code for LoRa "SENDER"
Posted by: admin - 07-21-2024, 05:10 AM - Forum: KinCony ALR - No Replies

Code:
#include <LoRa.h>
#include <SPI.h>

#define ss 41
#define rst 2
#define dio0 40

int counter = 0;

void setup()
{
  SPI.begin(42, 43, 44, 41);  //SPI.begin(PIN_SPI_SCK, PIN_SPI_MISO, PIN_SPI_MOSI, -1);   last one is SS not used, use -1
  Serial.begin(115200);
  Serial.println("LoRa Sender");

  LoRa.setPins(ss, rst, dio0);    //setup LoRa transceiver module
 
  while (!LoRa.begin(433E6))     //433E6 - Asia, 866E6 - Europe, 915E6 - North America
  {
    Serial.println(".");
    delay(500);
  }
  LoRa.setSyncWord(0xA5);
  Serial.println("LoRa Initializing OK!");
}

void loop()
{
  Serial.print("Sending packet: ");
  Serial.println(counter);

  LoRa.beginPacket();   //Send LoRa packet to receiver
  LoRa.print("KinCony LoRa");
  LoRa.print(counter);
  LoRa.endPacket();

  counter++;

  delay(2000);
}
before use this code, need to install LoRa SX1278 arduino library firstly.
   

Print this item

  KinCony ALR ESP32 I/O pin define
Posted by: admin - 07-21-2024, 05:07 AM - Forum: KinCony ALR - Replies (6)

ANALOG_A1  4
ANALOG_A2  6
ANALOG_A3  5
ANALOG_A4  7

1-wire: 15
digital input:16

DIP switch: use for set LoRa address
DIP-K1:47
DIP-K2:21
DIP-K3:14
DIP-K4:13
DIP-K5:12
DIP-K6:11
DIP-K7:10
DIP-K8:9

relay:48

IIC SDA:39
IIC SCL:38


SPI_Bus: (For SX1278 LoRA)
CS: 41
MOSI: 44
MISO: 43
SCK: 42

RST:2
DIO0:40

Print this item

  how to use KinCony Server16/Server-Mini work with Tuya app
Posted by: admin - 07-21-2024, 12:19 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - No Replies

1. add Kincony Tuya Mqtt component to home assistant by HACS
https://github.com/hzkincony/hass-tuya-mqtt
   
   
   
   
   

2. edit configuration.yaml add the code as sample code:
here is whole configuration.yaml download:

.txt   Server16-Tuya-HA.txt (Size: 6.16 KB / Downloads: 248)

you need to buy Tuya license for Server16 or Server-Mini from KinCony. how to order Tuya license, see here: https://www.kincony.com/forum/showthread.php?tid=2544

after you bought Tuya license, replace these 3 lines with yourself:

  device_id: xxxxxxxxxxxxxxxxxxxxx
  device_secret: xxxxxxxxxxxxxxxxxxx
  region: xx

"bind_id" for switch and binary_sensor, you need search in home assistant -- "Developer tools"--"STATES", input your entity name, then find the ID name.
   
   

3. use Tuya application or smart life application to scan QRcode(we will give you) add device.

4. you can test turn on/off relay and short digital input port.
here are test photo for turn on relay1,2.
   
   

here are test photo for short digital input1 with GND.
   
   

now you can not only use home assistant control device in local network, but also remote control device by internet via tuya application.
   

Print this item

  yaml detail for DI on modbus controller
Posted by: Savino - 07-20-2024, 07:45 PM - Forum: KC868-A6 - Replies (2)

Hello,

where I could find yaml file with details to add digital inputs of kc868-a6 board to modbus-controller?


I have already info to add relay, as following:

- platform: modbus_controller
  name: 'modbus-switch1'
  address: 0 # 0: relay1  1: relay 2 .........
  register_type: coil
  bitmask: 1

I need something similar to add digital inputs to the RS485.

Print this item

Wink MQTT M16v2
Posted by: jojorahu - 07-20-2024, 04:17 AM - Forum: KC868-M16 / M1 / MB / M30 - Replies (1)

Hello


This Arduino sketch can read the 16 channels of the clamps, read the temperature and humidity sensor and send the data to a mqtt broker

att

Jose Joaquin Ramirez



Attached Files
.txt   KC868_M16_MQTT_8ch_demo.ino.txt (Size: 7.49 KB / Downloads: 557)
Print this item

Wink E16P POE Support
Posted by: nickcan - 07-19-2024, 07:08 AM - Forum: KC868-E16S/E16P - Replies (5)

I was referring to the E16P POE design and found that B1601S does not support POE. So how does it work?



Attached Files Thumbnail(s)
   
Print this item

  Nuevo proyecto
Posted by: Familiamoralescalle2024 - 07-18-2024, 07:45 PM - Forum: DIY Project - Replies (3)

Hola Kincony. Tengo un proyecto para mi apartamento, es fácil de usar, 10 interruptores simples y uno doble. Ahora mismo, tengo un control RF para la cortina. También tengo 3 Nesthub de Google en las habitaciones. Quiero saber con qué dispositivo cancela las 11 conexiones wifi de los interruptores y los gestión por relé. Tengo una raspberry pi5 con Home asistente y una puerta Smart lock, cámara Ring, eso es todo, gracias

Print this item

  Problem with Yaml demo file
Posted by: Bigh - 07-18-2024, 11:08 AM - Forum: KC868-A16 - Replies (7)

I am trying to install the A16 rev 1.6 for ESP Home Assistant.
The A16 connects and is recognized
When I try to load the sample YAML file I get an error message
What should I change so that it works properly and I can see all the characteristics of the card and I can program it directly from the software

esphome:
name: kc868-a16
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.100.200
gateway: 192.168.100.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: 0x21
– id: ‘pcf8574_hub_in_2’ # for input channel 9-16
address: 0x22
# Individual outputs
switch:
– platform: gpio
name: “light1”
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
– platform: gpio
name: “light2”
pin:
pcf8574: pcf8574_hub_out_1
number: 1
mode: OUTPUT
inverted: true

Print this item