; GPIO's auf NONE stellen! >D ;defines temp=0 AC_Voltage=0 PV_Voltage=0 Batt_Volt=0 Batt_Volt10=0 Chg_current=0 DChg_current=0 Batt_current=0 Batt_Asec=0 Batt_Ah=0 Chg_power=0 DChg_power=0 Batt_power=0 AC_freq=0 val2=0 val3=0 >B ; at boot ->DisplayText [zs1l1c1]Temperatur innen[s1l3c12]o[s2l2c7]C ->sensor53 r ; d1 for debug, !!OR!! r for normal operation of ModBus driver ->sensor53 l3 ; LED3 blinken lassen >T ; on Tele message temp=DS18B20#Temperature ; read temperature ->DisplayText [s2l2c2]%1temp% ;print %temp% Batt_Volt10 = PowMr#Batt_Volt10 ; read values from section >M Chg_current = PowMr#Chg_current DChg_current= PowMr#DChg_current >S ; 1sec Batt_Volt=Batt_Volt10/10 Batt_current=(Chg_current-DChg_current) Batt_power=(Batt_current*Batt_Volt) Chg_power=Chg_current*Batt_Volt DChg_power=DChg_current*Batt_Volt Batt_Asec+=Batt_current ; each second! Batt_Asec=mp(Batt_Asec <0 0 >(250*3600) (250*3600)) ; 250Ah Battery limit Batt_Ah=Batt_Asec/3600 print %Batt_Volt%V, %Chg_current%A, %DChg_current%A, %Batt_current%A, %Batt_power%W, %Batt_Ah%Ah =>Publish tele/%topic%/SENSOR {"Batt":{"Chg_power":%0Chg_power%,"DChg_power":%0DChg_power%,"power":%0Batt_power%,"current":%0Batt_current%}} =>publish stat/%topic%/RESULT {"Batt":{"Chg_power":%0Chg_power%,"DChg_power":%0DChg_power%,"power":%0Batt_power%,"current":%0Batt_current%,"level_Ah":%0Batt_Ah%}} >M 1 ; using 1 meter ; +,,,,,,,,i x +1,20,m,0,2400,PowMr,21,3,05031196,05031198,0503119A,0503119C,0503119E,050311A0,050311A2,050311A4,050311A6,05031195,050311B6,050311B8,050311C8,050311CA,050311CC 1,050304uuUUxxxx@i0:10,AC Voltage,V,AC_Voltage,1 1,050304xxxxuuUU@i0:10,AC Frequenz,Hz,AC_Freq,1 1,050304uuUUxxxx@i1:10,PV Voltage,V,PV_Voltage,1 1,050304xxxxuuUU@i1:1,PV Power,W,PV_Power,0 1,050304uuUUxxxx@i2:10,Battery Voltage,V,Batt_Voltage,1 1,050304uuUUxxxx@i2:1,Battery Voltage10,V,Batt_Volt10,0 1,050304xxxxuuUU@i2:1,Batt Percent,%%,Batt_Percent,0 1,050304uuUUxxxx@i3:1,Batt Charge Current,A,Chg_current,0 1,050304xxxxuuUU@i3:1,Batt DisCharge Current,A,DChg_current,0 1,050304uuUUxxxx@i4:10,Load Voltage,V,Out_Volt,1 1,050304xxxxuuUU@i4:10,Load Frequ,Hz,Out_Freq,1 1,050304uuUUxxxx@i5:1,Load Power VA,VA,Out_PowerVA,0 1,050304xxxxuuUU@i5:1,Load Power,W,Out_Power,0 1,050304uuUUxxxx@i6:1,Efficiency1,%%,Eff1,0 1,050304xxxxuuUU@i6:1,Efficiency2,%%,Eff2,0 1,050304uuUUxxxx@i7:1,Stat4516,dec,Stat4516,0 1,050304xxxxuuUU@i7:1,Stat4517,dec,Stat4517,0 1,050304uuUUxxxx@i8:1,Stat4518,dec,Stat4518,0 1,050304xxxxuuUU@i8:1,Stat4519,dec,Stat4519,0 1,050304uuUUxxxx@i9:1,Stat4501 SBU,dec,Stat4501,0 1,050304uuUUxxxx@i10:1,Stat4534,dec,Stat4534,0 1,050304xxxxuuUU@i10:1,Stat4535,dec,Stat4535,0 1,050304uuUUxxxx@i11:1,Stat4536,dec,Stat4536,0 1,050304xxxxuuUU@i11:1,Stat4537,dec,Stat4537,0 1,050304uuUUxxxx@i12:1,Stat4552,dec,Stat4552,0 1,050304xxxxuuUU@i12:1,Stat4553,dec,Stat4553,0 1,050304uuUUxxxx@i13:1,Stat4554,dec,Stat4554,0 1,050304xxxxuuUU@i13:1,Stat4555,dec,Stat4555,0 1,050304uuUUxxxx@i14:1,Stat4556,dec,Stat4556,0 1,050304xxxxuuUU@i14:1,Temperatur,°C,Stat4557,0 #