@anand There was vastly more time wasted trying to get the original concept to work, than it look to learn basics of Domoticz scripting after finding a solution used by others.
The sketch complexity and size is dramarically reduced for the Node, it still responds to changes in boiler or PSU condition within a second, and reports temperatures and power condition regularly.
Domoticz reconciles everything to default 5 minute time slots, this method provides boiler run times to an accuracy of a minute which is quite adequate.
Couldnt get it to work, so the gas and powermeters where replaced after a call to the Energy company. The new P1 smartmeters is connected with usb to Domoticz and works like a charm!
Topic can be closed.
I did not managed to get i working, shifted to a Raspberry PI, that works perfect - It seems that I also get version 1.x data from the gateway, Interesting if the gateway both can receive 1.x and 2.x data from sensors.