Nice project. Even though some items are in a language I do not understand, the sketch provided me with a better understanding of the MySensors work. Thank you for making the connection of what I know and what I was having trouble understanding.
@OldSurferDude yes, you are correct. this sensor is capable of 50A continuous, which safely I would make it working at 40A max., but for such an important load as in your case I would go for a beefier one, like the ACS75x, 77x, but at this point I would also change the node's form factor for space and insulation reasons.
On my application on the RV I have a max. curr. of 13A running on a AWG14-16 cable (European rules for RVs), so I did not ask myself too many questions beside, of course, safety.
About the signal, it will be a sinusoidal signal swinging around Vcc/2.
Vcc can be easily measured internally on the ATmega328. On all my DC sensors I measure Vcc at every loop, just before measuring the ADCs.
Honestly, when the space is not an issue like in my RV, I would rather use a ring core current transformer, and I would get rid of noise, response time, power dissipation, but over all no need to cut any cable.
Long story short, it has been a nice experiment and I used it for 6 months, and then I switched back to my RF-NANO based RS485-Modbus - Mysensors bridge connected to an off-the shelf power analyzer.
Just for fun I attach a pic of my 12Vdc sensors installed on my RV. Forgive me for the spaghetti wiring on the right side, but this is an area that needs improvement.
@adds666 I'm not sure but I believe Domoticz prresents it's dimmer values in steps from 5 to 100 I believe. It'd about 10 steps. That's why I'm not sure if you can add more patterns. Unless you indeed change it to a percentage. Hope it helps
The output of the display could also be sent over serial, but the whole idea is you can walk around with the doctor and improve your results as you go.