Solar Battery Monitor - How to transfer values to Fhem
-
Hi,
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.
-
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.
Suggested Topics
-
Data logging Options
Vera • 1 Apr 2014, 00:16 • NotYetRated 22 May 2014, 19:30 -
[solved] switch and dimmer gone after update
FHEM • 3 Oct 2015, 15:07 • jeti 5 Oct 2015, 17:16 -
Not getting Node ID assigned
FHEM • 11 Feb 2016, 10:57 • bigal 19 Feb 2016, 22:19 -
Copying Reading value into 'state' field
FHEM • 18 Aug 2015, 13:54 • Stephan Noller 20 Aug 2015, 14:41 -
SmartSleep and FHEM - does it work?
FHEM • 10 Jan 2017, 09:46 • cablesky 25 Mar 2019, 15:46