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
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,21 +41,18 @@ The controller has a built-in web interface. You can use this web interface to c
41
41
- rollover of counters is synchronized
42
42
- content of the P1P2 Status page is updated in the background (fetch API), javascript alert is shown if connection is lost
43
43
* user settings:
44
-
- can be changed via web interface (see screenshots bellow)
45
-
- stored in EEPROM
44
+
- can be changed via web interface (see screenshots bellow), all web UI inputs have proper validation
45
+
- stored in Arduino EEPROM
46
46
- retained during firmware upgrade (only in case of major version change, Arduino loads factory defaults)
47
-
- all web interface inputs have proper validation
48
-
- factory defaults for user settings can be specified in advanced_settings.h
49
-
- settings marked \* are only available if ENABLE_DHCP is defined in the sketch
50
-
- settings marked \*\* are only available if ENABLE_EXTRA_DIAG is defined in the sketch
47
+
- factory defaults for user settings can be changed in advanced_settings.h
51
48
* advanced settings:
52
-
- can be changed in sketch (advanced_settings.h)
49
+
- can be changed in sketch before comnpilation (advanced_settings.h)
53
50
- stored in flash memory
54
51
55
52
# Hardware
56
53
Get the hardware and connect together:
57
54
58
-
***Arduino Uno**.<br>Cheap clones are sufficient.
55
+
***Arduino Uno or Mega** (and possibly other boards with ATmega chips).<br>On Mega you have to configure Serial in advanced settings in the sketch.
59
56
***Ethernet shield with WIZnet chip (W5100, W5200 or W5500)**.<br>The ubiquitous W5100 shield for Uno/Mega is sufficient. If available, I recommend W5500 Ethernet Shield. You can also use combo board MCU + ethernet (such as ATmega328 + W5500 board from Keyestudio).<br>ATTENTION: Ethernet shields with ENC28J60 chip will not work !!!
60
57
***Custom P1P2 Uno adapter**.<br>You can [solder your own adapter](https://github.com/Arnold-n/P1P2Serial/tree/main/circuits#p1p2-adapter-as-arduino-uno-hat) or buy one from Arnold-n (his e-mail address can be found on line 3 of his library [P1P2Serial.cpp](https://github.com/Arnold-n/P1P2Serial/blob/main/P1P2Serial.cpp)).
61
58
@@ -67,18 +64,19 @@ Here is my HW setup (cheap Arduino Uno clone + W5500 Ethernet shield from Keyest
67
64
68
65
You can either:
69
66
-**Download and flash my pre-compiled firmware** from "Releases".
70
-
-**Compile your own firmware**. Download this repository (all *.ino files) and open arduino-altherma-controller.ino in Arduino IDE. If you want, you can check advanced_settings.h for advanced settings (can only be changed in the sketch) and for default factory settings (can be later changed via web interface). Download all required libraries, compile and upload your program to Arduino. The program uses the following external libraries (all are available in Arduino IDE's "library manager"):
-**Compile your own firmware**. Download this repository (all *.ino files) and open arduino-modbus-rtu-tcp-gateway.ino in Arduino IDE. If you want, you can check advanced_settings.h for advanced settings (can only be changed in the sketch) and for default factory settings (can be later changed via web interface). Download all required libraries, compile and upload your program to Arduino. The program uses the following external libraries (all are available in Arduino IDE's "library manager"):
Connect your Arduino to ethernet and use your web browser to access the web interface on default IP: http://192.168.1.254
72
+
Enjoy :-)
75
73
76
74
# Settings
77
75
78
76
This controller has a built-in webserver which allows you to configure the controller itself, check basic system info of the controller and the status of its connection to the P1/P2 bus.
79
77
80
-
- settings marked \* are only available if ENABLE_DHCP is defined in the sketch
81
-
- settings marked \*\* are only available if ENABLE_EXTENDED_WEBUI is defined in the sketch
78
+
- settings marked \* are only available if ENABLE_DHCP is defined in advanced_settings.h
79
+
- settings marked \*\* are only available if ENABLE_EXTENDED_WEBUI is defined in advanced_settings.h
82
80
83
81
## System Info
84
82
@@ -131,10 +129,10 @@ This controller has a built-in webserver which allows you to configure the contr
131
129
- Requests for the counters packets. If the **Enable Write to P1P2** setting is set to *Automatically*, requests for counter packets are sent even if the controller failed to receive an address (is in read only mode).
132
130
- Write commands received via web interface or UDP. These packets are written to the P1/P2 bus and written in Daikin EEPROM.
133
131
***EEPROM Write Quota Reached**. Daily EEPROM Write Quota (configured in **P1P2 Settings**) was reached. The command (received via UDP or from the web interface) was dropped.
134
-
***Write Command Queue Full**. Internal queue (circular buffer) for commands is full. The command (received via UDP or from the web interface) was dropped.
135
-
***Write Command Invalid**. Command received via UDP or from the web interface was invalid, it was dropped. Possible reasons:
132
+
***Write Command Error**. Command received via UDP or from the web interface was invalid, it was dropped. Possible reasons:
136
133
- Packet type (first byte) is not supported (PACKET_PARAM_VAL_SIZE in advanced settings is set to zero).
137
134
- Incorrect packet length. Command should have 1 byte for type, 2 bytes for parameter number and the correct numer of bytes for the parameter value (see PACKET_PARAM_VAL_SIZE in advanced settings).
135
+
- Internal queue (circular buffer) for commands is full.
138
136
***Parity Read Error**.
139
137
***Too Long Read Error**. Packet received is longer than the read buffer.
140
138
***Start Bit Write Error**. Start bit error during write.
@@ -328,6 +326,10 @@ The code was tested on Arduino Uno, ethernet chips W5100 and W5500. It may work
328
326
* The random number generator (for random MAC) is seeded through watch dog timer interrupt - this will work only on Arduino (credits to https://sites.google.com/site/astudyofentropy/project-definition/timer-jitter-entropy-sources/entropy-library/arduino-random-seed)
329
327
* The restart function will also work only on Arduino.
330
328
329
+
## Ethernet Power On Reset Issue
330
+
331
+
Sometimes the gateway is running fine for days but after power-up or brief loss of power (caused for example by undervoltage), ethernet connection is lost. What is the problem? The W5x00 chip on the Arduino Ethernet Shield is not initialized correctly upon power-up. There is an easy solution to the issue described in a separate [document here](Ethernet_SW_Reset.md).
332
+
331
333
## Remote IP settings on the W5500 Chip
332
334
333
335
The Ethernet.setRetransmissionCount() and Ethernet.setRetransmissionTimeout() commands do not work on W5500 chips because of a bug in the Ethernet.h library (see [this issue](https://github.com/arduino-libraries/Ethernet/issues/140)). As a result, Arduino fails to read data from the P1/P2 bus (read errors, CRC errors) if certain conditions are met:
|**Integration with**| • Loxone<br>• other systems (via UDP-HEX) | • Home Assistant<br>• other systems (via MQTT-JSON) | • Home Assistant<br>• other systems (via MQTT-JSON) | • Home Assistant | • Home Assistant ||
367
+
|**Integration with**| • Loxone<br><br>• other systems (via UDP-HEX) | • Home Assistant<br><br>• other systems (via MQTT-JSON) | • Home Assistant<br><br>• other systems (via MQTT-JSON) | • Home Assistant | • Home Assistant ||
0 commit comments