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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 5,375
» Latest member: daleldalel
» Forum threads: 2,577
» Forum posts: 13,330

Full Statistics

Online Users
There are currently 41 online users.
» 0 Member(s) | 30 Guest(s)
Bing, Bytespider, Google, PetalBot, bot

Latest Threads
KC868-AG RF - sending rep...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
2 hours ago
» Replies: 5
» Views: 155
Kc868 a8 in workshop
Forum: KC868-A8
Last Post: admin
4 hours ago
» Replies: 1
» Views: 3
KC868-A2 configure yaml f...
Forum: KC868-A2
Last Post: admin
4 hours ago
» Replies: 16
» Views: 7,691
One input switch - turn o...
Forum: KinCony AS
Last Post: admin
4 hours ago
» Replies: 1
» Views: 2
change wake up name
Forum: KinCony AS
Last Post: admin
4 hours ago
» Replies: 15
» Views: 111
KC868-A8 Switch
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
4 hours ago
» Replies: 3
» Views: 36
H32L - home assistant
Forum: KC868-HxB series Smart Controller
Last Post: admin
4 hours ago
» Replies: 1
» Views: 5
Problem with IFTTT automa...
Forum: "KCS" firmware system
Last Post: Poczwara13
7 hours ago
» Replies: 7
» Views: 69
how to use AS ESP32-S3 vo...
Forum: KinCony AS
Last Post: biofects
8 hours ago
» Replies: 14
» Views: 481
How can I power multiple ...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 09:03 AM
» Replies: 12
» Views: 140

  how to enable Raspberry pi CM4 additional UART serial ports
Posted by: admin - 01-05-2024, 06:02 AM - Forum: KC868-Server Raspberry Pi4 local server - No Replies

edit config.txt file, add:

dtoverlay=uart2
dtoverlay=uart3
dtoverlay=uart4
dtoverlay=uart5

Note that the kernel will reject attempts to enable UARTs where the pins are in use by something else (e.g. UART0, UART1 or one of the I2C ports), or it might even disable the other thing, so make sure what you are trying to do is possible.

uart1 being enabled by default, pi 4 having 4 extra uarts.

Print this item

  Communicate between multiple ESP's with RS485 Modbus
Posted by: k0cka - 01-04-2024, 11:22 PM - Forum: Getting Started with ESPHome and Home Assistant - Replies (10)

Hello, I was searching on the internet but I could not find answers to my questions. So I would like to try my luck here and see if someone can help me.

I would like to ask if it’s possible to communicate between multiple ESP’s using modbus in ESPHome. So for example - I press a button on esp1 and turn on a relay on esp2.

I have some max485 modules to convert UART to RS485, but I just don’t understand how should the yaml files been written since I’m a total newbie in this field.

Thank you in advance!

Print this item

  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 (6)

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: 112)
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