Hi,
So as I see it I would need to use the hardware serial for the connection to the heatpump and then create a software serial for debug messages. So something like this:
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
// Enable debug prints
#define MY_DEBUG
#define MY_DEBUGDEVICE mySerial
#define MY_BAUD_RATE 9600
So the next question is how to present the heatpump to the gateway. Would you create one child id and then define each type of sensor/metric or is there a one-to-one mapping:
#define CHILD_HVAC 0
MyMessage msgHvacStatu(CHILD_HVAC, V_STATUS); // Status: ON, OFF
MyMessage msgHvacSTemp(CHILD_HVAC, V_TEMP); // Set Temp
MyMessage msgHvacRTemp(CHILD_HVAC, V_TEMP); // Room Temp
MyMessage msgHvacFanSp(CHILD_HVAC, V_HVAC_SPEED); // Fan Speed
or
#define CHILD_HVAC_STATUS 0
#define CHILD_HVAC_STEMP 1
#define CHILD_HVAC_RTEMP 2
#define CHILD_HVAC_FANSP 3
MyMessage msgHvacStatu(CHILD_HVAC_STATUS, V_STATUS); // Status: ON, OFF
MyMessage msgHvacSTemp(CHILD_HVAC_STEMP, V_TEMP); // Set Temp
MyMessage msgHvacRTemp(CHILD_HVAC_RTEMP, V_TEMP); // Room Temp
MyMessage msgHvacFanSp(CHILD_HVAC_FANSP, V_HVAC_SPEED); // Fan Speed