<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Smart Home Automation Forum - Extender module]]></title>
		<link>https://www.kincony.com/forum/</link>
		<description><![CDATA[Smart Home Automation Forum - https://www.kincony.com/forum]]></description>
		<pubDate>Sun, 05 Apr 2026 23:29:37 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[smoke sensor user manual]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8955</link>
			<pubDate>Mon, 19 Jan 2026 16:34:13 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8955</guid>
			<description><![CDATA[smoke sensor user manual:<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/pdf.png" title="Adobe Acrobat PDF" border="0" alt=".pdf" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=9047" target="_blank" title="">smoke_sensor_user_manual.pdf</a> (Size: 2.56 MB / Downloads: 108)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[smoke sensor user manual:<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/pdf.png" title="Adobe Acrobat PDF" border="0" alt=".pdf" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=9047" target="_blank" title="">smoke_sensor_user_manual.pdf</a> (Size: 2.56 MB / Downloads: 108)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[gas sensor user manual]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8954</link>
			<pubDate>Mon, 19 Jan 2026 16:32:19 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8954</guid>
			<description><![CDATA[wired gas sensor manual:<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/pdf.png" title="Adobe Acrobat PDF" border="0" alt=".pdf" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=9046" target="_blank" title="">gas-sensor-manual.pdf</a> (Size: 1.84 MB / Downloads: 88)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[wired gas sensor manual:<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/pdf.png" title="Adobe Acrobat PDF" border="0" alt=".pdf" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=9046" target="_blank" title="">gas-sensor-manual.pdf</a> (Size: 1.84 MB / Downloads: 88)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[temperature humidity sensor convertor – TR ESP32 Pin define]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8741</link>
			<pubDate>Sat, 15 Nov 2025 07:58:27 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8741</guid>
			<description><![CDATA[IIC Bus:<br />
<br />
SDA:GPIO10<br />
SCL:GPIO9<br />
<br />
24C02 EPROM i2c address: 0x50<br />
<br />
-----------------<br />
1-wire GPIOs (with pull-up resistance on PCB): <br />
1-wire-1:GPIO17<br />
1-wire-2:GPIO16<br />
1-wire-3:GPIO15<br />
1-wire-4:GPIO7<br />
-----------------<br />
free GPIOs (without pull-up resistance on PCB): <br />
GPIO4  GPIO1<br />
GPIO5  GPIO2<br />
GPIO6<br />
GPIO18<br />
GPIO8  GPIO42<br />
GPIO3  GPIO41<br />
GPIO21  GPIO40<br />
GPIO47  GPIO39<br />
GPIO48  GPIO38<br />
-----------------<br />
<br />
RS485: <br />
RXD:GPIO14<br />
TXD:GPIO13]]></description>
			<content:encoded><![CDATA[IIC Bus:<br />
<br />
SDA:GPIO10<br />
SCL:GPIO9<br />
<br />
24C02 EPROM i2c address: 0x50<br />
<br />
-----------------<br />
1-wire GPIOs (with pull-up resistance on PCB): <br />
1-wire-1:GPIO17<br />
1-wire-2:GPIO16<br />
1-wire-3:GPIO15<br />
1-wire-4:GPIO7<br />
-----------------<br />
free GPIOs (without pull-up resistance on PCB): <br />
GPIO4  GPIO1<br />
GPIO5  GPIO2<br />
GPIO6<br />
GPIO18<br />
GPIO8  GPIO42<br />
GPIO3  GPIO41<br />
GPIO21  GPIO40<br />
GPIO47  GPIO39<br />
GPIO48  GPIO38<br />
-----------------<br />
<br />
RS485: <br />
RXD:GPIO14<br />
TXD:GPIO13]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[temperature humidity sensor convertor – TR RS485 Modbus protocol]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8686</link>
			<pubDate>Tue, 28 Oct 2025 08:42:35 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8686</guid>
			<description><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>================================================================================<br />
  RS485 TEMPERATURE &amp; HUMIDITY SENSOR PROTOCOL SPECIFICATION<br />
================================================================================<br />
<br />
Communication: RS485 (Modbus-based Custom Protocol)<br />
<br />
================================================================================<br />
1. OVERVIEW<br />
================================================================================<br />
<br />
This document describes the custom Modbus-based protocol for communicating with<br />
temperature and humidity sensors over RS485. The protocol supports up to 32<br />
sensors per slave device, allowing for distributed sensor networks.<br />
<br />
Key Features:<br />
- Modbus RTU framing with CRC16<br />
- Custom function code for sensor data reading<br />
- Support for 1-32 sensors per slave address<br />
- Temperature and humidity readings with 0.1 degree/percent precision<br />
- Explicit encoding for unavailable sensor data<br />
<br />
================================================================================<br />
2. PROTOCOL PARAMETERS<br />
================================================================================<br />
<br />
Modbus Function Code: 0x0A (READ_SENSOR_DATA)<br />
Baud Rate: As configured by RS485 driver<br />
Data Format: 8N1 (8 data bits, no parity, 1 stop bit)<br />
CRC: Modbus CRC16 (polynomial 0xA001)<br />
<br />
Sensor Address Range: 1-32 (0x01-0x20)<br />
Slave Address Range: 1-247 (0x01-0xF7, standard Modbus range)<br />
<br />
================================================================================<br />
3. REQUEST FORMAT<br />
================================================================================<br />
<br />
The master sends a request to read sensor data from a specific sensor.<br />
<br />
Request Frame Structure:<br />
┌──────────────┬──────────────┬────────────────┬────────────────┬──────────┐<br />
│ Byte Index &nbsp;&nbsp;│ 0            │ 1              │ 2              │ 3        │<br />
├──────────────┼──────────────┼────────────────┼────────────────┼──────────┤<br />
│ Field        │ Slave Addr &nbsp;&nbsp;│ Function Code  │ Sensor ID High │ Sensor ID│<br />
│              │              │                │                │ Low      │<br />
├──────────────┼──────────────┼────────────────┼────────────────┼──────────┤<br />
│ Value        │ 0x01-0xF7    │ 0x0A         &nbsp;&nbsp;│ 0x00         &nbsp;&nbsp;│ 0x01-0x20│<br />
└──────────────┴──────────────┴────────────────┴────────────────┴──────────┘<br />
┌──────────────┬──────────────┐<br />
│ Byte Index &nbsp;&nbsp;│ 4-5          │<br />
├──────────────┼──────────────┤<br />
│ Field        │ CRC16        │<br />
├──────────────┼──────────────┤<br />
│ Value        │ Lo-Hi bytes  │<br />
└──────────────┴──────────────┘<br />
<br />
Total Length: 6 bytes<br />
<br />
Field Descriptions:<br />
- Slave Address: The Modbus slave device address (1-247)<br />
- Function Code: Always 0x0A for sensor data reading<br />
- Sensor ID High: Always 0x00 (reserved for future use)<br />
- Sensor ID Low: Sensor number (1-32) on the slave device<br />
- CRC16: Modbus CRC16 checksum (low byte first, then high byte)<br />
<br />
Example Request (Read sensor 1 from slave 0x01):<br />
  Request: 01 0A 00 01 [CRC_LOW] [CRC_HIGH]<br />
<br />
================================================================================<br />
4. RESPONSE FORMAT<br />
================================================================================<br />
<br />
The slave responds with temperature and humidity data for the requested sensor.<br />
<br />
Response Frame Structure:<br />
┌─────────────┬────────────┬──────────────┬────────────┬──────────────────┐<br />
│ Byte Index  │ 0          │ 1            │ 2          │ 3-7              │<br />
├─────────────┼────────────┼──────────────┼────────────┼──────────────────┤<br />
│ Field     &nbsp;&nbsp;│ Slave Addr │ Function Code│ Byte Count │ Temperature Data │<br />
│           &nbsp;&nbsp;│            │              │            │ (5 bytes)        │<br />
├─────────────┼────────────┼──────────────┼────────────┼──────────────────┤<br />
│ Value     &nbsp;&nbsp;│ 0x01-0xF7  │ 0x0A       &nbsp;&nbsp;│ 0x0A (10)  │ See section 5    │<br />
└─────────────┴────────────┴──────────────┴────────────┴──────────────────┘<br />
┌─────────────┬──────────────────┬──────────┐<br />
│ Byte Index  │ 8-12           &nbsp;&nbsp;│ 13-14    │<br />
├─────────────┼──────────────────┼──────────┤<br />
│ Field     &nbsp;&nbsp;│ Humidity Data    │ CRC16    │<br />
│           &nbsp;&nbsp;│ (5 bytes)        │          │<br />
├─────────────┼──────────────────┼──────────┤<br />
│ Value     &nbsp;&nbsp;│ See section 5    │ Lo-Hi    │<br />
└─────────────┴──────────────────┴──────────┘<br />
<br />
Total Length: 15 bytes<br />
<br />
Field Descriptions:<br />
- Slave Address: Echo of the slave address from request<br />
- Function Code: Echo of 0x0A<br />
- Byte Count: Always 0x0A (10 decimal) - 5 bytes temp + 5 bytes humidity<br />
- Temperature Data: 5-byte encoded temperature value<br />
- Humidity Data: 5-byte encoded humidity value<br />
- CRC16: Modbus CRC16 checksum (low byte first, then high byte)<br />
<br />
Minimum Valid Response Length: 14 bytes<br />
Expected Response Length: 15 bytes (with CRC)<br />
<br />
================================================================================<br />
5. DATA ENCODING<br />
================================================================================<br />
<br />
Both temperature and humidity use the same 5-byte encoding format:<br />
<br />
5.1 Data Structure<br />
┌──────────────┬──────────┬──────────┬──────────┬──────────┬──────────┐<br />
│ Byte Index &nbsp;&nbsp;│ 0        │ 1        │ 2        │ 3        │ 4        │<br />
├──────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤<br />
│ Field        │ Sign   &nbsp;&nbsp;│ Hundreds │ Tens   &nbsp;&nbsp;│ Ones   &nbsp;&nbsp;│ Decimal  │<br />
├──────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤<br />
│ Value Range  │ 0 or 1 &nbsp;&nbsp;│ 0-9      │ 0-9      │ 0-9      │ 0-9      │<br />
└──────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘<br />
<br />
5.2 Field Definitions<br />
- Sign: 0 = positive, 1 = negative<br />
- Hundreds: Hundreds digit (0-9)<br />
- Tens: Tens digit (0-9)<br />
- Ones: Ones digit (0-9)<br />
- Decimal: First decimal place (0-9, represents 0.0-0.9)<br />
<br />
5.3 Value Calculation<br />
Final Value = Sign × (Hundreds × 100 + Tens × 10 + Ones + Decimal × 0.1)<br />
<br />
Where Sign is: +1 if sign byte is 0, -1 if sign byte is 1<br />
<br />
5.4 Data Not Available Indicator<br />
When sensor data is not available or invalid, ALL 5 bytes are set to 0xFF:<br />
  0xFF 0xFF 0xFF 0xFF 0xFF<br />
<br />
The receiver should check if any byte is NOT 0xFF to determine if data is valid.<br />
If all bytes are 0xFF, the data should be treated as unavailable (-100.0 default).<br />
<br />
5.5 Encoding Examples<br />
<br />
Example 1: Temperature = 25.3°C<br />
  Bytes: 00 00 02 05 03<br />
  Calculation: +(0×100 + 2×10 + 5 + 3×0.1) = +25.3<br />
<br />
Example 2: Temperature = -5.7°C<br />
  Bytes: 01 00 00 05 07<br />
  Calculation: -(0×100 + 0×10 + 5 + 7×0.1) = -5.7<br />
<br />
Example 3: Humidity = 65.0%<br />
  Bytes: 00 00 06 05 00<br />
  Calculation: +(0×100 + 6×10 + 5 + 0×0.1) = +65.0<br />
<br />
Example 4: Data not available<br />
  Bytes: FF FF FF FF FF<br />
  Interpretation: No valid data (-100.0 default value)<br />
<br />
Example 5: Temperature = 100.5°C<br />
  Bytes: 00 01 00 00 05<br />
  Calculation: +(1×100 + 0×10 + 0 + 5×0.1) = +100.5<br />
<br />
================================================================================<br />
6. COMPLETE TRANSACTION EXAMPLE<br />
================================================================================<br />
<br />
Master requests data from sensor 1 on slave 0x01:<br />
<br />
REQUEST (6 bytes):<br />
  01 0A 00 01 XX XX<br />
  └─ Slave address: 0x01<br />
   &nbsp;&nbsp;└─ Function code: 0x0A<br />
        └─ Sensor ID high: 0x00<br />
         &nbsp;&nbsp;└─ Sensor ID low: 0x01<br />
              └─ CRC16 (calculated over bytes 0-3)<br />
<br />
RESPONSE (15 bytes):<br />
  01 0A 0A 00 00 02 05 03 00 00 06 05 00 XX XX<br />
  └─ Slave address: 0x01<br />
   &nbsp;&nbsp;└─ Function code: 0x0A<br />
        └─ Byte count: 0x0A (10 bytes)<br />
         &nbsp;&nbsp;└─ Temperature: 00 00 02 05 03 (+25.3°C)<br />
                          └─ Humidity: 00 00 06 05 00 (+65.0%)<br />
                                      └─ CRC16<br />
<br />
Decoded Result:<br />
  Temperature: +25.3°C<br />
  Humidity: +65.0%<br />
<br />
================================================================================<br />
7. ERROR HANDLING<br />
================================================================================<br />
<br />
7.1 Invalid Response Conditions<br />
The receiver should reject responses in the following cases:<br />
<br />
1. Slave address mismatch: Response slave address ≠ request slave address<br />
2. Function code mismatch: Response function code ≠ 0x0A<br />
3. Insufficient length: Response length &lt; 14 bytes<br />
4. Invalid byte count: Byte count field ≠ 0x0A (10)<br />
5. CRC error: Calculated CRC ≠ received CRC<br />
<br />
7.2 Data Validation<br />
After successful frame validation, check each sensor value:<br />
<br />
- If all 5 bytes are 0xFF: Data not available, use default (-100.0)<br />
- If at least one byte is NOT 0xFF: Decode the value normally<br />
- Value range checking should be performed at application level<br />
<br />
7.3 Timeout Handling<br />
Recommended timeout: 50-100ms after sending request<br />
If no response within timeout: Retry or report communication error<br />
<br />
7.4 Modbus Exception Responses<br />
Standard Modbus exception codes may be returned:<br />
  [Slave Addr] [0x8A] [Exception Code] [CRC]<br />
<br />
Where 0x8A = 0x0A + 0x80 (function code with MSB set)<br />
<br />
Common exception codes:<br />
- 0x01: Illegal Function (function code not supported)<br />
- 0x02: Illegal Data Address (sensor address out of range)<br />
- 0x03: Illegal Data Value (invalid request parameters)<br />
- 0x04: Slave Device Failure (sensor read error)<br />
<br />
================================================================================<br />
8. IMPLEMENTATION NOTES<br />
================================================================================<br />
<br />
8.1 Multi-Sensor Support<br />
- A single slave device can support 1-32 sensors (addresses 1-32)<br />
- Each sensor must be initialized before reading<br />
- Sensor addresses are independent of slave addresses<br />
- Multiple slaves can exist on the same RS485 bus<br />
<br />
8.2 Polling Frequency<br />
- Recommended polling interval: 1-5 seconds per sensor<br />
- Add delays between consecutive requests to prevent bus collisions<br />
- Minimum delay between requests: 50ms<br />
<br />
8.3 Bus Configuration<br />
- RS485 requires proper termination resistors (120Ω)<br />
- Maximum bus length depends on baud rate (typically 1200m at 9600 baud)<br />
- Maximum number of devices: 32-247 (depending on hardware)<br />
<br />
8.4 Data Caching<br />
- The master typically caches the last received values<br />
- Cached values are updated when new responses arrive<br />
- Applications read from cache rather than directly from bus<br />
<br />
8.5 CRC Calculation<br />
- Use standard Modbus CRC16 algorithm<br />
- Polynomial: 0xA001 (reversed 0x8005)<br />
- Initial value: 0xFFFF<br />
- CRC bytes transmitted: low byte first, then high byte<br />
<br />
================================================================================<br />
9. PROTOCOL LIMITATIONS<br />
================================================================================<br />
<br />
- Maximum sensors per slave: 32<br />
- Temperature/humidity precision: 0.1 units<br />
- Maximum value range: -999.9 to +999.9<br />
- No timestamp or sensor identification in response<br />
- No batch reading (must query each sensor individually)<br />
- No sensor configuration commands in this protocol version<br />
<br />
================================================================================<br />
END OF SPECIFICATION<br />
================================================================================</code></div></div>]]></description>
			<content:encoded><![CDATA[<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>================================================================================<br />
  RS485 TEMPERATURE &amp; HUMIDITY SENSOR PROTOCOL SPECIFICATION<br />
================================================================================<br />
<br />
Communication: RS485 (Modbus-based Custom Protocol)<br />
<br />
================================================================================<br />
1. OVERVIEW<br />
================================================================================<br />
<br />
This document describes the custom Modbus-based protocol for communicating with<br />
temperature and humidity sensors over RS485. The protocol supports up to 32<br />
sensors per slave device, allowing for distributed sensor networks.<br />
<br />
Key Features:<br />
- Modbus RTU framing with CRC16<br />
- Custom function code for sensor data reading<br />
- Support for 1-32 sensors per slave address<br />
- Temperature and humidity readings with 0.1 degree/percent precision<br />
- Explicit encoding for unavailable sensor data<br />
<br />
================================================================================<br />
2. PROTOCOL PARAMETERS<br />
================================================================================<br />
<br />
Modbus Function Code: 0x0A (READ_SENSOR_DATA)<br />
Baud Rate: As configured by RS485 driver<br />
Data Format: 8N1 (8 data bits, no parity, 1 stop bit)<br />
CRC: Modbus CRC16 (polynomial 0xA001)<br />
<br />
Sensor Address Range: 1-32 (0x01-0x20)<br />
Slave Address Range: 1-247 (0x01-0xF7, standard Modbus range)<br />
<br />
================================================================================<br />
3. REQUEST FORMAT<br />
================================================================================<br />
<br />
The master sends a request to read sensor data from a specific sensor.<br />
<br />
Request Frame Structure:<br />
┌──────────────┬──────────────┬────────────────┬────────────────┬──────────┐<br />
│ Byte Index &nbsp;&nbsp;│ 0            │ 1              │ 2              │ 3        │<br />
├──────────────┼──────────────┼────────────────┼────────────────┼──────────┤<br />
│ Field        │ Slave Addr &nbsp;&nbsp;│ Function Code  │ Sensor ID High │ Sensor ID│<br />
│              │              │                │                │ Low      │<br />
├──────────────┼──────────────┼────────────────┼────────────────┼──────────┤<br />
│ Value        │ 0x01-0xF7    │ 0x0A         &nbsp;&nbsp;│ 0x00         &nbsp;&nbsp;│ 0x01-0x20│<br />
└──────────────┴──────────────┴────────────────┴────────────────┴──────────┘<br />
┌──────────────┬──────────────┐<br />
│ Byte Index &nbsp;&nbsp;│ 4-5          │<br />
├──────────────┼──────────────┤<br />
│ Field        │ CRC16        │<br />
├──────────────┼──────────────┤<br />
│ Value        │ Lo-Hi bytes  │<br />
└──────────────┴──────────────┘<br />
<br />
Total Length: 6 bytes<br />
<br />
Field Descriptions:<br />
- Slave Address: The Modbus slave device address (1-247)<br />
- Function Code: Always 0x0A for sensor data reading<br />
- Sensor ID High: Always 0x00 (reserved for future use)<br />
- Sensor ID Low: Sensor number (1-32) on the slave device<br />
- CRC16: Modbus CRC16 checksum (low byte first, then high byte)<br />
<br />
Example Request (Read sensor 1 from slave 0x01):<br />
  Request: 01 0A 00 01 [CRC_LOW] [CRC_HIGH]<br />
<br />
================================================================================<br />
4. RESPONSE FORMAT<br />
================================================================================<br />
<br />
The slave responds with temperature and humidity data for the requested sensor.<br />
<br />
Response Frame Structure:<br />
┌─────────────┬────────────┬──────────────┬────────────┬──────────────────┐<br />
│ Byte Index  │ 0          │ 1            │ 2          │ 3-7              │<br />
├─────────────┼────────────┼──────────────┼────────────┼──────────────────┤<br />
│ Field     &nbsp;&nbsp;│ Slave Addr │ Function Code│ Byte Count │ Temperature Data │<br />
│           &nbsp;&nbsp;│            │              │            │ (5 bytes)        │<br />
├─────────────┼────────────┼──────────────┼────────────┼──────────────────┤<br />
│ Value     &nbsp;&nbsp;│ 0x01-0xF7  │ 0x0A       &nbsp;&nbsp;│ 0x0A (10)  │ See section 5    │<br />
└─────────────┴────────────┴──────────────┴────────────┴──────────────────┘<br />
┌─────────────┬──────────────────┬──────────┐<br />
│ Byte Index  │ 8-12           &nbsp;&nbsp;│ 13-14    │<br />
├─────────────┼──────────────────┼──────────┤<br />
│ Field     &nbsp;&nbsp;│ Humidity Data    │ CRC16    │<br />
│           &nbsp;&nbsp;│ (5 bytes)        │          │<br />
├─────────────┼──────────────────┼──────────┤<br />
│ Value     &nbsp;&nbsp;│ See section 5    │ Lo-Hi    │<br />
└─────────────┴──────────────────┴──────────┘<br />
<br />
Total Length: 15 bytes<br />
<br />
Field Descriptions:<br />
- Slave Address: Echo of the slave address from request<br />
- Function Code: Echo of 0x0A<br />
- Byte Count: Always 0x0A (10 decimal) - 5 bytes temp + 5 bytes humidity<br />
- Temperature Data: 5-byte encoded temperature value<br />
- Humidity Data: 5-byte encoded humidity value<br />
- CRC16: Modbus CRC16 checksum (low byte first, then high byte)<br />
<br />
Minimum Valid Response Length: 14 bytes<br />
Expected Response Length: 15 bytes (with CRC)<br />
<br />
================================================================================<br />
5. DATA ENCODING<br />
================================================================================<br />
<br />
Both temperature and humidity use the same 5-byte encoding format:<br />
<br />
5.1 Data Structure<br />
┌──────────────┬──────────┬──────────┬──────────┬──────────┬──────────┐<br />
│ Byte Index &nbsp;&nbsp;│ 0        │ 1        │ 2        │ 3        │ 4        │<br />
├──────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤<br />
│ Field        │ Sign   &nbsp;&nbsp;│ Hundreds │ Tens   &nbsp;&nbsp;│ Ones   &nbsp;&nbsp;│ Decimal  │<br />
├──────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤<br />
│ Value Range  │ 0 or 1 &nbsp;&nbsp;│ 0-9      │ 0-9      │ 0-9      │ 0-9      │<br />
└──────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘<br />
<br />
5.2 Field Definitions<br />
- Sign: 0 = positive, 1 = negative<br />
- Hundreds: Hundreds digit (0-9)<br />
- Tens: Tens digit (0-9)<br />
- Ones: Ones digit (0-9)<br />
- Decimal: First decimal place (0-9, represents 0.0-0.9)<br />
<br />
5.3 Value Calculation<br />
Final Value = Sign × (Hundreds × 100 + Tens × 10 + Ones + Decimal × 0.1)<br />
<br />
Where Sign is: +1 if sign byte is 0, -1 if sign byte is 1<br />
<br />
5.4 Data Not Available Indicator<br />
When sensor data is not available or invalid, ALL 5 bytes are set to 0xFF:<br />
  0xFF 0xFF 0xFF 0xFF 0xFF<br />
<br />
The receiver should check if any byte is NOT 0xFF to determine if data is valid.<br />
If all bytes are 0xFF, the data should be treated as unavailable (-100.0 default).<br />
<br />
5.5 Encoding Examples<br />
<br />
Example 1: Temperature = 25.3°C<br />
  Bytes: 00 00 02 05 03<br />
  Calculation: +(0×100 + 2×10 + 5 + 3×0.1) = +25.3<br />
<br />
Example 2: Temperature = -5.7°C<br />
  Bytes: 01 00 00 05 07<br />
  Calculation: -(0×100 + 0×10 + 5 + 7×0.1) = -5.7<br />
<br />
Example 3: Humidity = 65.0%<br />
  Bytes: 00 00 06 05 00<br />
  Calculation: +(0×100 + 6×10 + 5 + 0×0.1) = +65.0<br />
<br />
Example 4: Data not available<br />
  Bytes: FF FF FF FF FF<br />
  Interpretation: No valid data (-100.0 default value)<br />
<br />
Example 5: Temperature = 100.5°C<br />
  Bytes: 00 01 00 00 05<br />
  Calculation: +(1×100 + 0×10 + 0 + 5×0.1) = +100.5<br />
<br />
================================================================================<br />
6. COMPLETE TRANSACTION EXAMPLE<br />
================================================================================<br />
<br />
Master requests data from sensor 1 on slave 0x01:<br />
<br />
REQUEST (6 bytes):<br />
  01 0A 00 01 XX XX<br />
  └─ Slave address: 0x01<br />
   &nbsp;&nbsp;└─ Function code: 0x0A<br />
        └─ Sensor ID high: 0x00<br />
         &nbsp;&nbsp;└─ Sensor ID low: 0x01<br />
              └─ CRC16 (calculated over bytes 0-3)<br />
<br />
RESPONSE (15 bytes):<br />
  01 0A 0A 00 00 02 05 03 00 00 06 05 00 XX XX<br />
  └─ Slave address: 0x01<br />
   &nbsp;&nbsp;└─ Function code: 0x0A<br />
        └─ Byte count: 0x0A (10 bytes)<br />
         &nbsp;&nbsp;└─ Temperature: 00 00 02 05 03 (+25.3°C)<br />
                          └─ Humidity: 00 00 06 05 00 (+65.0%)<br />
                                      └─ CRC16<br />
<br />
Decoded Result:<br />
  Temperature: +25.3°C<br />
  Humidity: +65.0%<br />
<br />
================================================================================<br />
7. ERROR HANDLING<br />
================================================================================<br />
<br />
7.1 Invalid Response Conditions<br />
The receiver should reject responses in the following cases:<br />
<br />
1. Slave address mismatch: Response slave address ≠ request slave address<br />
2. Function code mismatch: Response function code ≠ 0x0A<br />
3. Insufficient length: Response length &lt; 14 bytes<br />
4. Invalid byte count: Byte count field ≠ 0x0A (10)<br />
5. CRC error: Calculated CRC ≠ received CRC<br />
<br />
7.2 Data Validation<br />
After successful frame validation, check each sensor value:<br />
<br />
- If all 5 bytes are 0xFF: Data not available, use default (-100.0)<br />
- If at least one byte is NOT 0xFF: Decode the value normally<br />
- Value range checking should be performed at application level<br />
<br />
7.3 Timeout Handling<br />
Recommended timeout: 50-100ms after sending request<br />
If no response within timeout: Retry or report communication error<br />
<br />
7.4 Modbus Exception Responses<br />
Standard Modbus exception codes may be returned:<br />
  [Slave Addr] [0x8A] [Exception Code] [CRC]<br />
<br />
Where 0x8A = 0x0A + 0x80 (function code with MSB set)<br />
<br />
Common exception codes:<br />
- 0x01: Illegal Function (function code not supported)<br />
- 0x02: Illegal Data Address (sensor address out of range)<br />
- 0x03: Illegal Data Value (invalid request parameters)<br />
- 0x04: Slave Device Failure (sensor read error)<br />
<br />
================================================================================<br />
8. IMPLEMENTATION NOTES<br />
================================================================================<br />
<br />
8.1 Multi-Sensor Support<br />
- A single slave device can support 1-32 sensors (addresses 1-32)<br />
- Each sensor must be initialized before reading<br />
- Sensor addresses are independent of slave addresses<br />
- Multiple slaves can exist on the same RS485 bus<br />
<br />
8.2 Polling Frequency<br />
- Recommended polling interval: 1-5 seconds per sensor<br />
- Add delays between consecutive requests to prevent bus collisions<br />
- Minimum delay between requests: 50ms<br />
<br />
8.3 Bus Configuration<br />
- RS485 requires proper termination resistors (120Ω)<br />
- Maximum bus length depends on baud rate (typically 1200m at 9600 baud)<br />
- Maximum number of devices: 32-247 (depending on hardware)<br />
<br />
8.4 Data Caching<br />
- The master typically caches the last received values<br />
- Cached values are updated when new responses arrive<br />
- Applications read from cache rather than directly from bus<br />
<br />
8.5 CRC Calculation<br />
- Use standard Modbus CRC16 algorithm<br />
- Polynomial: 0xA001 (reversed 0x8005)<br />
- Initial value: 0xFFFF<br />
- CRC bytes transmitted: low byte first, then high byte<br />
<br />
================================================================================<br />
9. PROTOCOL LIMITATIONS<br />
================================================================================<br />
<br />
- Maximum sensors per slave: 32<br />
- Temperature/humidity precision: 0.1 units<br />
- Maximum value range: -999.9 to +999.9<br />
- No timestamp or sensor identification in response<br />
- No batch reading (must query each sensor individually)<br />
- No sensor configuration commands in this protocol version<br />
<br />
================================================================================<br />
END OF SPECIFICATION<br />
================================================================================</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[how to use HAv2 RS485 switch adapter work with E16S relay board]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8119</link>
			<pubDate>Thu, 29 May 2025 10:13:51 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8119</guid>
			<description><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7702" target="_blank" title="">E16S-HAv2-1.JPG</a> (Size: 250.08 KB / Downloads: 433)
<!-- end: postbit_attachments_attachment --><br />
1. download KCS v2 firmware to KC868-E16S board, enable RS485 with "MODBUS-HA" mode.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7704" target="_blank" title="">KCS-setting.png</a> (Size: 52.56 KB / Downloads: 501)
<!-- end: postbit_attachments_attachment --><br />
2. use HAv2 PC config tool set the button action.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7703" target="_blank" title="">HAv2-pc-software.png</a> (Size: 225.68 KB / Downloads: 436)
<!-- end: postbit_attachments_attachment --><br />
3. connect HAv2 with wall switch panel's K1,K2,K3,K4,K5,K6,KCOM to HAv2 board (use for buttons). D1,D2,D3,D4,D5,D6,DC12V to HAv2 board (use for LED state feedback) <br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7705" target="_blank" title="">E16S-HAv2-3.JPG</a> (Size: 144.56 KB / Downloads: 429)
<!-- end: postbit_attachments_attachment --><br />
4. when press switch panel button or control by KCS monitor webpage or tuya app, the switch LED state will be updated.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7706" target="_blank" title="">E16S-HAv2-2.JPG</a> (Size: 279.87 KB / Downloads: 449)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7707" target="_blank" title="">E16S-HAv2-4.JPG</a> (Size: 218.04 KB / Downloads: 423)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7708" target="_blank" title="">E16S-HAv2-5.JPG</a> (Size: 127.19 KB / Downloads: 430)
<!-- end: postbit_attachments_attachment --><br />
<br />
this just demo for 6 relay, if you want many more switch panel control for 16 channel relay. just add switch panel and HAv2 module, parallel connection with RS485 port on KC868-E16S.<br />
<br />
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/OrzSyeozzV4" frameborder="0" allowfullscreen="true"></iframe>]]></description>
			<content:encoded><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7702" target="_blank" title="">E16S-HAv2-1.JPG</a> (Size: 250.08 KB / Downloads: 433)
<!-- end: postbit_attachments_attachment --><br />
1. download KCS v2 firmware to KC868-E16S board, enable RS485 with "MODBUS-HA" mode.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7704" target="_blank" title="">KCS-setting.png</a> (Size: 52.56 KB / Downloads: 501)
<!-- end: postbit_attachments_attachment --><br />
2. use HAv2 PC config tool set the button action.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7703" target="_blank" title="">HAv2-pc-software.png</a> (Size: 225.68 KB / Downloads: 436)
<!-- end: postbit_attachments_attachment --><br />
3. connect HAv2 with wall switch panel's K1,K2,K3,K4,K5,K6,KCOM to HAv2 board (use for buttons). D1,D2,D3,D4,D5,D6,DC12V to HAv2 board (use for LED state feedback) <br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7705" target="_blank" title="">E16S-HAv2-3.JPG</a> (Size: 144.56 KB / Downloads: 429)
<!-- end: postbit_attachments_attachment --><br />
4. when press switch panel button or control by KCS monitor webpage or tuya app, the switch LED state will be updated.<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7706" target="_blank" title="">E16S-HAv2-2.JPG</a> (Size: 279.87 KB / Downloads: 449)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7707" target="_blank" title="">E16S-HAv2-4.JPG</a> (Size: 218.04 KB / Downloads: 423)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7708" target="_blank" title="">E16S-HAv2-5.JPG</a> (Size: 127.19 KB / Downloads: 430)
<!-- end: postbit_attachments_attachment --><br />
<br />
this just demo for 6 relay, if you want many more switch panel control for 16 channel relay. just add switch panel and HAv2 module, parallel connection with RS485 port on KC868-E16S.<br />
<br />
<iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/OrzSyeozzV4" frameborder="0" allowfullscreen="true"></iframe>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[smoke sensor pin define]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=8077</link>
			<pubDate>Thu, 15 May 2025 08:22:59 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=8077</guid>
			<description><![CDATA[cable color pin define:<br />
RED: DC12V+<br />
BLACK: GND<br />
WHITE: COM<br />
ORANGE: Normal Open<br />
YELLOW: Normal Close<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7664" target="_blank" title="">smoke-sensor-1.jpg</a> (Size: 263.03 KB / Downloads: 366)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7665" target="_blank" title="">smoke-sensor-2.jpg</a> (Size: 118.24 KB / Downloads: 390)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7666" target="_blank" title="">smoke-sensor-3.jpg</a> (Size: 234 KB / Downloads: 369)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[cable color pin define:<br />
RED: DC12V+<br />
BLACK: GND<br />
WHITE: COM<br />
ORANGE: Normal Open<br />
YELLOW: Normal Close<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7664" target="_blank" title="">smoke-sensor-1.jpg</a> (Size: 263.03 KB / Downloads: 366)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7665" target="_blank" title="">smoke-sensor-2.jpg</a> (Size: 118.24 KB / Downloads: 390)
<!-- end: postbit_attachments_attachment --><br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="JPG Image" border="0" alt=".jpg" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7666" target="_blank" title="">smoke-sensor-3.jpg</a> (Size: 234 KB / Downloads: 369)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Presence Sensor Remote Control User Manual]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=7823</link>
			<pubDate>Tue, 18 Mar 2025 08:39:35 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=7823</guid>
			<description><![CDATA[Presence Sensor Remote Control User Manual PDF<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/pdf.png" title="Adobe Acrobat PDF" border="0" alt=".pdf" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7306" target="_blank" title="">Presence-Sensor-Remote-Control-User-Manual.pdf</a> (Size: 558.23 KB / Downloads: 481)
<!-- end: postbit_attachments_attachment -->]]></description>
			<content:encoded><![CDATA[Presence Sensor Remote Control User Manual PDF<br />
<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/pdf.png" title="Adobe Acrobat PDF" border="0" alt=".pdf" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=7306" target="_blank" title="">Presence-Sensor-Remote-Control-User-Manual.pdf</a> (Size: 558.23 KB / Downloads: 481)
<!-- end: postbit_attachments_attachment -->]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Issues with KinCony ESP32-S3-WROOM-1U N16R8 Core Development Board]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=7737</link>
			<pubDate>Fri, 28 Feb 2025 00:32:54 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=7965">dammyr7a</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=7737</guid>
			<description><![CDATA[Hi guys, <br />
<br />
I am having issues with programming this module in arduino. <br />
1. need possibly a demo code to get the ethernet to work and how to work with its inbuilt adc, <br />
2.Also, the demo code in arduinoide for other features such as rs485 and co would be good as well. <br />
3. Can i connect a display screen to the socket for the 4g modemand hope i canalso use the port for sd card module for dat logging purposes. <br />
<br />
Pleas note, number one is urgent and most important to me. <br />
thanks<br />
Dammy]]></description>
			<content:encoded><![CDATA[Hi guys, <br />
<br />
I am having issues with programming this module in arduino. <br />
1. need possibly a demo code to get the ethernet to work and how to work with its inbuilt adc, <br />
2.Also, the demo code in arduinoide for other features such as rs485 and co would be good as well. <br />
3. Can i connect a display screen to the socket for the 4g modemand hope i canalso use the port for sd card module for dat logging purposes. <br />
<br />
Pleas note, number one is urgent and most important to me. <br />
thanks<br />
Dammy]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[KinCony TS Tiny sensor PC software and modbus protocol]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=7428</link>
			<pubDate>Tue, 21 Jan 2025 08:40:58 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=7428</guid>
			<description><![CDATA[Modbus protocol:<br />
<br />
A. input register function:<br />
<br />
temperature : 16bit unsigned integer register<br />
humidity: 16bit unsigned integer register<br />
<br />
address    function<br />
0000H        temperature value<br />
            unit: ℃<br />
            fixed 1 decimal<br />
            (1) &gt;0℃: register data&lt;10000<br />
                          for example: register value=250, actual temperature: 250*0.1=25℃<br />
            (2) &lt;0℃: register data&gt;=10000<br />
                          for example: register value=10250, actual temperature: -1*(10250-10000)*0.1=25℃<br />
------------------------------------<br />
0001H        humidity value<br />
            unit: %RH<br />
            fixed 1 decimal<br />
                          for example: register value=500, actual humidity: 500*0.1=50(%RH)<br />
------------------------------------<br />
0002H        temperature value<br />
0003H        unit: ℃  decode: 32bit float data<br />
------------------------------------<br />
0004H        humidity value<br />
0005H        unit: %RH  decode: 32bit float data<br />
<br />
<br />
B. Hold register function:<br />
The contents of the register are saved when power is turned off. The holding register is a readable and writable register. The value in each register is a 16-bit unsigned integer.<br />
<br />
address    function<br />
0000H        temperature value<br />
            unit: ℃<br />
            fixed 1 decimal<br />
            (1) &gt;0℃: register data&lt;10000<br />
                          for example: register value=250, actual temperature: 250*0.1=25℃<br />
            (2) &lt;0℃: register data&gt;=10000<br />
                          for example: register value=10250, actual temperature: -1*(10250-10000)*0.1=25℃<br />
------------------------------------<br />
0001H        humidity value<br />
            unit: %RH<br />
            fixed 1 decimal<br />
                          for example: register value=500, actual humidity: 500*0.1=50(%RH)<br />
------------------------------------<br />
0002H        temperature value<br />
0003H        unit: ℃  decode: 32bit float data<br />
------------------------------------<br />
0004H        humidity value<br />
0005H        unit: %RH  decode: 32bit float data<br />
------------------------------------<br />
000AH        RS485 bus address(1-255), default:1  <br />
            Note: This parameter is saved after power-off and will take effect after power-on again after modification.<br />
------------------------------------<br />
000BH        Baud rate setting:<br />
            0:4800  1:9600(default) 2:14400 3:19200 4:38400 5:56000 6:57600 7:115200<br />
            Note: This parameter is saved after power-off and will take effect after power-on again after modification.<br />
------------------------------------<br />
003DH        Parity settings<br />
            0:None(default)  1:odd parity 2:even parity<br />
            Note: This parameter is saved after power-off and will take effect after power-on again after modification.<br />
<br />
modify RS485 setting command:<br />
<br />
register:<br />
1001：SLAVE address 1-250<br />
1002：Baud rate: baud_arr[8] = {4800,9600,14400,19200,38400,56000,57600,115200}<br />
1003: Parity bit: parity_arr[3] = {UART_PARITY_NONE,UART_PARITY_EVEN,UART_PARITY_ODD}<br />
<br />
<br />
how to remember RS485 address if you forget it.<br />
1: every time power on will output board information by RS485 (9600,8,N,1) if you forget the board's address.<br />
2: hold on button &gt; 2 seconds, will reset to factory setting, default RS485 address=1<br />
<br />
<a href="https://www.kincony.com/download/TS_APP.zip" target="_blank" rel="noopener" class="mycode_url">KinCony TS Temperature and humidity Application download</a>]]></description>
			<content:encoded><![CDATA[Modbus protocol:<br />
<br />
A. input register function:<br />
<br />
temperature : 16bit unsigned integer register<br />
humidity: 16bit unsigned integer register<br />
<br />
address    function<br />
0000H        temperature value<br />
            unit: ℃<br />
            fixed 1 decimal<br />
            (1) &gt;0℃: register data&lt;10000<br />
                          for example: register value=250, actual temperature: 250*0.1=25℃<br />
            (2) &lt;0℃: register data&gt;=10000<br />
                          for example: register value=10250, actual temperature: -1*(10250-10000)*0.1=25℃<br />
------------------------------------<br />
0001H        humidity value<br />
            unit: %RH<br />
            fixed 1 decimal<br />
                          for example: register value=500, actual humidity: 500*0.1=50(%RH)<br />
------------------------------------<br />
0002H        temperature value<br />
0003H        unit: ℃  decode: 32bit float data<br />
------------------------------------<br />
0004H        humidity value<br />
0005H        unit: %RH  decode: 32bit float data<br />
<br />
<br />
B. Hold register function:<br />
The contents of the register are saved when power is turned off. The holding register is a readable and writable register. The value in each register is a 16-bit unsigned integer.<br />
<br />
address    function<br />
0000H        temperature value<br />
            unit: ℃<br />
            fixed 1 decimal<br />
            (1) &gt;0℃: register data&lt;10000<br />
                          for example: register value=250, actual temperature: 250*0.1=25℃<br />
            (2) &lt;0℃: register data&gt;=10000<br />
                          for example: register value=10250, actual temperature: -1*(10250-10000)*0.1=25℃<br />
------------------------------------<br />
0001H        humidity value<br />
            unit: %RH<br />
            fixed 1 decimal<br />
                          for example: register value=500, actual humidity: 500*0.1=50(%RH)<br />
------------------------------------<br />
0002H        temperature value<br />
0003H        unit: ℃  decode: 32bit float data<br />
------------------------------------<br />
0004H        humidity value<br />
0005H        unit: %RH  decode: 32bit float data<br />
------------------------------------<br />
000AH        RS485 bus address(1-255), default:1  <br />
            Note: This parameter is saved after power-off and will take effect after power-on again after modification.<br />
------------------------------------<br />
000BH        Baud rate setting:<br />
            0:4800  1:9600(default) 2:14400 3:19200 4:38400 5:56000 6:57600 7:115200<br />
            Note: This parameter is saved after power-off and will take effect after power-on again after modification.<br />
------------------------------------<br />
003DH        Parity settings<br />
            0:None(default)  1:odd parity 2:even parity<br />
            Note: This parameter is saved after power-off and will take effect after power-on again after modification.<br />
<br />
modify RS485 setting command:<br />
<br />
register:<br />
1001：SLAVE address 1-250<br />
1002：Baud rate: baud_arr[8] = {4800,9600,14400,19200,38400,56000,57600,115200}<br />
1003: Parity bit: parity_arr[3] = {UART_PARITY_NONE,UART_PARITY_EVEN,UART_PARITY_ODD}<br />
<br />
<br />
how to remember RS485 address if you forget it.<br />
1: every time power on will output board information by RS485 (9600,8,N,1) if you forget the board's address.<br />
2: hold on button &gt; 2 seconds, will reset to factory setting, default RS485 address=1<br />
<br />
<a href="https://www.kincony.com/download/TS_APP.zip" target="_blank" rel="noopener" class="mycode_url">KinCony TS Temperature and humidity Application download</a>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[ESP32 S3 set up issue]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=7216</link>
			<pubDate>Fri, 13 Dec 2024 01:35:57 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=6881">omarzamudio</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=7216</guid>
			<description><![CDATA[<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: Arial, Helvetica, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">Hello,</span></span></span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font">In a previous email I mentioned that I am </span></span></span><span style="color: #222222;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: verdana, sans-serif;" class="mycode_font">using the SIM 7600 module with the ESP32 S3 WROOM 1U, however I can't use the serial monitor in order to receive information (I can't see data), I would like to know if you have any advice for the ESP32 S3 set up in Arduino firmware. See my below set up in tools menu:</span></span></span><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: Arial, Helvetica, sans-serif;" class="mycode_font"><span style="font-family: verdana, sans-serif;" class="mycode_font"><img src="https://mail.google.com/mail/u/0?ui=2&amp;ik=2d79881756&amp;attid=0.1&amp;permmsgid=msg-a:r-6332610475403278019&amp;th=193b317a96152aca&amp;view=fimg&amp;fur=ip&amp;permmsgid=msg-a:r-6332610475403278019&amp;sz=s0-l75-ft&amp;attbid=ANGjdJ_P2VZW2UOdnJERDrS8usaIyGhGVW5vdZAnU2a9wJoXAWJ5H7q-zPUB1YIwJQGMMqmaKkv-uRcdAfDvCMCOCTt9uRxinAR9vJ7KITMulvnpPJLhj5NdhzJiouE&amp;disp=emb&amp;realattid=ii_m4j58g7e0&amp;zw" loading="lazy"  width="432" height="542" alt="[Image: 0?ui=2&amp;ik=2d79881756&amp;attid=0.1&amp;permmsgid...j58g7e0&amp;zw]" class="mycode_img" /></span></span></span></span></span></span><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">I followed you recommendation with ''USB CDC On Boot'' = ENABLE, and now I have below information in the Serial Monitor:</span></span></span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><br />
<span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-style: italic;" class="mycode_i">ELF file SHA256: 587cb4fa5<br />
E (159) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0<br />
E (167) esp_core_dump_elf: Elf write init failed!<br />
E (172) esp_core_dump_common: Core dump write failed with error=-1<br />
Rebooting...<br />
ESP-ROM:esp32s3-20210327<br />
Build:Mar 27 2021<br />
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)<br />
Saved PC:0x40376f0d<br />
SPIWP:0xee<br />
mode<img src="https://www.kincony.com/forum/images/smilies/biggrin.png" alt="Big Grin" title="Big Grin" class="smilie smilie_4" />IO, clock div:1<br />
load:0x3fce2810,len:0xfdc<br />
load:0x403c8700,len:0x4<br />
load:0x403c8704,len:0xabc<br />
load:0x403cb700,len:0x2d40<br />
entry 0x403c8890<br />
E (113) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip not found or not supported, or wrong PSRAM line mode<br />
E (116) spi_flash: Detected size(8192k) smaller than the size in the binary image header(16384k). Probe failed.<br />
assert failed: __esp_system_init_fn_init_flash startup_funcs.c:95 (flash_ret == ESP_OK)<br />
Backtrace: 0x4037654e:0x3fceb120 0x4037c65d:0x3fceb140 0x403830bd:0x3fceb160 0x4200a903:0x3fceb290 0x4200bd8b:0x3fceb2b0 0x4200bdc5:0x3fceb2d0 0x403768f5:0x3fceb300 0x403cc974:0x3fceb340 0x403ccd39:0x3fceb380 0x403c88fd:0x3fceb4b0 0x40045c01:0x3fceb570 0x40043ab6:0x3fceb6f0 0x40034c45:0x3fceb710</span></span></span><br />
</span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">I think I need to change something else in the Tool config but I'm not sure.</span></span></span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><br />
<span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">Thanks.</span></span></span></span>]]></description>
			<content:encoded><![CDATA[<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: Arial, Helvetica, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">Hello,</span></span></span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font">In a previous email I mentioned that I am </span></span></span><span style="color: #222222;" class="mycode_color"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: verdana, sans-serif;" class="mycode_font">using the SIM 7600 module with the ESP32 S3 WROOM 1U, however I can't use the serial monitor in order to receive information (I can't see data), I would like to know if you have any advice for the ESP32 S3 set up in Arduino firmware. See my below set up in tools menu:</span></span></span><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-size: 1pt;" class="mycode_size"><span style="font-family: Arial, Helvetica, sans-serif;" class="mycode_font"><span style="font-family: verdana, sans-serif;" class="mycode_font"><img src="https://mail.google.com/mail/u/0?ui=2&amp;ik=2d79881756&amp;attid=0.1&amp;permmsgid=msg-a:r-6332610475403278019&amp;th=193b317a96152aca&amp;view=fimg&amp;fur=ip&amp;permmsgid=msg-a:r-6332610475403278019&amp;sz=s0-l75-ft&amp;attbid=ANGjdJ_P2VZW2UOdnJERDrS8usaIyGhGVW5vdZAnU2a9wJoXAWJ5H7q-zPUB1YIwJQGMMqmaKkv-uRcdAfDvCMCOCTt9uRxinAR9vJ7KITMulvnpPJLhj5NdhzJiouE&amp;disp=emb&amp;realattid=ii_m4j58g7e0&amp;zw" loading="lazy"  width="432" height="542" alt="[Image: 0?ui=2&amp;ik=2d79881756&amp;attid=0.1&amp;permmsgid...j58g7e0&amp;zw]" class="mycode_img" /></span></span></span></span></span></span><br />
<br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">I followed you recommendation with ''USB CDC On Boot'' = ENABLE, and now I have below information in the Serial Monitor:</span></span></span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><br />
<span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-style: italic;" class="mycode_i">ELF file SHA256: 587cb4fa5<br />
E (159) esp_core_dump_flash: Core dump flash config is corrupted! CRC=0x7bd5c66f instead of 0x0<br />
E (167) esp_core_dump_elf: Elf write init failed!<br />
E (172) esp_core_dump_common: Core dump write failed with error=-1<br />
Rebooting...<br />
ESP-ROM:esp32s3-20210327<br />
Build:Mar 27 2021<br />
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)<br />
Saved PC:0x40376f0d<br />
SPIWP:0xee<br />
mode<img src="https://www.kincony.com/forum/images/smilies/biggrin.png" alt="Big Grin" title="Big Grin" class="smilie smilie_4" />IO, clock div:1<br />
load:0x3fce2810,len:0xfdc<br />
load:0x403c8700,len:0x4<br />
load:0x403c8704,len:0xabc<br />
load:0x403cb700,len:0x2d40<br />
entry 0x403c8890<br />
E (113) quad_psram: PSRAM ID read error: 0x00ffffff, PSRAM chip not found or not supported, or wrong PSRAM line mode<br />
E (116) spi_flash: Detected size(8192k) smaller than the size in the binary image header(16384k). Probe failed.<br />
assert failed: __esp_system_init_fn_init_flash startup_funcs.c:95 (flash_ret == ESP_OK)<br />
Backtrace: 0x4037654e:0x3fceb120 0x4037c65d:0x3fceb140 0x403830bd:0x3fceb160 0x4200a903:0x3fceb290 0x4200bd8b:0x3fceb2b0 0x4200bdc5:0x3fceb2d0 0x403768f5:0x3fceb300 0x403cc974:0x3fceb340 0x403ccd39:0x3fceb380 0x403c88fd:0x3fceb4b0 0x40045c01:0x3fceb570 0x40043ab6:0x3fceb6f0 0x40034c45:0x3fceb710</span></span></span><br />
</span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">I think I need to change something else in the Tool config but I'm not sure.</span></span></span></span><br />
<span style="font-size: medium;" class="mycode_size"><span style="color: #222222;" class="mycode_color"><br />
<span style="font-family: tahoma, sans-serif;" class="mycode_font"><span style="font-family: tahoma, sans-serif;" class="mycode_font">Thanks.</span></span></span></span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[wired temperature and humidity sensor pin define]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=6953</link>
			<pubDate>Thu, 31 Oct 2024 09:58:06 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=6953</guid>
			<description><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=6336" target="_blank" title="">temperature-humidity-sensor.png</a> (Size: 178.23 KB / Downloads: 331)
<!-- end: postbit_attachments_attachment --><br />
RED: VCC 3.3--5v<br />
BLACK: GND<br />
YELLOW: humidity output<br />
WHITE: temperature output]]></description>
			<content:encoded><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=6336" target="_blank" title="">temperature-humidity-sensor.png</a> (Size: 178.23 KB / Downloads: 331)
<!-- end: postbit_attachments_attachment --><br />
RED: VCC 3.3--5v<br />
BLACK: GND<br />
YELLOW: humidity output<br />
WHITE: temperature output]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[wired gas sensor pin define]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=6952</link>
			<pubDate>Thu, 31 Oct 2024 09:52:57 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=1">admin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=6952</guid>
			<description><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=6335" target="_blank" title="">gas-sensor-pin-define.png</a> (Size: 253.84 KB / Downloads: 298)
<!-- end: postbit_attachments_attachment --><br />
1: +12V<br />
2: GND<br />
3-4: relay output]]></description>
			<content:encoded><![CDATA[<!-- start: postbit_attachments_attachment -->
<br /><!-- start: attachment_icon -->
<img src="https://www.kincony.com/forum/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
<!-- end: attachment_icon -->&nbsp;&nbsp;<a href="attachment.php?aid=6335" target="_blank" title="">gas-sensor-pin-define.png</a> (Size: 253.84 KB / Downloads: 298)
<!-- end: postbit_attachments_attachment --><br />
1: +12V<br />
2: GND<br />
3-4: relay output]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Like the A6 but more 0-10V outputs]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=6893</link>
			<pubDate>Tue, 22 Oct 2024 00:45:46 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=5933">tarajas</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=6893</guid>
			<description><![CDATA[Hi,<br />
<br />
Basically none of the dev boards offerred by Kincony have more 0-10V outputs than 2, while also having SSR digital outputs, instead of mechanical relays right?<br />
<br />
So the only way is to buy at least minimum an A6 board (it has the I2C port needed for the extenders), then use an extender right? Which extender should I go for?<br />
<br />
For the the SSR outputs are the main focus and multiple 0-10V outputs as well.]]></description>
			<content:encoded><![CDATA[Hi,<br />
<br />
Basically none of the dev boards offerred by Kincony have more 0-10V outputs than 2, while also having SSR digital outputs, instead of mechanical relays right?<br />
<br />
So the only way is to buy at least minimum an A6 board (it has the I2C port needed for the extenders), then use an extender right? Which extender should I go for?<br />
<br />
For the the SSR outputs are the main focus and multiple 0-10V outputs as well.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[RS485 Temperature and Humidity Sensor Modbus RTU]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=6598</link>
			<pubDate>Wed, 04 Sep 2024 19:18:52 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=5834">Trapasin</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=6598</guid>
			<description><![CDATA[RS485 Temperature and Humidity Sensor Modbus RTU Use By SHT30<br />
<a href="https://shop.kincony.com/products/rs485-temperature-and-humidity-sensor-modbus-rtu-use-by-sht30" target="_blank" rel="noopener" class="mycode_url">https://shop.kincony.com/products/rs485-...e-by-sht30</a><br />
<br />
Please tell me the parameters of the Sensor to connect it to the controller via the MODBUS bus<br />
<br />
1. Device address: What is the default address, how can it be changed?<br />
2. Data transfer rate (Baud Rate)<br />
3. Number of stop bits<br />
4. Number of data bits<br />
5. Parity<br />
6. Transfer type: RTU or ASCII<br />
7. Bus type: I use 4 wires: RS-485<br />
8. Timeouts and delays: which are preferable for it?]]></description>
			<content:encoded><![CDATA[RS485 Temperature and Humidity Sensor Modbus RTU Use By SHT30<br />
<a href="https://shop.kincony.com/products/rs485-temperature-and-humidity-sensor-modbus-rtu-use-by-sht30" target="_blank" rel="noopener" class="mycode_url">https://shop.kincony.com/products/rs485-...e-by-sht30</a><br />
<br />
Please tell me the parameters of the Sensor to connect it to the controller via the MODBUS bus<br />
<br />
1. Device address: What is the default address, how can it be changed?<br />
2. Data transfer rate (Baud Rate)<br />
3. Number of stop bits<br />
4. Number of data bits<br />
5. Parity<br />
6. Transfer type: RTU or ASCII<br />
7. Bus type: I use 4 wires: RS-485<br />
8. Timeouts and delays: which are preferable for it?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Modbus]]></title>
			<link>https://www.kincony.com/forum/showthread.php?tid=6597</link>
			<pubDate>Wed, 04 Sep 2024 18:56:14 +0800</pubDate>
			<dc:creator><![CDATA[<a href="https://www.kincony.com/forum/member.php?action=profile&uid=5732">charles.garand</a>]]></dc:creator>
			<guid isPermaLink="false">https://www.kincony.com/forum/showthread.php?tid=6597</guid>
			<description><![CDATA[Hi!<br />
<br />
anybody had implement Modbus ?<br />
I'm having hard time to get mine working.<br />
I'm using <span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">esp32ModbusRTU library.</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">here is my code;</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">esp32ModbusRTU modbus(&amp;Serial1, -1);  </span></span></span><br />
<br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">void modbusTask(void *pvParameters) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  Serial1.begin(4800, SERIAL_8N1, RX, TX);  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  printf("Serial1 initialized for Modbus\n");</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  vTaskDelay(pdMS_TO_TICKS(1000));  </span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    // callbacks  Modbus</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint8_t* data, size_t length) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        printf("Modbus Response Received - Server ID: 0x%02x, Function Code: 0x%02x, Length: %u\n", serverAddress, fc, length);</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        for (size_t i = 0; i &lt; length; ++i) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">            printf("%02x ", data[i]);</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        }</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        printf("\n");</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    });</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    modbus.onError([](esp32Modbus::Error error) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        printf("Modbus Error: 0x%02x\n", static_cast&lt;uint8_t&gt;(error));</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    });</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    modbus.begin();</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  vTaskDelay(pdMS_TO_TICKS(1000));  </span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    while (true) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        modbus.readHoldingRegisters(0x01, 0x0000, 4);  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        //vTaskDelay(pdMS_TO_TICKS(1000));  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    }</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">}</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">extern "C" void app_main(void)</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">{</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  vTaskDelay(6000 / portTICK_PERIOD_MS);</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  printf("Hello world!\n");</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    xTaskCreate(modbusTask, "modbusTask", 8192, NULL, 5, NULL);</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    while (true) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        std::cout &lt;&lt; "In the while\n" &lt;&lt; std::endl;</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        //vTaskDelay(pdMS_TO_TICKS(1000));</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    }</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">}</span></span></span><br />
<br />
...<br />
#include &lt;esp32ModbusRTU.h&gt;<br />
#include "driver/uart.h"<br />
<br />
// Declaration Modbus<br />
esp32ModbusRTU modbus(&amp;Serial1, 10);  // 10 is arbitary GPIO because don't use RTS pin<br />
<br />
<br />
void modbusTask(void *pvParameters) {<br />
    // Configurer la communication UART pour Modbus<br />
   Serial1.begin(4800, SERIAL_8N1, RX, TX);  // Initialise Serial1<br />
   printf("Serial1 initialized for Modbus\n");<br />
   vTaskDelay(pdMS_TO_TICKS(1000));  // stabilisation time<br />
<br />
    // Configurer les callbacks de Modbus<br />
    modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint8_t* data, size_t length) {<br />
<br />
		printf("Modbus Response Received - Server ID: 0x%02x, Function Code: 0x%02x, Length: %u\n", serverAddress, fc, length);<br />
<br />
		if (length % 2 != 0) {<br />
			printf("Invalid data length\n");<br />
			return;<br />
		}<br />
<br />
		for (size_t i = 0; i &lt; length; i += 2) {<br />
			uint16_t value = (data[i] &lt;&lt; 8) | data[i + 1];  <br />
			if(i &lt; 5)<br />
			  value = value / 10;<br />
			printf("Register %zu: %u \n", i / 2, value);  <br />
		}<br />
<br />
		printf("\n");<br />
		});<br />
<br />
		modbus.onError([](esp32Modbus::Error error) {<br />
			printf("Modbus Error: 0x%02x\n", static_cast&lt;uint8_t&gt;(error));<br />
    });<br />
<br />
    // start Modbus<br />
    modbus.begin();<br />
    vTaskDelay(pdMS_TO_TICKS(1000));  // wait 1 sec to stabilise<br />
<br />
    while (true) {<br />
        modbus.readHoldingRegisters(0x01, 0x0000, 5);  // slave address: 0x01<br />
        vTaskDelay(pdMS_TO_TICKS(1000));  <br />
    }<br />
}<br />
<br />
extern "C" void app_main(void)<br />
{<br />
    xTaskCreate(modbusTask, "modbusTask", 8192, NULL, 5, NULL);<br />
<br />
    while (true) {<br />
        std::cout &lt;&lt; "In the while\n" &lt;&lt; std::endl;<br />
        vTaskDelay(pdMS_TO_TICKS(2000));<br />
    }<br />
<br />
}]]></description>
			<content:encoded><![CDATA[Hi!<br />
<br />
anybody had implement Modbus ?<br />
I'm having hard time to get mine working.<br />
I'm using <span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">esp32ModbusRTU library.</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">here is my code;</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">esp32ModbusRTU modbus(&amp;Serial1, -1);  </span></span></span><br />
<br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">void modbusTask(void *pvParameters) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  Serial1.begin(4800, SERIAL_8N1, RX, TX);  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  printf("Serial1 initialized for Modbus\n");</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  vTaskDelay(pdMS_TO_TICKS(1000));  </span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    // callbacks  Modbus</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint8_t* data, size_t length) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        printf("Modbus Response Received - Server ID: 0x%02x, Function Code: 0x%02x, Length: %u\n", serverAddress, fc, length);</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        for (size_t i = 0; i &lt; length; ++i) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">            printf("%02x ", data[i]);</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        }</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        printf("\n");</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    });</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    modbus.onError([](esp32Modbus::Error error) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        printf("Modbus Error: 0x%02x\n", static_cast&lt;uint8_t&gt;(error));</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    });</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    modbus.begin();</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  vTaskDelay(pdMS_TO_TICKS(1000));  </span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    while (true) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        modbus.readHoldingRegisters(0x01, 0x0000, 4);  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        //vTaskDelay(pdMS_TO_TICKS(1000));  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    }</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">}</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">extern "C" void app_main(void)</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">{</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  vTaskDelay(6000 / portTICK_PERIOD_MS);</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  printf("Hello world!\n");</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">  </span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    xTaskCreate(modbusTask, "modbusTask", 8192, NULL, 5, NULL);</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    while (true) {</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        std::cout &lt;&lt; "In the while\n" &lt;&lt; std::endl;</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">        //vTaskDelay(pdMS_TO_TICKS(1000));</span></span></span><br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">    }</span></span></span><br />
<br />
<span style="color: #cccccc;" class="mycode_color"><span style="font-family: Consolas, 'Courier New', monospace;" class="mycode_font"><span style="color: #4ec9b0;" class="mycode_color">}</span></span></span><br />
<br />
...<br />
#include &lt;esp32ModbusRTU.h&gt;<br />
#include "driver/uart.h"<br />
<br />
// Declaration Modbus<br />
esp32ModbusRTU modbus(&amp;Serial1, 10);  // 10 is arbitary GPIO because don't use RTS pin<br />
<br />
<br />
void modbusTask(void *pvParameters) {<br />
    // Configurer la communication UART pour Modbus<br />
   Serial1.begin(4800, SERIAL_8N1, RX, TX);  // Initialise Serial1<br />
   printf("Serial1 initialized for Modbus\n");<br />
   vTaskDelay(pdMS_TO_TICKS(1000));  // stabilisation time<br />
<br />
    // Configurer les callbacks de Modbus<br />
    modbus.onData([](uint8_t serverAddress, esp32Modbus::FunctionCode fc, uint8_t* data, size_t length) {<br />
<br />
		printf("Modbus Response Received - Server ID: 0x%02x, Function Code: 0x%02x, Length: %u\n", serverAddress, fc, length);<br />
<br />
		if (length % 2 != 0) {<br />
			printf("Invalid data length\n");<br />
			return;<br />
		}<br />
<br />
		for (size_t i = 0; i &lt; length; i += 2) {<br />
			uint16_t value = (data[i] &lt;&lt; 8) | data[i + 1];  <br />
			if(i &lt; 5)<br />
			  value = value / 10;<br />
			printf("Register %zu: %u \n", i / 2, value);  <br />
		}<br />
<br />
		printf("\n");<br />
		});<br />
<br />
		modbus.onError([](esp32Modbus::Error error) {<br />
			printf("Modbus Error: 0x%02x\n", static_cast&lt;uint8_t&gt;(error));<br />
    });<br />
<br />
    // start Modbus<br />
    modbus.begin();<br />
    vTaskDelay(pdMS_TO_TICKS(1000));  // wait 1 sec to stabilise<br />
<br />
    while (true) {<br />
        modbus.readHoldingRegisters(0x01, 0x0000, 5);  // slave address: 0x01<br />
        vTaskDelay(pdMS_TO_TICKS(1000));  <br />
    }<br />
}<br />
<br />
extern "C" void app_main(void)<br />
{<br />
    xTaskCreate(modbusTask, "modbusTask", 8192, NULL, 5, NULL);<br />
<br />
    while (true) {<br />
        std::cout &lt;&lt; "In the while\n" &lt;&lt; std::endl;<br />
        vTaskDelay(pdMS_TO_TICKS(2000));<br />
    }<br />
<br />
}]]></content:encoded>
		</item>
	</channel>
</rss>