Arnold-n / P1P2MQTT

Monitor and control Daikin/Rotex (hybrid/Altherma) heat pumps via the 2-wire P1/P2 thermostat interface with an ATmega328P, ESP8266, and electronics. The P1P2Serial library and P1P2Monitor program perform low-level bus operation, the P1P2-bridge-esp8266 program interprets data from/to MQTT supporting Home Assistant MQTT discovery. P1P2Serial may also be used for other Japanese Home Bus System based standards: DIII-NET (F1/F2) bus, Mitsubishi M-Net bus, Toshiba TCC-Link, Hitachi H-link, Panasonic/Sanyo SIII-Net, Haier, York, and others.
Other
324 stars 62 forks source link

Nonblocking serial #18

Closed budulinek closed 3 years ago

budulinek commented 4 years ago

Hi Arnold, hope you are OK and healthy. I changed serial read in P1P2Monitor.ino to make it non-blocking. Existing functionality retained. My changes:

The pull request is a bit mess, I have hit autoformat in Arduino IDE which added indentation. Let me know if it is a problem and I will make new pull request.

I also made few global variables, but I am not sure whether all of them have to be global.