Solar Battery Monitor - How to transfer values to Fhem
btmerz last edited by
I try to get my solar battery-sensor to work. Therefor I want to monitor several values from the solar cell and the battery.
float U_Cell1 = 0.0;
float U_Cell2 = 0.0;
float U_Cell3 = 0.0;
float U_Solar = 0.0;
float I_Solar = 0.0;
float I_Battery = 0.0;
float dU_Max = 0.0;
float Wh_Solar = 0.0;
float Wh_Battery = 0.0;
float Wh_Load = 0.0;
float Ah_Solar = 0.0;
float Ah_Battery = 0.0;
float Ah_Load = 0.0;
Which sensor and datatype do I have to use to send the data to fhem? They should appear in fhem in a way that I know what data it ist. for the voltages I use V_VOLTAGE and for the current V_CURRENT.
But for the other values there don't exist the types. So what should I use?
Thanks for your help.
rejoe2 last edited by rejoe2
From FHEM side of view, you may use any of the Types MySensors offers, most likely presenting one or more S_POWER Children fit closest.
To get "better" reading names, I'd give the "get <device> ReadingsFromComments" function a try and add a comment to the sketches present() function (Cell1, ..., Solar, Battery...).
It's a bit hard to explain. If you have some experience with DS18x20 type of sensors, you may get an idea looking at the code here (or make some experienents with it): https://github.com/rejoe2/MySensors-Dallas-Address-ChildID-Consistency/blob/master/DallasTemperatureSimple/DallasTemperatureSimple.ino
@btmerz I am not familiar with fham, but see if V_KWH works. For Ah it would (technically) be incorrect, but I think the display and aggregegation would work anyway.