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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 8,249
» Latest member: helpinghuman2
» Forum threads: 3,612
» Forum posts: 18,605

Full Statistics

Online Users
There are currently 33 online users.
» 0 Member(s) | 19 Guest(s)
AhrefsBot, Amazonbot, Bing, Crawl, Google, Sogou web, bot

Latest Threads
how to integrate KC868-A8...
Forum: KC868-A8
Last Post: admin
4 hours ago
» Replies: 39
» Views: 6,936
Some bugs in Home Assista...
Forum: N60
Last Post: admin
5 hours ago
» Replies: 1
» Views: 8
B16 mqtt code
Forum: B16
Last Post: admin
Yesterday, 01:31 PM
» Replies: 1
» Views: 9
OPC UA Server for KC868-A...
Forum: DIY Project
Last Post: aksurd
Yesterday, 04:05 AM
» Replies: 0
» Views: 23
RF doesnt show up?
Forum: KC868-A16v3
Last Post: admin
Yesterday, 03:50 AM
» Replies: 1
» Views: 12
N20 ESPHome & HA - Line t...
Forum: N20
Last Post: WestCoastXS
Yesterday, 03:26 AM
» Replies: 2
» Views: 19
Low Level Relay Trigger
Forum: KC868-A16v3
Last Post: admin
Yesterday, 01:41 AM
» Replies: 5
» Views: 38
KC868-A16v3 ESPHome yaml ...
Forum: KC868-A16v3
Last Post: hans-martijn
12-11-2025, 09:38 PM
» Replies: 10
» Views: 4,000
KC868-A16 - the firmware ...
Forum: "KCS" v2 firmware system
Last Post: admin
12-11-2025, 08:08 PM
» Replies: 1
» Views: 19
Low Level Output for Rela...
Forum: KC868-A16v3
Last Post: admin
12-11-2025, 01:35 PM
» Replies: 1
» Views: 19

  KC868-A16 - IP & PORT ?? Important !!!
Posted by: Guele1 - 10-29-2025, 07:28 PM - Forum: KC868-A16 - Replies (5)

KC868-A16 - IP & PORT ?? Important !!!

I would like to control my KC868-A16 (V1.6) module using my mobile phone within my local network (without Internet access).
When setting up the "K-Box Smart" (version 2.0.9) software, I’m asked to enter the IP address and PORT XXXX
The module is connected via LAN cable to my Fritz!Box 7530 router.
I was able to find the IP address in the router menu, but I’m not sure which port number I should enter in the app or where to find it.
Could someone please explain:

which port I should use for the KC868-A16, and
whether a port configuration is needed in the Fritz!Box
if I only want to use the system within my local network (without Internet access)?

Thank you very much for your support!

Best regards,
Günter Lehner

Print this item

  "KCS" v3.15.0 firmware BIN file download
Posted by: admin - 10-28-2025, 05:33 AM - Forum: "KCS" v3 firmware - Replies (4)

v3.15.0 improvement:

1. Adaptation for N10 / N20 / N30 AC energy meter board.
2. learned IR/RF signal, will auto create switch button can send out signal and synchronization with Home Assistant
3. DS18B20 support multiple sensors configured on the same GPIO
4. Increase the number of IFTTT IF and THEN conditions from 6 to 12
5. Fixed issue where multiple toggles of DO1 on AIO could cause incorrect control
6. Fixed issue where Zigbee pairing information was not written to flash in time, causing data loss
7. Removed Zigbee beep option from AIO
   
   
   

firmware download:



Attached Files
.zip   KCS_A2V3_V3.15.0.zip (Size: 1.1 MB / Downloads: 134)
.zip   KCS_A6V3_V3.15.0.zip (Size: 1.07 MB / Downloads: 145)
.zip   KCS_A8V3_V3.15.0.zip (Size: 1.12 MB / Downloads: 159)
.zip   KCS_A16V3_V3.15.0.zip (Size: 1.14 MB / Downloads: 164)
.zip   KCS_A32PRO_V3.15.0.zip (Size: 1.1 MB / Downloads: 125)
.zip   KCS_AG8_V3.15.0.zip (Size: 1.08 MB / Downloads: 122)
.zip   KCS_AIO_HYBRID_V3.15.0.zip (Size: 1.31 MB / Downloads: 125)
.zip   KCS_ALR_V3.15.0.zip (Size: 1.05 MB / Downloads: 104)
.zip   KCS_B8_V3.15.0.zip (Size: 1.13 MB / Downloads: 108)
.zip   KCS_B8M_V3.15.0.zip (Size: 1.13 MB / Downloads: 114)
.zip   KCS_B16_V3.15.0.zip (Size: 1.13 MB / Downloads: 122)
.zip   KCS_B16M_V3.15.0.zip (Size: 1.13 MB / Downloads: 135)
.zip   KCS_B24_V3.15.0.zip (Size: 1.13 MB / Downloads: 106)
.zip   KCS_B24M_V3.15.0.zip (Size: 1.13 MB / Downloads: 108)
.zip   KCS_DM16_V3.15.0.zip (Size: 1.1 MB / Downloads: 99)
.zip   KCS_F8_V3.15.0.zip (Size: 1.12 MB / Downloads: 106)
.zip   KCS_F16_V3.15.0.zip (Size: 1.13 MB / Downloads: 124)
.zip   KCS_F24_V3.15.0.zip (Size: 1.13 MB / Downloads: 116)
.zip   KCS_F32_V3.15.0.zip (Size: 1.13 MB / Downloads: 106)
.zip   KCS_G1_V3.15.0.zip (Size: 1.09 MB / Downloads: 101)
.zip   KCS_KC_TA_V3.15.0.zip (Size: 1.08 MB / Downloads: 111)
.zip   KCS_N10_V3.15.0.zip (Size: 1,014.99 KB / Downloads: 109)
.zip   KCS_N20_V3.15.0.zip (Size: 1,015.02 KB / Downloads: 120)
.zip   KCS_N30_V3.15.0.zip (Size: 1,015.09 KB / Downloads: 100)
.zip   KCS_N60_V3.15.0.zip (Size: 1,015.09 KB / Downloads: 110)
.zip   KCS_T16M_V3.15.0.zip (Size: 1.08 MB / Downloads: 120)
.zip   KCS_T32M_V3.15.0.zip (Size: 1.1 MB / Downloads: 111)
.zip   KCS_T64M_V3.15.0.zip (Size: 1.1 MB / Downloads: 105)
.zip   KCS_T128M_V3.15.0.zip (Size: 1.1 MB / Downloads: 102)
.zip   KCS_TR_V3.15.0.zip (Size: 1.05 MB / Downloads: 94)
.zip   KCS_Z1_V3.15.0.zip (Size: 1.23 MB / Downloads: 97)
Print this item

  temperature humidity sensor convertor – TR RS485 Modbus protocol
Posted by: admin - 10-28-2025, 12:42 AM - Forum: Extender module - No Replies

Code:
================================================================================
  RS485 TEMPERATURE & HUMIDITY SENSOR PROTOCOL SPECIFICATION
================================================================================

Communication: RS485 (Modbus-based Custom Protocol)

================================================================================
1. OVERVIEW
================================================================================

This document describes the custom Modbus-based protocol for communicating with
temperature and humidity sensors over RS485. The protocol supports up to 32
sensors per slave device, allowing for distributed sensor networks.

Key Features:
- Modbus RTU framing with CRC16
- Custom function code for sensor data reading
- Support for 1-32 sensors per slave address
- Temperature and humidity readings with 0.1 degree/percent precision
- Explicit encoding for unavailable sensor data

================================================================================
2. PROTOCOL PARAMETERS
================================================================================

Modbus Function Code: 0x0A (READ_SENSOR_DATA)
Baud Rate: As configured by RS485 driver
Data Format: 8N1 (8 data bits, no parity, 1 stop bit)
CRC: Modbus CRC16 (polynomial 0xA001)

Sensor Address Range: 1-32 (0x01-0x20)
Slave Address Range: 1-247 (0x01-0xF7, standard Modbus range)

================================================================================
3. REQUEST FORMAT
================================================================================

The master sends a request to read sensor data from a specific sensor.

Request Frame Structure:
┌──────────────┬──────────────┬────────────────┬────────────────┬──────────┐
│ Byte Index   │ 0            │ 1              │ 2              │ 3        │
├──────────────┼──────────────┼────────────────┼────────────────┼──────────┤
│ Field        │ Slave Addr   │ Function Code  │ Sensor ID High │ Sensor ID│
│              │              │                │                │ Low      │
├──────────────┼──────────────┼────────────────┼────────────────┼──────────┤
│ Value        │ 0x01-0xF7    │ 0x0A           │ 0x00           │ 0x01-0x20│
└──────────────┴──────────────┴────────────────┴────────────────┴──────────┘
┌──────────────┬──────────────┐
│ Byte Index   │ 4-5          │
├──────────────┼──────────────┤
│ Field        │ CRC16        │
├──────────────┼──────────────┤
│ Value        │ Lo-Hi bytes  │
└──────────────┴──────────────┘

Total Length: 6 bytes

Field Descriptions:
- Slave Address: The Modbus slave device address (1-247)
- Function Code: Always 0x0A for sensor data reading
- Sensor ID High: Always 0x00 (reserved for future use)
- Sensor ID Low: Sensor number (1-32) on the slave device
- CRC16: Modbus CRC16 checksum (low byte first, then high byte)

Example Request (Read sensor 1 from slave 0x01):
  Request: 01 0A 00 01 [CRC_LOW] [CRC_HIGH]

================================================================================
4. RESPONSE FORMAT
================================================================================

The slave responds with temperature and humidity data for the requested sensor.

Response Frame Structure:
┌─────────────┬────────────┬──────────────┬────────────┬──────────────────┐
│ Byte Index  │ 0          │ 1            │ 2          │ 3-7              │
├─────────────┼────────────┼──────────────┼────────────┼──────────────────┤
│ Field       │ Slave Addr │ Function Code│ Byte Count │ Temperature Data │
│             │            │              │            │ (5 bytes)        │
├─────────────┼────────────┼──────────────┼────────────┼──────────────────┤
│ Value       │ 0x01-0xF7  │ 0x0A         │ 0x0A (10)  │ See section 5    │
└─────────────┴────────────┴──────────────┴────────────┴──────────────────┘
┌─────────────┬──────────────────┬──────────┐
│ Byte Index  │ 8-12             │ 13-14    │
├─────────────┼──────────────────┼──────────┤
│ Field       │ Humidity Data    │ CRC16    │
│             │ (5 bytes)        │          │
├─────────────┼──────────────────┼──────────┤
│ Value       │ See section 5    │ Lo-Hi    │
└─────────────┴──────────────────┴──────────┘

Total Length: 15 bytes

Field Descriptions:
- Slave Address: Echo of the slave address from request
- Function Code: Echo of 0x0A
- Byte Count: Always 0x0A (10 decimal) - 5 bytes temp + 5 bytes humidity
- Temperature Data: 5-byte encoded temperature value
- Humidity Data: 5-byte encoded humidity value
- CRC16: Modbus CRC16 checksum (low byte first, then high byte)

Minimum Valid Response Length: 14 bytes
Expected Response Length: 15 bytes (with CRC)

================================================================================
5. DATA ENCODING
================================================================================

Both temperature and humidity use the same 5-byte encoding format:

5.1 Data Structure
┌──────────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│ Byte Index   │ 0        │ 1        │ 2        │ 3        │ 4        │
├──────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
│ Field        │ Sign     │ Hundreds │ Tens     │ Ones     │ Decimal  │
├──────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
│ Value Range  │ 0 or 1   │ 0-9      │ 0-9      │ 0-9      │ 0-9      │
└──────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘

5.2 Field Definitions
- Sign: 0 = positive, 1 = negative
- Hundreds: Hundreds digit (0-9)
- Tens: Tens digit (0-9)
- Ones: Ones digit (0-9)
- Decimal: First decimal place (0-9, represents 0.0-0.9)

5.3 Value Calculation
Final Value = Sign × (Hundreds × 100 + Tens × 10 + Ones + Decimal × 0.1)

Where Sign is: +1 if sign byte is 0, -1 if sign byte is 1

5.4 Data Not Available Indicator
When sensor data is not available or invalid, ALL 5 bytes are set to 0xFF:
  0xFF 0xFF 0xFF 0xFF 0xFF

The receiver should check if any byte is NOT 0xFF to determine if data is valid.
If all bytes are 0xFF, the data should be treated as unavailable (-100.0 default).

5.5 Encoding Examples

Example 1: Temperature = 25.3°C
  Bytes: 00 00 02 05 03
  Calculation: +(0×100 + 2×10 + 5 + 3×0.1) = +25.3

Example 2: Temperature = -5.7°C
  Bytes: 01 00 00 05 07
  Calculation: -(0×100 + 0×10 + 5 + 7×0.1) = -5.7

Example 3: Humidity = 65.0%
  Bytes: 00 00 06 05 00
  Calculation: +(0×100 + 6×10 + 5 + 0×0.1) = +65.0

Example 4: Data not available
  Bytes: FF FF FF FF FF
  Interpretation: No valid data (-100.0 default value)

Example 5: Temperature = 100.5°C
  Bytes: 00 01 00 00 05
  Calculation: +(1×100 + 0×10 + 0 + 5×0.1) = +100.5

================================================================================
6. COMPLETE TRANSACTION EXAMPLE
================================================================================

Master requests data from sensor 1 on slave 0x01:

REQUEST (6 bytes):
  01 0A 00 01 XX XX
  └─ Slave address: 0x01
     └─ Function code: 0x0A
        └─ Sensor ID high: 0x00
           └─ Sensor ID low: 0x01
              └─ CRC16 (calculated over bytes 0-3)

RESPONSE (15 bytes):
  01 0A 0A 00 00 02 05 03 00 00 06 05 00 XX XX
  └─ Slave address: 0x01
     └─ Function code: 0x0A
        └─ Byte count: 0x0A (10 bytes)
           └─ Temperature: 00 00 02 05 03 (+25.3°C)
                          └─ Humidity: 00 00 06 05 00 (+65.0%)
                                      └─ CRC16

Decoded Result:
  Temperature: +25.3°C
  Humidity: +65.0%

================================================================================
7. ERROR HANDLING
================================================================================

7.1 Invalid Response Conditions
The receiver should reject responses in the following cases:

1. Slave address mismatch: Response slave address ≠ request slave address
2. Function code mismatch: Response function code ≠ 0x0A
3. Insufficient length: Response length < 14 bytes
4. Invalid byte count: Byte count field ≠ 0x0A (10)
5. CRC error: Calculated CRC ≠ received CRC

7.2 Data Validation
After successful frame validation, check each sensor value:

- If all 5 bytes are 0xFF: Data not available, use default (-100.0)
- If at least one byte is NOT 0xFF: Decode the value normally
- Value range checking should be performed at application level

7.3 Timeout Handling
Recommended timeout: 50-100ms after sending request
If no response within timeout: Retry or report communication error

7.4 Modbus Exception Responses
Standard Modbus exception codes may be returned:
  [Slave Addr] [0x8A] [Exception Code] [CRC]

Where 0x8A = 0x0A + 0x80 (function code with MSB set)

Common exception codes:
- 0x01: Illegal Function (function code not supported)
- 0x02: Illegal Data Address (sensor address out of range)
- 0x03: Illegal Data Value (invalid request parameters)
- 0x04: Slave Device Failure (sensor read error)

================================================================================
8. IMPLEMENTATION NOTES
================================================================================

8.1 Multi-Sensor Support
- A single slave device can support 1-32 sensors (addresses 1-32)
- Each sensor must be initialized before reading
- Sensor addresses are independent of slave addresses
- Multiple slaves can exist on the same RS485 bus

8.2 Polling Frequency
- Recommended polling interval: 1-5 seconds per sensor
- Add delays between consecutive requests to prevent bus collisions
- Minimum delay between requests: 50ms

8.3 Bus Configuration
- RS485 requires proper termination resistors (120Ω)
- Maximum bus length depends on baud rate (typically 1200m at 9600 baud)
- Maximum number of devices: 32-247 (depending on hardware)

8.4 Data Caching
- The master typically caches the last received values
- Cached values are updated when new responses arrive
- Applications read from cache rather than directly from bus

8.5 CRC Calculation
- Use standard Modbus CRC16 algorithm
- Polynomial: 0xA001 (reversed 0x8005)
- Initial value: 0xFFFF
- CRC bytes transmitted: low byte first, then high byte

================================================================================
9. PROTOCOL LIMITATIONS
================================================================================

- Maximum sensors per slave: 32
- Temperature/humidity precision: 0.1 units
- Maximum value range: -999.9 to +999.9
- No timestamp or sensor identification in response
- No batch reading (must query each sensor individually)
- No sensor configuration commands in this protocol version

================================================================================
END OF SPECIFICATION
================================================================================

Print this item

  KC868-H32B Pro wrong firmware update
Posted by: Yooo - 10-27-2025, 01:53 PM - Forum: KC868-HxB series Smart Controller - Replies (1)

I have a KC868-H32B Pro controller on which I put a wrong firmware, I try to put the correct one on RS232 but I can't, it doesn't detect the bootloader. can i do something else or is it a brick?

Print this item

  IIC Connector type
Posted by: Eggman - 10-26-2025, 11:21 PM - Forum: KC868-A series and Uair Smart Controller - Replies (1)

Can someone tell me what type of connector is used on the KC868-A6 for the IIC port?  Is it a JST XH 2.5mm pitch.

Print this item

  kc868 pzem017 18b20
Posted by: billythekid57 - 10-26-2025, 05:04 PM - Forum: KC868-A series and Uair Smart Controller - Replies (10)

Hello to the forum, this is my first post. I purchased two KC868 A16 boards to use with DS18B20 temperature sensors and PZEM 017 meters. I saw two firmwares here; one has working inputs and outputs, but it doesn't have DS18B20 or PZEM listed. I tried the other for DS18B20, and it works, except now the inputs are missing. I tried using TasmoCompiler to create a binary, but the update says the file is invalid. I set ESP32 and ESP32 S3, but neither works. If anyone has a firmware that works, please let me know.

Print this item

  Connection Internet
Posted by: shochif - 10-26-2025, 10:51 AM - Forum: KinCony Server-Mini / Server-16 Raspberry Pi4 relay module - Replies (1)

can i using sim7600E for the main internet an i share the internet using switch base on HomeAssistant???

Print this item

  Z1 Transmit action from. Home Asssistant
Posted by: paulbalinnel - 10-26-2025, 09:06 AM - Forum: KC868-AG / AG Pro / AG8 / Z1 - Replies (11)

Hello, please describe the best way to send an action from HA for RF to be transmitted from Z1.

Currently, I have a TV lift with a remote that has UP, STOP, and DOWN buttons. I have already programmed these as RF1, RF2, and RF3 in KCS. However, they appear in HA as binary sensors, not switches.

TCP and HTTP?

Thanks

Print this item

  Reed water meter
Posted by: mdiessner - 10-25-2025, 05:42 AM - Forum: B16 - Replies (3)

I would like to use this product:
https://www.kincony.com/esp32-s3-16ch-sm...oller.html

In order to read water meter
https://www.transducers.co.za/media/1868...-meter.pdf

Please advise if this is possible, it not what else to use?

The idea is to count every pulse using the digital input, and increasing the count value and storing the value in case of reboot/power failure

Print this item

  KC868-A16
Posted by: eligijus - 10-24-2025, 05:32 AM - Forum: "KCS" v2 firmware system - Replies (8)

Hello, can you upload an example yaml file # DHT22 temperature-humidity sensor integration into home assistant

Print this item