Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Adaptives PV Laden, VZloggerpv fix, implemented chartsam
Browse files Browse the repository at this point in the history
  • Loading branch information
snaptec committed Mar 15, 2019
1 parent 1cf5ddd commit ef6e266
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/nrgkicklp1/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,40 @@ rekwh='^[-+]?[0-9]+\.?[0-9]*$'

output=$(curl --connect-timeout $nrgkicktimeoutlp1 -s http://$nrgkickiplp1/api/measurements/$nrgkickmaclp1)
if [[ $? == "0" ]] ; then
watt=$(echo $output | jq -r .[].ChargingPower)
watt=$(echo $output | jq -r '.ChargingPower')
watt=$(echo "scale=0;$watt * 1000 /1" |bc)
if [[ $watt =~ $re ]] ; then
echo $watt > /var/www/html/openWB/ramdisk/llaktuell
fi
lla1=$(echo $output | jq -r '.[].ChargingCurrentPhase[0]')
lla1=$(echo $output | jq -r '.ChargingCurrentPhase[0]')
lla1=$(echo "scale=0;$lla1 / 1" |bc)
if [[ $lla1 =~ $re ]] ; then
echo $lla1 > /var/www/html/openWB/ramdisk/lla1
fi
lla2=$(echo $output | jq -r '.[].ChargingCurrentPhase[1]')
lla2=$(echo $output | jq -r '.ChargingCurrentPhase[1]')
lla2=$(echo "scale=0;$lla2 / 1" |bc)
if [[ $lla2 =~ $re ]] ; then
echo $lla2 > /var/www/html/openWB/ramdisk/lla2
fi
lla3=$(echo $output | jq -r '.[].ChargingCurrentPhase[2]')
lla3=$(echo $output | jq -r '.ChargingCurrentPhase[2]')
lla3=$(echo "scale=0;$lla3 / 1" |bc)
if [[ $lla3 =~ $re ]] ; then
echo $lla3 > /var/www/html/openWB/ramdisk/lla3
fi
llv1=$(echo $output | jq -r '.[].VoltagePhase[0]')
llv1=$(echo $output | jq -r '.VoltagePhase[0]')
if [[ $lla1 =~ $re ]] ; then
echo $llv1 > /var/www/html/openWB/ramdisk/llv1
fi
llv2=$(echo $output | jq -r '.[].VoltagePhase[1]')
llv2=$(echo $output | jq -r '.VoltagePhase[1]')
if [[ $lla2 =~ $re ]] ; then
echo $llv2 > /var/www/html/openWB/ramdisk/llv2
fi
llv3=$(echo $output | jq -r '.[].VoltagePhase[2]')
llv3=$(echo $output | jq -r '.VoltagePhase[2]')
if [[ $lla3 =~ $re ]] ; then
echo $llv3 > /var/www/html/openWB/ramdisk/llv3
fi

llkwh=$(echo $output | jq -r '.[].ChargingEnergyOverAll')
llkwh=$(echo $output | jq -r '.ChargingEnergyOverAll')
llkwh=$(echo "scale=3;$llkwh / 1" |bc)
if [[ $llkwh =~ $rekwh ]] ; then
echo $llkwh > /var/www/html/openWB/ramdisk/llkwh
Expand Down

0 comments on commit ef6e266

Please sign in to comment.