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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,982
» Latest member: kamermcw
» Forum threads: 2,429
» Forum posts: 12,559

Full Statistics

Online Users
There are currently 47 online users.
» 0 Member(s) | 34 Guest(s)
Bytespider, Crawl, Google, PetalBot, Yandex, bot, owler

Latest Threads
Submit your suggestions a...
Forum: Suggestions and feedback on KinCony's products
Last Post: kamermcw
1 hour ago
» Replies: 7
» Views: 3,462
Help whit update Cold CPU...
Forum: KC868-HxB series Smart Controller
Last Post: itzek
5 hours ago
» Replies: 0
» Views: 3
KC868-AIO connecting to E...
Forum: KC868-AIO
Last Post: slava
7 hours ago
» Replies: 0
» Views: 0
DI8
Forum: Development
Last Post: Vaughan2024
Yesterday, 10:24 PM
» Replies: 0
» Views: 14
Clarification on CT Clamp...
Forum: KC868-M16 / M1 / MB / M30
Last Post: ironbill
Yesterday, 09:27 PM
» Replies: 0
» Views: 10
AS ESPHome yaml for home ...
Forum: KinCony AS
Last Post: admin
Yesterday, 12:29 PM
» Replies: 4
» Views: 274
KCS firmware - MQTT LWT?
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 12:02 PM
» Replies: 34
» Views: 3,309
H32W Firmware
Forum: KC868-HxB series Smart Controller
Last Post: admin
Yesterday, 10:32 AM
» Replies: 5
» Views: 1,607
"KCS" v3.0.2 firmware for...
Forum: "KCS" firmware system
Last Post: admin
Yesterday, 12:00 AM
» Replies: 0
» Views: 35
What makes the ESP32 chip...
Forum: KC868-A series and Uair Smart Controller
Last Post: alice_amira
11-08-2024, 04:38 PM
» Replies: 0
» Views: 4

  MQTT Example
Posted by: MonsterJoe - 05-19-2023, 06:35 PM - Forum: KC868-M16 / M1 / MB / M30 - Replies (1)

// Example to read channel 1 and output to MQTT server
// Patched together from the other examples
// Install EmonLib and PubSubClient

#include <ETH.h>
#include <PubSubClient.h>
#include "Arduino.h"
#include "EmonLib.h"
EnergyMonitor emon1;
#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
IPAddress local_ip(10, 0, 0, 143);
IPAddress gateway(10, 0, 0, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(10, 0, 0, 1);
#define s0 32
#define s1 33
#define s2 13
#define s3 16
#define IN3 35
int toggleState_1 = 1; //Define integer to remember the toggle state for relay 1
int toggleState_2 = 1; //Define integer to remember the toggle state for relay 2
int toggleState_3 = 1; //Define integer to remember the toggle state for relay 3
int toggleState_4 = 1; //Define integer to remember the toggle state for relay 4
// Update these with values suitable for your network.
const char* mqttServer = "10.0.0.16";
const char* mqttUserName = ""; // MQTT username
const char* mqttPwd = ""; // MQTT password
const char* clientID = "clientId"; // client id
WiFiClient espClient;
PubSubClient client(espClient);
int value = 0;
void setup_ethernet() {
  ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK_MODE); //start with ETH
  if (ETH.config(local_ip, gateway, subnet, dns, dns) == false) {
    Serial.println("LAN8720 Configuration failed.");
  }else{Serial.println("LAN8720 Configuration success.");}
  Serial.println("Connected");
  Serial.print("IP Address:");
  Serial.println(ETH.localIP());
}
void reconnect() {
  while (!client.connected()) {
    if (client.connect(clientID, mqttUserName, mqttPwd)) {
      Serial.println("MQTT connected");
      // ... and resubscribe
    }
    else
    {
      Serial.print("failed, rc=");
      Serial.print(client.state());
      Serial.println(" try again in 5 seconds");
      // Wait 5 seconds before retrying
      delay(5000);
    }
  }
}
void callback(char* topic, byte* payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.print("] ");
  Serial.println("");
}
String byteToHexString(uint8_t byte) {
  String hexStr = String(byte, HEX);
  if (hexStr.length() == 1) {
    hexStr = "0" + hexStr;
  }
  return hexStr;
}
void setup() {
  Serial.begin(115200);
  pinMode(s0,OUTPUT);
  pinMode(s1,OUTPUT);
  pinMode(s2,OUTPUT);
  pinMode(s3,OUTPUT);
  pinMode(IN3,INPUT);
  setup_ethernet();
  client.setBufferSize(2048);
  client.setServer(mqttServer, 1883);
  client.setCallback(callback);  
 
  emon1.current(IN3, 20); // ADC_PIN is the pin where SCT013 is connected, 20 amps
}
void loop() {
  if (!client.connected()) {
    reconnect();
  }
 
  client.loop();
  Serial.println("done loop");
  // Set Low/High to flag for the input to read from: 0000 = chanel 1 to 1111 chanel 16
  digitalWrite(s0,LOW);
  digitalWrite(s1,LOW);
  digitalWrite(s2,LOW);
  digitalWrite(s3,LOW);
  if(analogRead(IN3)!=0){
    double Irms = emon1.calcIrms(1480);  // Calculate Irms only, 1480 is num samples per second
    Irms = Irms * 110; // 110v
   
    Serial.printf("A3 on CH1=%d\n",Irms);
    String val = "val 1 " + String(Irms);
    client.publish("sensorData", val.c_str());
  }
 
  delay(2000);
}

Print this item

  Do I have a faulty LAN chip?
Posted by: philmacu - 05-19-2023, 01:58 PM - Forum: KC868-A8S - Replies (5)

I have tried to get the ETH working on my KC868-A8S. I have tried the following:
Binary that shipped with the board - ETH not working.
LAN8720_UDP.ino using static address 192.168.1.200 - debug says connected but it does NOT appear on LAN
KC868-A8S_Digital_input_Web_Server-ETH.ino -using DHCP settings - returns IP address 0.0.0.0 and the following:

Code:
E (124) lan87xx: lan87xx_pwrctl(409): power up timeout
E (124) lan87xx: lan87xx_init(491): power control failed
E (124) esp_eth: esp_eth_driver_install(215): init phy failed

I have used the following settings 
Code:
#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
The LAN connection is working, but I do not see any LED activity on the KC868-A8S Physical port:
   

Any help would be appreciated.
Phil

Print this item

  Are there any drivers that need to be installed?
Posted by: MonsterJoe - 05-18-2023, 04:52 PM - Forum: KC868-M16 / M1 / MB / M30 - Replies (2)

Arduino IDE can't seem to find it.

Is there a quick how to for this board with Arduino? I just need to write the sensor data to MQTT.

Print this item

Wink KC868-A16 PWM LED
Posted by: Danp - 05-18-2023, 01:32 PM - Forum: KC868-A16 - Replies (5)

Hello,
Is there a way to use the KC868-A16 Board to directly control an LED using PWM or are all mosfets only controllable using the PCF8574 I/O Expander? 
Thank you!

Print this item

  Connectors
Posted by: Vulcan - 05-18-2023, 01:55 AM - Forum: KC868-A6 - Replies (3)

I order a number of I2C connectors intending to use them on the 868-A6 board but none of them are the correct size. Can anyone provide the specifications for the female connectors or refer me to a site/s that has the specific connectors, please? I would appreciate a specific part or part number. 

Thanks

Print this item

  Crystal interference DS1307
Posted by: bsarevalo - 05-18-2023, 12:57 AM - Forum: KC868-A6 - Replies (3)

Hello everyone ! especially Hifikat!  We recently connected a long-range antenna to the LoRa - SX1278 module, this cable passed near the RTC module of the KC868-A6 module, on occasions when we put the backup battery in the RTC Socket, our finger when making contact with the battery and being near the crystal, we have noticed that the RTC readings are beginning to fail, so we thought about placing a metal casing to protect this part of the circuit, we also thought about grounding the negative of the module to ground, is it okay to do this? What other recommendations could you give us for this situation? In advance thank you very much for your attention !



Attached Files Thumbnail(s)
   
Print this item

  KC868-E16S - Multiple
Posted by: keithc - 05-17-2023, 02:13 PM - Forum: KC868-E16S/E16P - Replies (7)

Dear Community,

I would like to confirm something please.

Do I need an additional Kincony / ESP enabled server if I have 10 x K868 E16S on the same via ESP Home / Home Assistant local network?

6 x K868 E16S in ground floor DB and 4 x K868 E16S in 2nd floor DB using local LAN to each device.

No wifi switches or devices, all hard wired.  

Note: replacement for circa 2007 VIPA 200 PLC system in a large residential home.

I may also need a separate AI and DO 24v on each floor.

Regards,

Keith Smile

Print this item

  KC868-H32B V5.04 firmware support Tuya app
Posted by: admin - 05-17-2023, 01:19 AM - Forum: News - No Replies

improvement:
[Image: attachment.php?aid=2412]   
1. support use Tuya app for remote control OUTPUT and monitor INPUT state.
2. support TCP Server, TCP Client, UDP, MQTT, Tuya different protocol at the same time by ethernet.
such as you can use Home assistant (by mqtt) in local LAN network and Tuya app for remote monitor by internet.
3. add "MQTT send all" option. if "enabled" , MQTT state message will feedback all channel's information. if "disabled" , MQTT state message will feedback single channel's information.
4. support control by KC868-AK keyboard.
firmware download:

.zip   H32B_V504_230516.zip (Size: 134.3 KB / Downloads: 205)
   
how to order tuya licence:

here is Tuya licence for "H32BS,H32B,COLB" firmware , it can let your board remote control by internet.

1:telll us your email, we will send the licence to your email

2:tell us your area(choose from :China/Westen US/Eastern US/Central Europe/Western Europe/India)

IMPORTANT: check for your tuya account, which REGION you have registered.

Check in your tuya or smart life mobile phone app: Me -- Settings -- Account and Security -- Region

according to the "Region" visit here (https://developer.tuya.com/en/docs/iot/o...i0ku9l07qb) to check your server location.

[Image: attachment.php?aid=1928]    [Image: attachment.php?aid=1929]    [Image: attachment.php?aid=1930]   

if you really don't know how to check, just send us your tuya or smart life app account name, we will check for you.


3:tell us you model(choose from Kincony A4/A6/A8/A8S/A16/A32/A64/A128/E16S/AI/AK/H32BS/H32B/COLB)

4: The license has no time limit, and the tuya platform provides corresponding services and guarantees

5:Once sold, it cannot be returned or refund

6:One licence only for one product


Tuya internet cloud server locate in 6 positon in the world:
Location-A: China
Location-B: Western US
Location-C: Eastern US
Location-D: Central Europe
Location-E: Western Europe
Location-F: India

please tell us which server location your app account used. such as if your account is "Western Europe" ,tell us "Location-E: Western Europe".

if you want to order, please contact with us, you can pay by PayPal or Bank account.

Print this item

  A4S DIMMER
Posted by: mark2023 - 05-16-2023, 10:35 PM - Forum: KC868-HxB series Smart Controller - Replies (17)

I have connected up a dimmable led light bulb with a solid state relay from analogue 1 on the A4Sbut i seem to be getting the following problems.

1: when the relays are off from the color LED-1 in Home assistant the bulb is still on but very dim. when i switch it on it goes full brightness but when i switch off the bulb does not go out it goes back to very dim.
2: i set up a automation to use a momentry input switch to increase brightness and another input to dicrease brightness, again the bulb is still on when off but now i have to keep pressing the button several times to increase brightness instead of just holding the button. I also notice that the bulb starts to flicker at certain increases. can you explain whats going wrong please.
3: i have attached the photos to make sure it is all wired correctly.



Attached Files Thumbnail(s)
           
Print this item

  Template for KC868-A4 Tasmota
Posted by: VascoTeixeira - 05-16-2023, 06:41 PM - Forum: KC868-A4 - Replies (9)

I am using this template {"NAME":"KC868-A4","GPIO":[32,0,227,0,224,225,0,0,0,1312,1,226,0,0,480,1152,0,1120,1056,1088,0,1,1,1,0,0,0,0,4706,4707,4704,4705],"FLAG":0,"BASE":1} ("https://blakadder.com/kincony-KC868-A4/").
 I am using everything except the 4 analogs; instead, I would like to use the digital inputs to connect 4 float switches ("https://www.amazon.es/-/pt/dp/B089VTDG7P/ref=asc_df_B089VTDG7P/?tag=ptgogshpadde-21&linkCode=df0&hvadid=634424762838&hvpos=&hvnetw=g&hvrand=12299730209074816985&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=20876&hvtargid=pla-943952460943&th=1").

Could you please assist me with the template?
Thx Vasco Teixeira

Print this item