You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -224,8 +224,8 @@ In the next step, add individual Modbus devices. Adding and configuring Modbus d
224
224
* download **Device Template** from the **[Loxone Library](https://library.loxone.com/)** (there are already hundreds of templates for various Modbus devices)
225
225
* manually add your device following this **[official tutorial](https://www.loxone.com/enen/kb/communication-with-modbus/)**.
226
226
227
-
Please note that the implementation of Modbus RTU (= Loxone Modbus Extension) and Modbus TCP (= Arduino Modbus gateway connected as "Modbus Server") in Loxone is flawed:
228
-
* Miniserver can not poll your Modbus sensors faster than 5 seconds. This is a deliberate restriction imposed by Loxone.
227
+
Please note that the implementation of Modbus RTU (= Loxone Modbus Extension) and Modbus TCP (= Arduino Modbus gateway connected as "Modbus Server") in Loxone has some restrictions:
228
+
*~~Miniserver can not poll your Modbus sensors faster than 5 seconds. This is a deliberate restriction imposed by Loxone.~~**Fixed in Loxone Config 14.4.9.25**. Minimum polling-cycle reduced to 1s (except Air-Devices), up to 2 Sensors per Modbus-Server or Extension allow a minimum time of 0.1s.
229
229
* Miniserver can not poll multiple Modbus registers at once. If you have multiple sensors on the device, Loxone will send a separate requests for each of them even if you have identical poll intervals for these sensors. This is a design flaw by Loxone.
230
230
231
231
**Modbus UDP**. If you want to avoid the above mentioned limitations, you can use Modbus UDP as a communication protocol between Loxone and this Arduino Modbus gateway. See [Loxone_ModbusUDP.md](Loxone_ModbusUDP.md) on how to implement Modbus UDP in Loxone with **Virtual UDP output** and **Virtual UDP input**.
constbyteMAC_START[3] = { 0x90, 0xA2, 0xDA }; // MAC range for Gheo SA
22
65
constbyteETH_RESET_PIN=7; // Ethernet shield reset pin (deals with power on reset issue on low quality ethernet shields)
66
+
constuint16_tCHECK_ETH_INTERVAL=2000; // Interval (ms) to check SPI connection with ethernet shield
23
67
constuint16_tETH_RESET_DELAY=500; // Delay (ms) during Ethernet start, wait for Ethernet shield to start (reset issue on low quality ethernet shields)
24
68
constuint16_tWEB_IDLE_TIMEOUT=400; // Time (ms) from last client data after which webserver TCP socket could be disconnected, non-blocking.
25
69
constuint16_tTCP_DISCON_TIMEOUT=500; // Timeout (ms) for client DISCON socket command, non-blocking alternative to https://www.arduino.cc/reference/en/libraries/ethernet/client.setconnectiontimeout/
@@ -28,38 +72,4 @@ const byte TCP_RETRANSMISSION_COUNT = 3; // Number of transmission attem
28
72
constuint16_tFETCH_INTERVAL=2000; // Fetch API interval (ms) for the Modbus Status webpage to renew data from JSON served by Arduino
29
73
30
74
constbyteDATA_START=96; // Start address where config and counters are saved in EEPROM
31
-
constbyteEEPROM_INTERVAL=6; // Interval (hours) for saving Modbus statistics to EEPROM (in order to minimize writes to EEPROM)
32
-
33
-
/****** EXTRA FUNCTIONS ******/
34
-
35
-
// these do not fit into the limited flash memory of Arduino Uno/Nano, uncomment if you have a board with more memory
36
-
// #define ENABLE_DHCP // Enable DHCP (Auto IP settings)
37
-
// #define ENABLE_EXTRA_DIAG // Enable Ethernet and Serial byte counter.
38
-
39
-
/****** DEFAULT FACTORY SETTINGS ******/
40
-
41
-
/*
42
-
Please note that after boot, Arduino loads user settings stored in EEPROM, even if you flash new program to it!
43
-
Arduino loads factory defaults if:
44
-
1) User clicks "Load default settings" in WebUI (factory reset configuration, keeps MAC)
45
-
2) VERSION_MAJOR changes (factory reset configuration AND generates new MAC)
46
-
47
-
You can change default factory settings bellow, but do not delete (comment out) individual lines!
48
-
*/
49
-
constconfig_tDEFAULT_CONFIG= {
50
-
{ 192, 168, 1, 254 }, // Static IP
51
-
{ 255, 255, 255, 0 }, // Submask
52
-
{ 192, 168, 1, 1 }, // Gateway
53
-
{ 192, 168, 1, 1 }, // Dns (only used if ENABLE_DHCP)
54
-
false, // enableDhcp (only used if ENABLE_DHCP)
55
-
502, // Modbus TCP Port
56
-
502, // Modbus UDP Port
57
-
80, // WebUI Port
58
-
false, // Modbus Mode (enableRTU over TCP)
59
-
600, // Modbus TCP Idle Timeout
60
-
96, // Baud Rate / 100
61
-
SERIAL_8E1, // Serial Config (Data Bits, Parity, Stop bits), Modbus RTU default is 8E1, another frequently used option is 8N2
62
-
150, // Inter-frame Delay (byte)
63
-
500, // Response Timeout
64
-
3, // Attempts (byte)
65
-
};
75
+
constbyteEEPROM_INTERVAL=6; // Interval (hours) for saving Modbus statistics to EEPROM (in order to minimize writes to EEPROM)
0 commit comments