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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 4,498
» Latest member: fgjhggrgdd
» Forum threads: 2,287
» Forum posts: 11,890

Full Statistics

Online Users
There are currently 56 online users.
» 1 Member(s) | 37 Guest(s)
Bing, ChatGLM-Spider, Crawl, Facebook, Google, Iframely, PetalBot, Yandex, bot, facebookexternalhit, help@dataminr.com, luis15pt

Latest Threads
PWM support?
Forum: KC868-A16
Last Post: luis15pt
1 hour ago
» Replies: 2
» Views: 16
[arduino code examples fo...
Forum: KC868-A32/A32 Pro
Last Post: admin
4 hours ago
» Replies: 0
» Views: 3
USB ports
Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module
Last Post: BaconRanch
6 hours ago
» Replies: 2
» Views: 6
Lesson23- How to connect ...
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
Yesterday, 10:11 AM
» Replies: 10
» Views: 7,155
KC868-AG RF - sending rep...
Forum: KC868-A series and Uair Smart Controller
Last Post: PhilW
Yesterday, 07:46 AM
» Replies: 3
» Views: 9
Usar entradas y oled i2c ...
Forum: KC868-A6
Last Post: sistemasyusa
Yesterday, 03:16 AM
» Replies: 4
» Views: 17
a16 as basis for a securi...
Forum: KC868-A16
Last Post: admin
09-18-2024, 11:58 PM
» Replies: 8
» Views: 54
GSM CALL RELAY
Forum: KC868-A2
Last Post: admin
09-18-2024, 11:53 PM
» Replies: 9
» Views: 4,108
KC868-A16S or KC868-A8S
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
09-18-2024, 11:51 PM
» Replies: 3
» Views: 38
KCS firmware
Forum: KC868-A series and Uair Smart Controller
Last Post: admin
09-18-2024, 11:48 PM
» Replies: 10
» Views: 114

  A16 flash problem
Posted by: saint_code - 07-09-2023, 12:50 PM - Forum: KC868-A series and Uair Smart Controller - Replies (26)

Hi
I am try to flash my brand new KinKony A16 controller with empty sketch using Arduino 2.1.1
earn "A fatal error occurred: Invalid head of packet (0xA6)" error

Code:
Linking everything together...
/Users/myuser/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-gcc -nostdlib -L/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/lib -L/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/ld -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u esp_app_desc -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -Wl,--start-group /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch/sketch_jul9a.ino.cpp.o /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/core/core.a -lgcc -lesp_websocket_client -lwpa2 -ldetection -lesp_https_server -lwps -lhal -lconsole -lpe -lsoc -lsdmmc -lpthread -llog -lesp_http_client -ljson -lmesh -lesp32-camera -lnet80211 -lwpa_supplicant -lc -lmqtt -lcxx -lesp_https_ota -lulp -lefuse -lpp -lmdns -lbt -lwpa -lspiffs -lheap -limage_util -lunity -lrtc -lmbedtls -lface_recognition -lnghttp -ljsmn -lopenssl -lcore -lfatfs -lm -lprotocomm -lsmartconfig -lxtensa-debug-module -ldl -lesp_event -lesp-tls -lfd -lespcoredump -lesp_http_server -lfr -lsmartconfig_ack -lwear_levelling -ltcp_transport -llwip -lphy -lvfs -lcoap -lesp32 -llibsodium -lbootloader_support -ldriver -lcoexist -lasio -lod -lmicro-ecc -lesp_ringbuf -ldetection_cat_face -lapp_update -lespnow -lface_detection -lapp_trace -lnewlib -lbtdm_app -lwifi_provisioning -lfreertos -lfreemodbus -lethernet -lnvs_flash -lspi_flash -lc_nano -lexpat -lfb_gfx -lprotobuf-c -lesp_adc_cal -ltcpip_adapter -lstdc++ -Wl,--end-group -Wl,-EL -o /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.elf
/Users/myuser/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool --chip esp32 elf2image --flash_mode dio --flash_freq 80m --flash_size 4MB -o /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.bin /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.elf
esptool.py v3.0-dev
python /Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/gen_esp32part.py -q /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/partitions.csv /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.partitions.bin

/Users/myuser/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-size -A /private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.elf
Sketch uses 199324 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13224 bytes (4%) of dynamic memory, leaving 314456 bytes for local variables. Maximum is 327680 bytes.
"/Users/myuser/Library/Arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool" --chip esp32 --port "/dev/cu.usbserial-210" --baud 921600  --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 "/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin" 0x1000 "/Users/myuser/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_dio_80m.bin" 0x10000 "/private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.bin" 0x8000 "/private/var/folders/42/swzk51zs3x93tjqmp7mlcmhm0000gn/T/arduino/sketches/F59284665596F1CC333E4934A94B676A/sketch_jul9a.ino.partitions.bin"
esptool.py v3.0-dev
Serial port /dev/cu.usbserial-210
Connecting....
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b0:a7:32:80:e4:a0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...

A fatal error occurred: Invalid head of packet (0xA6)
Failed uploading: uploading error: exit status 2


also esptool shows some other errors
Code:
esptool.py --baud 115200 write_flash 0x0 tasmota32.bin --flash_freq 80m --flash_mode dio --flash_size 4MB
esptool.py v4.6.2
Found 2 serial ports
Serial port /dev/cu.usbserial-210
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b0:a7:32:80:e4:a0
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x001d3fff...
Compressed 1915648 bytes to 1228182...
Writing at 0x0000e5d8... (4 %)Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/__init__.py", line 1073, in _main
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/__init__.py", line 868, in main
    operation_func(esp, args)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/cmds.py", line 595, in write_flash
    esp.flash_defl_block(block, seq, timeout=timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 131, in inner
    return func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 1037, in flash_defl_block
    self.check_command(
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 436, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 405, in command
    p = self.read()
        ^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/esptool/loader.py", line 338, in read
    return next(self._slip_reader)
          ^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

A fatal error occurred: The chip stopped responding.


but erase  successfully
Code:
esptool.py erase_flash
esptool.py v4.6.2
Found 2 serial ports
Serial port /dev/cu.usbserial-210
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: b0:a7:32:80:e4:a0
Uploading stub...
Running stub...
Stub running...
WARNING: Failed to communicate with the flash chip, read/write operations will fail. Try checking the chip connections or removing any other hardware connected to IOs.
Erasing flash (this may take a while)...
Chip erase completed successfully in 0.1s
Hard resetting via RTS pin...



some additional info from Arduino serial port monitor 
looks like A16 is into continius loop reset ?

Code:
[13:42:55]rst:0x3 (SW_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
[13:42:55]configsip: 0, SPIWP:0xee
[13:42:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:42:56]mode:DIO, clock div:2
[13:42:56]load:0x3fff0030,len:1184
[13:42:56]load:0x40078000,len:12784
[13:42:56]load:0x40080400,len:3032
[13:42:56]entry 0x400805e4
[13:42:56]ets Jul 29 2019 12:21:46
[13:42:56]
[13:42:56]rst:0x3 (SW_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
[13:42:56]configsip: 0, SPIWP:0xee
[13:42:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:42:56]mode:DIO, clock div:2
[13:42:56]load:0x3fff0030,len:1184
[13:42:56]load:0x40078000,len:12784
[13:42:56]load:0x40080400,len:3032
[13:42:56]entry 0x400805e4
[13:42:56]ets Jul 29 2019 12:21:46
[13:42:56]
[13:42:56]rst:0x3 (SW_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
[13:42:56]configsip: 0, SPIWP:0xee
[13:42:56]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[13:42:56]mode:DIO, clock div:2
[13:42:56]load:0x3fff0030,len:1184
[13:42:56]load:0x40078000,len:12784
[13:42:56]load:0x40080400,len:3032
[13:42:56]entry 0x400805e4
[13:42:57]ets Jul 29 2019 12:21:46
...

Print this item

  KC868-A8-E
Posted by: avihay - 07-09-2023, 07:39 AM - Forum: "KCS" firmware system - Replies (11)

Our company purchased a KC868-A8-E board for the project. We received a file that can be used in RF. The file is locked. It is not possible to add an INA266 card in order to finish the automation. Please ESP file or open file of KCS_KC868_A8_V2.0.2

Print this item

  KC868-A8 with Motion Sensor HC-SR501
Posted by: vijjav - 07-06-2023, 03:03 PM - Forum: KC868-A8 - Replies (7)

I need help connecting pir motion sensor with A8 board. Should i connect with DI 1-8 or s2, s3 terminals? 

Here is the code part I am currently using. 

Code:
switch:
  - platform: gpio
    name: "Study Room PIR"
    id: a8_study_room_pir
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: false

binary_sensor:
  - platform: gpio
    name: "a8_study_room_pir"
    device_class: motion
#    on_press:
#      then:
#        - switch.toggle: a8_study_room_pir
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: false

Print this item

  how instal firmware.
Posted by: befree8 - 07-06-2023, 09:24 AM - Forum: KC868-A16S - Replies (13)

Please help, I installed tasmota and wants to return for esphome, how to return to the original software because now by home assistant can not add the device.  ( info with home assistans: "Unable to connect to the ESP. Make sure your YAML file contains the 'api:' line.)

Print this item

  MQTT SET syntax
Posted by: philippe - 07-05-2023, 04:13 PM - Forum: "KCS" firmware system - Replies (3)

Hello,
What is the exact syntax to send Relay1 ON with MQTT. I am reading the document , I have my module sending State data, but cant find the right syntax to end  orders.
Thanks

Print this item

  kc868-a6 use 2 sensor inputs for analog input
Posted by: Siebje - 07-05-2023, 03:57 PM - Forum: KC868-A6 - Replies (1)

Hi, 
Is there any way to use the two sensor inputs:
[Image: a6-connections.jpg]
I mean the two IO1 and IO2 pins.

is there any way I can read/connect a 0-10 volt sensor to and read out the voltage/analogvalue?

thanks for any help in advance!

Print this item

  DAC1/2
Posted by: gilad - 07-05-2023, 08:56 AM - Forum: KC868-A6 - Replies (3)

trying to use DAC1/2 by following simple code:
can't see any changes on output nor on esp32(25/26)
dac_output_enable(DAC_CHANNEL_1);
dac_output_enable(DAC_CHANNEL_2);
dac_output_voltage(DAC_CHANNEL_1,0);
dac_output_voltage(DAC_CHANNEL_2,0);

i see no changes no matter the values, how come ?

what is the meaning for Strapping is it needed any human interact to activate it?



Attached Files Thumbnail(s)
   
Print this item

  [KC868-A16] Problem with PCF8574 I/O
Posted by: alessiovietri - 07-04-2023, 12:59 PM - Forum: KC868-A series and Uair Smart Controller - Replies (3)

Hello, i'm tryng to read inputs from the PCF8574 channels. This is my code:

Code:
//Apple Homekit for KC868-E16S/KC868-E16T
//first time to use: use serial port send "W" to config wifi ssid and password
//if you want to eraser all data, re-config, use serial port send "E"
//default qrcode is 46637726

#include "HomeSpan.h"
#include "PCF8574.h"

PCF8574 pcfInLeft(0x22);

void pcfInit(){
 
  pcfInLeft.pinMode(P0, INPUT);
  pcfInLeft.pinMode(P1, INPUT);
  pcfInLeft.pinMode(P2, INPUT);
  pcfInLeft.pinMode(P3, INPUT);
  pcfInLeft.pinMode(P4, INPUT);
  pcfInLeft.pinMode(P5, INPUT);
  pcfInLeft.pinMode(P6, INPUT);
  pcfInLeft.pinMode(P7, INPUT);
 
  if (pcfInLeft.begin()) {
    Serial.println("pcf OK");
  }
  else{
    Serial.println("pcf ERROR");
  }

}

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

  delay(1000);

  pcfInit();     

} // end of setup()

//////////////////////////////////////

void loop(){

  uint8_t in0 = pcfInLeft.digitalRead(P0);
  Serial.println("in0");
  Serial.println(in0);
  uint8_t in1 = pcfInLeft.digitalRead(P1);
  Serial.println("in1");
  Serial.println(in1);
  uint8_t in2 = pcfInLeft.digitalRead(P2);
  Serial.println("in2");
  Serial.println(in2);
  uint8_t in3 = pcfInLeft.digitalRead(P3);
  Serial.println("in3");
  Serial.println(in3);
  uint8_t in4 = pcfInLeft.digitalRead(P4);
  Serial.println("in4");
  Serial.println(in4);
  uint8_t in5 = pcfInLeft.digitalRead(P5);
  Serial.println("in5");
  Serial.println(in5);
  uint8_t in6 = pcfInLeft.digitalRead(P6);
  Serial.println("in6");
  Serial.println(in6);
  uint8_t in7 = pcfInLeft.digitalRead(P7);
  Serial.println("in7");
  Serial.println(in7);

  delay(1000);
 
} // end of loop()

But the method  pcfInLeft.begin() always returns false and the inputs are always read as off. What's wrong?

Thanks in advance

I forgot to mention that the KCS software knows when the inputs go on, so it's not a wiring-related problem

Print this item

  KC868-A8 Touch wall panel indication working reverse and temperature sensor
Posted by: vijjav - 07-03-2023, 02:51 PM - Forum: KC868-A8 - Replies (11)

Hi Xu Wei,

Good day, I need assitance for two things.

1. My DHT sensor not reading temperature and the ESPHome log messages output below. 

Code:
[20:03:03][C][dallas.sensor:075]: DallasComponent:
[20:03:03][C][dallas.sensor:076]:   Pin: GPIO14
[20:03:03][C][dallas.sensor:077]:   Update Interval: 60.0s
[20:03:03][W][dallas.sensor:080]:   Found no sensors!
[20:03:03][C][dallas.sensor:089]:   Device 'study_room_temperature_sensor'
[20:03:03][C][dallas.sensor:089]:     Device Class: 'temperature'
[20:03:03][C][dallas.sensor:089]:     State Class: 'measurement'
[20:03:03][C][dallas.sensor:089]:     Unit of Measurement: '°C'
[20:03:03][C][dallas.sensor:089]:     Accuracy Decimals: 1
[20:03:03][C][dallas.sensor:097]:     Address: 0x1c0000031edd2a28
[20:03:03][C][dallas.sensor:098]:     Resolution: 12

[20:03:55][E][dallas.sensor:112]: Requesting conversion failed
[20:03:55][D][sensor:094]: 'study_room_temperature_sensor': Sending state nan °C with 1 decimals of accuracy

I have tried connecting my DHT11 sensor to both S1 & S2 input terminals and getting the same error for reading the temperature.

2. I am trying to make the Touch Wall Panel Switch glow when turning on inputs, I know KC868-A8 not having a digital input, but i made a small adjustment and patched a wire from relay 1 GND output terminal in the PCB and connected to Switch D1. K1 is connected to input.

All looks good, but the LED is turning ON when the switch 1 is turned off and LED is Off when switch 1 is turned ON.

Connection Details:

A8 Board Input 1 --> Wall Switch K1
A8 Board Relay 1 Digital Input GND soldered from PCB --> Wall Switch D1
A8 Board S1 --> DTH11 Data terminal , VCC and Ground connected in the S1-S4 terminal block VCC & GND.

My ESPHome code block is a below, I tried several 'Inverted : true" at switch component and binalry_sensor component in yaml file, but I am missing some basic part.

Need your help to overcome my Two issues.

Code:
#
esphome:
  name: a8-study-room
  platform: ESP32
  board: esp32dev


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

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "********************************************"

ota:
  password: "0fb1fa5d2db965e28cfb201d5afaf06c"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Kc868-A8 Fallback Hotspot"
    password: "************"

captive_portal:

# 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: "Study Room Fan"
    id: a8_study_room_fan
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: false

     
binary_sensor:
  - platform: gpio
    name: "a8_study_room_fan"
    on_press:
      then:
        - switch.toggle: a8_study_room_fan
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode:
        input: true

dallas:
  - pin: 14

sensor:
  - platform: dallas
    address: 0x1c0000031edd2a28
    name: "study_room_temperature_sensor"



Attached Files
.txt   KC868-A8-Touch_Wall_Switch.txt (Size: 1.36 KB / Downloads: 155)
Print this item

  KC868-1U connect with extend relay diagram
Posted by: admin - 06-30-2023, 12:54 AM - Forum: KC868-1U - No Replies

   

Print this item