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

Error when compiling #57

Closed tudorels closed 1 year ago

tudorels commented 1 year ago

Hello, I try to compile the code and I get error: /P1P2Serial/examples/P1P2-bridge-esp8266/P1P2-bridge-esp8266.ino: In function 'void process_for_mqtt_json(byte*, int)': P1P2-bridge-esp8266:1465:17: error: 'bytes2keyvalue' was not declared in this scope 1465 | if (n == 3) bytes2keyvalue(rb[0], rb[2], EMPTY_PAYLOAD, rb + 3, mqtt_key, mqtt_value); | ^~~~~~ P1P2-bridge-esp8266:1469:23: error: 'bytes2keyvalue' was not declared in this scope 1469 | int kvrbyte = bytes2keyvalue(rb[0], rb[2], i - 3, rb + 3, mqtt_key, mqtt_value); | ^~~~~~ P1P2-bridge-esp8266:1491:40: error: 'bits2keyvalue' was not declared in this scope 1491 | int kvr = (kvrbyte == 8) ? bits2keyvalue(rb[0], rb[2], i - 3, rb + 3, mqtt_key, mqtt_value, j) : kvrbyte; | ^~~~~ exit status 1 'bytes2keyvalue' was not declared in this scope

I'm doing something wrong? What can I do to compile correctly? Thank you!

Arnold-n commented 1 year ago

Please uncomment one of lines 55 or 56 in P1P2_Config.h to match your Daikin system:

//#define E_SERIES
//#define F_SERIES