// - automode: one REQUEST message is polled periodically and decoded payload is given by serial-IF (@57600baud), some comfig inputs possible
// - automode: one REQUEST message is polled periodically and decoded payload is given by serial-IF (@57600baud), some comfig inputs possible
// - mac-mode: -> The hoymiles specific REQUEST messages must be given as input via serial-IF (@57600baud) smac-packet
// - mac-mode: -> The hoymiles specific REQUEST messages must be given as input via serial-IF (@57600baud) smac-packet
// <- The full sorted RESPONSE is given to the serial-IF as rmac-packet (to be used with python, fhem, etc.) -- todo
// <- The full sorted RESPONSE is given to the serial-IF as rmac-packet (to be used with python, fhem, etc.) -- todo
// - scanmode: get trigger on rx-ch03 and then start scanning on all channels for the next 5sec
// - scanmode: todo: get trigger on rx-ch03 and then start scanning on all channels for the next 5sec
//
//
#include<Arduino.h>
#include<Arduino.h>
@ -86,7 +86,7 @@ static RadioType hmRadio;
// static uint8_t radio_id[5]; //todo: use the mPayload[].id field ,this defines the radio-id (domain) of the rf24 transmission, will be derived from inverter id
// static uint8_t radio_id[5]; //todo: use the mPayload[].id field ,this defines the radio-id (domain) of the rf24 transmission, will be derived from inverter id
// static uint64_t radio_id64 = 0ULL;
// static uint64_t radio_id64 = 0ULL;
#define DEF_VERSION "\n version 2023-01-22 14:55"
#define DEF_VERSION "\n version 2023-01-27 22:42"
#define P(x) (__FlashStringHelper *)(x) // PROGMEM-Makro for variables
#define P(x) (__FlashStringHelper *)(x) // PROGMEM-Makro for variables
// strncpy_P(_strout, (PGM_P)pgm_read_word(&(PGM_fields[_bp.fieldId])), _strlen); // this read from PROGMEM array into RAM, works for A-Nano, not for esp8266
// simple decoding, can only handle the current active inverter index, maybe erased if new data arrive, switch other inverter via interter indexing in automode settings
// simple decoding, can only handle the current active inverter index, maybe erased if new data arrive, switch other inverter via interter indexing in automode settings