>D pcurr=0 pcurrP=0 pcurrn=0 rest=0 w=0 eig=0 stufe1=0 stufe2=0 stufe3=0 stufe4=0 stufe5=0 stufe6=0 stufe7=0 >B =>sensor53 r >M 2 +1,12,s,16,9600,PV +2,3,s,16,9600,EWE 1,77070100020800ff@1000,Zählerstand Lieferung,kWh,export_total_kwh1,0 1,77070100010800ff@1000,Zählerstand Bezug,kWh,total_kwh1,0 1,77070100100700ff@1,aktuelle Leistung ,W,curr_w1,0 2,77070100020800ff@1000,Zählerstand Lieferung,kWh,export_total2_kwh,0 2,77070100010800ff@1000,Zählerstand Bezug,kWh,total_kwh2,0 2,77070100100700ff@1,aktuelle Leistung ,W,curr_w2,0 >T ; positv ist einfacher pcurr=0-EWE#curr_w2 pcurrn=EWE#curr_w2 pcurrP=0-PV#curr_w1 eig=pcurrP+pcurrn rest=0-(pcurrP-(eig+0)); null weil noch kein Heizstab da >S ; Stufe 1 ein if pcurr>1000 then ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON stufe1=1 w=500 endif ;Stufe 2 ein if pcurr>1000 and stufe1==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.202/relay/0/?turn=on GET ENDON stufe2=1 w=1000 endif ;Stufe 3 ein if pcurr>1000 and stufe2==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON stufe3=1 w=1500 endif ;Stufe 4 ein if pcurr>1000 and stufe3==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.202/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.203/relay/0/?turn=on GET ENDON stufe4=1 w=2000 endif ;Stufe 5 ein if pcurr>1000 and stufe4==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON stufe5=1 w=2500 endif ;Stufe 6 ein if pcurr>1000 and stufe5==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.202/relay/0/?turn=on GET ENDON stufe6=1 w=3000 endif ;Stufe 7 ein if pcurr>1000 and stufe6==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON stufe7=1 w=3500 endif ;Stufe 7 aus, zurück zu 6 if pcurr<250 and stufe7==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON stufe7=0 w=3000 endif ;Stufe 6 aus, zurück zu 5 if pcurr<250 and stufe6==1 then ;=>webquery http://192.168.179.202/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON stufe6=0 w=2500 endif ;Stufe 5 aus, zurück zu 4 if pcurr<250 and stufe5==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON stufe5=0 w=2000 endif ;Stufe 4 aus, zurück zu 3 if pcurr<250 and stufe4==1 then ;=>webquery http://192.168.179.203/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON ;=>webquery http://192.168.179.202/relay/0/?turn=on GET ENDON stufe4=0 w=1500 endif ;Stufe 3 aus, zurück zu 2 if pcurr<250 and stufe3==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON stufe3=0 w=1000 endif ;Stufe 2 aus, zurück zu 1 if pcurr<250 and stufe2==1 then ;=>webquery http://192.168.179.202/relay/0/?turn=of GET ENDON ;=>webquery http://192.168.179.201/relay/0/?turn=on GET ENDON stufe1=0 w=500 endif ;Stufe 1 aus, zurück zu 0 if pcurr<250 and stufe1==1 then ;=>webquery http://192.168.179.201/relay/0/?turn=of GET ENDON stufe1=0 w=0 endif >W Die PV-Anlage liefert aktuell %pcurrP% Watt, das Haus verbraucht %eig% Watt und der Heizstab verbraucht %w% Watt. Der Rest von %rest% Watt wird entweder (-) verkauft, oder (+) zugekauft. ;Heizstab %w% W ;Verbrauch Haus %eig% ;PV %pcurrP% ;EWE %pcurrn% ;zuEWE %rest% #