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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,963
» Latest member: Garyhill
» Forum threads: 3,949
» Forum posts: 20,039

Full Statistics

Online Users
There are currently 46 online users.
» 0 Member(s) | 27 Guest(s)
Amazonbot, Baidu, Bytespider, Crawl, PetalBot, Sogou web, bot, github.com

Latest Threads
m16v2 energy meter - cali...
Forum: KC868-M16 / M1 / MB / M30
Last Post: PapaC
2 hours ago
» Replies: 12
» Views: 156
Adding a debounce capabil...
Forum: KC868-A16v3
Last Post: admin
3 hours ago
» Replies: 6
» Views: 216
Current and Power not add...
Forum: N60
Last Post: admin
5 hours ago
» Replies: 5
» Views: 69
Web updates?
Forum: "KCS" v2 firmware system
Last Post: admin
11 hours ago
» Replies: 1
» Views: 11
DS3231 RTC module
Forum: KC868-A16S
Last Post: rosnoteh
Yesterday, 10:12 PM
» Replies: 4
» Views: 971
Add uptime to board infor...
Forum: Suggestions and feedback on KinCony's products
Last Post: twostar
Yesterday, 07:48 AM
» Replies: 2
» Views: 37
AIO Hybrid Smart Controll...
Forum: AIO Hybrid
Last Post: admin
Yesterday, 06:58 AM
» Replies: 0
» Views: 17
KC868-COLB V2.4 firmware ...
Forum: News
Last Post: admin
04-23-2026, 12:35 PM
» Replies: 10
» Views: 2,870
N60 N30 N20 N10 ARM CPU f...
Forum: N30
Last Post: admin
04-22-2026, 10:17 PM
» Replies: 18
» Views: 567
sample code to receive ht...
Forum: F16
Last Post: admin
04-22-2026, 10:15 PM
» Replies: 23
» Views: 1,623

  Multiple DS18B20 Temperature sensor at the same GPIO pin
Posted by: tamibandy - 01-04-2024, 03:57 PM - Forum: DIY Project - Replies (1)

Hello,

On Kincony A8 controller, I made a code for reading multiple temperature sensor with one GPIO(14) pin (DS18B20 type). I made the reading on the second core of the ESP32's processor, to don't make any delay in the normal program cycle.
In the code is managed the multiple reading to can assign every DS18B20 temperature sensor to a fix variable by unique code of the DS18B20.

Here I will attach a short code about it. I didn't uploaded all of the code because there is a lot of other things in it too. Maybe if you want to use, need to do some other implementations too. But for a start it is perfect.

Code:
#include <DS18B20.h>
#include <Preferences.h>
DS18B20 ds(14);
struct DS18B20_tempSensor {
  uint8_t temperatureID;
  uint8_t address[8];
  float value;
};
DS18B20_tempSensor dsTemp[16];
struct Parameters {
  uint32_t  magic;
  byte temperatureAddress[16][8];
};
Parameters paramLocal;
const Parameters paramDefault = {
  0x626C6E6B
};
float temperature[16];
void setup() {
  loadParameters();
  xTaskCreatePinnedToCore(
      Task1code, /* Function to implement the task */
      "Task1", /* Name of the task */
      10000,  /* Stack size in words */
      NULL,  /* Task input parameter */
      0,  /* Priority of the task */
      &Task1,  /* Task handle. */
      0); /* Core where the task should run */
}
void loop() {
 
}
void Task1code( void * parameter) {
  for(;;) {
    while(ds.selectNext()) {
     
      uint8_t address[8];
      ds.getAddress(address);
      bool found = false;
      for(int i = 0; i < 16; i++) {
        if(memcmp(dsTemp[i].address, address, 8) == 0) {
          found = true;
          dsTemp[i].value = ds.getTempC();
          break;
        }
      }
      if(!found) {
        for(int i = 0; i < 16; i++) {
          bool empty = true;
          for(int j = 0; j < 8; j++) {
            if(dsTemp[i].address[j] != 0) {
              empty = false;
              break;
            }
          }
          if(empty) {
            ds.setResolution(12);
            bool match = false;
            for(int j = 0; j < 16; j++) {
              if(memcmp(paramLocal.temperatureAddress[j], address, 8) == 0) {
                match = true;
                dsTemp[i].temperatureID = j + 1;
                break;
              }
            }
            if(!match) {
              dsTemp[i].temperatureID = 99;
            }
            for(int j = 0; j < 8; j++) {
              dsTemp[i].address[j] = address[j];
            }
            dsTemp[i].value = ds.getTempC();
            break;
          }
        }
      }
    }
  }
}
bool loadParameters() {
  Preferences prefs;
  if (prefs.begin("esp32", true)) { // read-only
    memset(&paramLocal, 0, sizeof(paramLocal));
    prefs.getBytes("parameters", &paramLocal, sizeof(paramLocal));
    if (paramLocal.magic != paramDefault.magic) {
      Serial.print(F("Using default parameters."));
      paramLocal = paramDefault;
    }
    return true;
  } else {
    Serial.print(F("Parameters read failed"));
    return false;
  }
}

bool saveParameters() {
  Preferences prefs;
  if (prefs.begin("esp32", false)) { // writeable
    prefs.putBytes("parameters", &paramLocal, sizeof(paramLocal));
    Serial.print(F("Parameters stored to flash"));
    return true;
  } else {
    Serial.print(F("Parameters write failed"));
    return false;
  }
}

Print this item

Photo Module sim7670C cannot send messages, cannot call, nor receive messages or calls! Ple
Posted by: Tchip - 01-04-2024, 02:14 PM - Forum: Development - Replies (7)

Hi everybody! I'm new to the 7670C sim module and currently I still don't know how to configure it to receive, send messages and calls.
I sent AT commands to it and it responded OK. But when I send messages and calls, it cannot make or receive calls and messages. Look forward to the help. Thank you so much!

   
   
   

Print this item

  It is possible a hardware modification?
Posted by: tamibandy - 01-04-2024, 10:59 AM - Forum: KC868-A8 - Replies (1)

Is there possibility to do A8 custom board?

Board with nextion HMI connector 5VDC, GND, STX, RTX? Instead of 433 radio control.
Ethernet not needed if WiFi is available and those GPIO pins could be freed up.

Print this item

  KNX/RS485
Posted by: jeftevag - 01-03-2024, 11:55 PM - Forum: KC868-E16S/E16P - Replies (1)

Do you have a RS485/KNX command list for the relays on the KC868-E16P?

Print this item

  Power supply for KC868-A8 (DRC-60)
Posted by: baracha - 01-03-2024, 08:57 PM - Forum: KC868-A series and Uair Smart Controller - Replies (3)

Hi,

I want to use MeanWell DRC-60 with an integrated 12V battery for powering my KC868-A8.
The output voltage supposed to be adjustable (12-15V), but is over 13V at least this is what I see on my multimeter.

Is it safe to use it?

Print this item

  KC868-M16v2 Ethernet Problem
Posted by: Roni - 01-03-2024, 07:25 AM - Forum: KC868-M16 / M1 / MB / M30 - Replies (1)

Hello ,

I have KC868-M16v2. I try the ethernet connection, but i have a problem

this is my ethernet setting

#include <ETH.h>
#include <WebServer_WT32_ETH01.h>
//#define DEBUG_ETHERNET_WEBSERVER_PORT      Serial
//#define _ETHERNET_WEBSERVER_LOGLEVEL_      3


#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

void config_ethernet()
{
  if(s_enable_ethernet=="1")
  {
    WT32_ETH01_onEvent();
  //bool begin(uint8_t phy_addr=ETH_PHY_ADDR, int power=ETH_PHY_POWER, int mdc=ETH_PHY_MDC, int mdio=ETH_PHY_MDIO,
  //          eth_phy_type_t type=ETH_PHY_TYPE, eth_clock_mode_t clk_mode=ETH_CLK_MODE);
   
    ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER, ETH_PHY_MDC, ETH_PHY_MDIO, ETH_PHY_TYPE, ETH_CLK_MODE);
    ETH.begin(ETH_PHY_ADDR, ETH_PHY_POWER);
    status_ethernet();
    //Serial.println("ethernet mac: "+ ETH.macAddress());
    //Serial.println("ethernet ip: "+ ETH.localIP().toString());
  }
}

This is Error in serial
ETH Connected
ETH Disconnected
ETH Connected
ETH Disconnected
ETH Connected
ETH Disconnected
ETH Connected
ETH Disconnected
ETH Connected
ETH Disconnected
ETH Connected
ETH Disconnected

Print this item

  Cant make E16P work with apple homekit
Posted by: Nikolas Protopapas - 01-02-2024, 09:25 PM - Forum: KC868-E16S/E16P - Replies (1)

Hello, so have bought an E16P esp32 board, too the file offer from the forum added them to Arduino IDE.

First issue was the <pcf8574.h> had to be in capitals in order to include the library.

Second and current issue am having is, error code: the list is way longer just added the first 2
In file included from C:\Users\nicol\OneDrive\Desktop\RealPushButtons\RealPushButtons.ino:7:
C:\Users\nicol\OneDrive\Desktop\RealPushButtons\DEV_LED.h: In function 'void PCF_WRITE(int, boolean)':
C:\Users\nicol\OneDrive\Desktop\RealPushButtons\DEV_LED.h:59:18: error: cannot convert 'PCF8574' to 'uint8_t' {aka 'unsigned char'}
    digitalWrite(pcfOUT_1, mPin - 1, !value);      //digitalWrite(ex1, (mPin-1), value);

In file included from C:\Users\nicol\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\cores\esp32/esp32-hal.h:83,
                from C:\Users\nicol\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\cores\esp32/Arduino.h:36,
                from C:\Users\nicol\AppData\Local\Temp\arduino\sketches\B825BA561FA7215E1D76DE33C6DE7CC9\sketch\RealPushButtons.ino.cpp:1:
C:\Users\nicol\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\cores\esp32/esp32-hal-gpio.h:75:27: note:  initializing argument 1 of 'void digitalWrite(uint8_t, uint8_t)'
void digitalWrite(uint8_t pin, uint8_t val);



Attached Files
.zip   RealPushButtons.zip (Size: 2.49 KB / Downloads: 534)
Print this item

  Roller shutter in Home Assistant
Posted by: lendy - 01-02-2024, 05:02 PM - Forum: KC868-E16S/E16P - Replies (1)

Hello,

I would like to ask if it is possible to use KC868-E16P as relay for controlling 8 roller shutters in Home Assistant? How it can be calibrated/configured for up/down positions?

Thank you

Print this item

  Home assistant 2023 sur CM4 sur ssd disque
Posted by: raaga - 01-02-2024, 11:10 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - Replies (1)

Salut 
comment utiliser les ports USB pour demarrer home assistant 2023 ?
j'ai un mini serveur kincony Pi cm4 et un disque ssd S3+ 512GO 
NB : home assistant est flashé sur le ssd

Print this item

  Advise me on the simplest
Posted by: Lamri - 01-02-2024, 10:58 AM - Forum: KC868-A16S - Replies (1)

Hello, 
I am a beginner, and I am struggling to configure my 2 kc868-A16S modules. I have managed to configure the home assistant and integrate Tuya on esphome and it works very well. 
Unfortunately, I cannot keep the 2 frameworks (home assistant and web page via the IP address). For this, I simply want to keep access to the interface via the IP address so that I can create ifttt and RF scenes, SMS and calls simply and Tuya, but I want voice command either by Alexa or Google Home. Advise me on the simplest, I will buy a module to run Alexa or Google Home to connect with my 2 A16S modules or it is possible to configure Alexa using node red without losing access to the kincony web page via the IP address. 
Thank you.

Print this item