fix missing paths and json formatting after refactor testing
This commit is contained in:
@@ -264,7 +264,7 @@ int main(int argc, char* argv[]) {
|
||||
printf(" \"Max_charge_current\":%d,\n", max_charge_current);
|
||||
printf(" \"Out_source_priority\":%d,\n", out_source_priority);
|
||||
printf(" \"Charger_source_priority\":%d,\n", charger_source_priority);
|
||||
printf(" \"Battery_redischarge_voltage\":%.1f\n", batt_redischarge_voltage);
|
||||
printf(" \"Battery_redischarge_voltage\":%.1f,\n", batt_redischarge_voltage);
|
||||
printf(" \"Warnings\":\"%s\"\n", warnings->c_str());
|
||||
printf("}\n");
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ pushMQTTData () {
|
||||
-m "$2"
|
||||
}
|
||||
|
||||
INVERTER_DATA=`timeout 10 /opt/voltronic-cli/bin/inverter_poller`
|
||||
INVERTER_DATA=`timeout 10 /opt/inverter-cli/bin/inverter_poller -1`
|
||||
|
||||
#####################################################################################
|
||||
|
||||
Inverter_mode=`echo $INVERTER_DATA | jq '.Inverter_mode' -r`
|
||||
|
||||
# 1 = Power_On, 2 = Standby, 3 = Line, 4 = Battery, 5 = Fault, 6 = Power_Saving, 7 = Unknown
|
||||
|
||||
|
||||
[ ! -z "$Inverter_mode" ] && pushMQTTData "Inverter_mode" "$Inverter_mode"
|
||||
|
||||
AC_grid_voltage=`echo $INVERTER_DATA | jq '.AC_grid_voltage' -r`
|
||||
|
||||
@@ -9,6 +9,6 @@ while read rawcmd;
|
||||
do
|
||||
|
||||
echo "Incoming request send: [$rawcmd] to inverter."
|
||||
/opt/voltronic-cli/bin/inverter_poller -r $rawcmd;
|
||||
/opt/inverter-cli/bin/inverter_poller -r $rawcmd;
|
||||
|
||||
done < <(mosquitto_sub -h $MQTT_SERVER -p $MQTT_PORT -t "$MQTT_TOPIC/sensor/$MQTT_DEVICENAME" -q 1)
|
||||
|
||||
Reference in New Issue
Block a user