We have several problems with numbers outside the US.
Just curious what the export LC_NUMERIC="en_US.UTF-8" fixes. Can you give a before and after example? Does this affect format in the upload? It looks like correct date and times are in the database.
The problem with LC_NUMERIC is because printf is wrong with , and .
You are correct that the upload is OK, it's just hivetool.log who is wrong
It should be included in the new version
The problem is the printf commands:
if [ "$HIVE_TEMP" == "NULL" ]
then
printf "Hive Temp %s (%s at %s m=%.2f b=%.2f)\n" "$HIVE_TEMP" "$HIVE_TEMP_SENSOR" "$HIVE_TEMP_DEV" "$HIVE_TEMP_SLOPE" "$HIVE_TEMP_INTERCEPT"
else
printf "Hive Temp %.2f (%s at %s m=%.2f b=%.2f)\n" "$HIVE_TEMP" "$HIVE_TEMP_SENSOR" "$HIVE_TEMP_DEV" "$HIVE_TEMP_SLOPE" "$HIVE_TEMP_INTERCEPT"
fi
echo "Hive Humidity " $HIVE_HUMIDITY
if [ "$AMBIENT_TEMP" == "NULL" ]
then
printf "Ambient Temp %s (%s at %s m=%.2f b=%.2f)\n" "$AMBIENT_TEMP" "$AMBIENT_TEMP_SENSOR" "$AMBIENT_TEMP_DEV" "$AMBIENT_TEMP_SLOPE" "$AMBIENT_TEMP_INTERCEPT"
else
printf "Ambient Temp %.2f (%s at %s m=%.2f b=%.2f)\n" "$AMBIENT_TEMP" "$AMBIENT_TEMP_SENSOR" "$AMBIENT_TEMP_DEV" "$AMBIENT_TEMP_SLOPE" "$AMBIENT_TEMP_INTERCEPT"
fi
Which gives out (The line numers are probably wrong, because I have put in more in hive.sh)
Date-time 2016-02-06 19:30:01 /home/hivetool/hive.sh: line 376: printf: 47.36: invalid number
Hive Weight 0,00 Sensor: HX711 Slope: 21733,00 Intercept: 52000,00 Device: /home/hivetool/hive.sh: line 383: printf: 19.2: invalid number
Hive Temp 0,00 (DHT22 at 3 m=1,00 b=0,00)
Hive Humidity 47.6 /home/hivetool/hive.sh: line 392: printf: 3.7: invalid number
Ambient Temp 0,00 (DHT22 at 2 m=1,00 b=-2,00)
I have also sent some updates to Paul for the weather data. The original code now expects decimal values but my weather data (from weatherunderground) didn't provide them that way so some fields stayed empty.
I you have the same problem I can provide you with the updated script.
It seems that my WU station sends the correct info
This was more a input to a new release, so the hivetool.log file works for non US settings
Maybe you should make a new thread here with your info, and attach the file so we can take a look at it.
Steven,
could you share here or provide me the updated script, my WU station provides data in full values also and I could expect in autumn some minus degrees in Celsius
We have several problems with numbers outside the US.
Just curious what the
export LC_NUMERIC="en_US.UTF-8"
fixes. Can you give a before and after example? Does this affect format in the upload? It looks like correct date and times are in the database.I take it this should go in the next image?
The problem with LC_NUMERIC is because printf is wrong with , and .
You are correct that the upload is OK, it's just hivetool.log who is wrong
It should be included in the new version
The problem is the printf commands:
if [ "$HIVE_TEMP" == "NULL" ]
then
printf "Hive Temp %s (%s at %s m=%.2f b=%.2f)\n" "$HIVE_TEMP" "$HIVE_TEMP_SENSOR" "$HIVE_TEMP_DEV" "$HIVE_TEMP_SLOPE" "$HIVE_TEMP_INTERCEPT"
else
printf "Hive Temp %.2f (%s at %s m=%.2f b=%.2f)\n" "$HIVE_TEMP" "$HIVE_TEMP_SENSOR" "$HIVE_TEMP_DEV" "$HIVE_TEMP_SLOPE" "$HIVE_TEMP_INTERCEPT"
fi
echo "Hive Humidity " $HIVE_HUMIDITY
if [ "$AMBIENT_TEMP" == "NULL" ]
then
printf "Ambient Temp %s (%s at %s m=%.2f b=%.2f)\n" "$AMBIENT_TEMP" "$AMBIENT_TEMP_SENSOR" "$AMBIENT_TEMP_DEV" "$AMBIENT_TEMP_SLOPE" "$AMBIENT_TEMP_INTERCEPT"
else
printf "Ambient Temp %.2f (%s at %s m=%.2f b=%.2f)\n" "$AMBIENT_TEMP" "$AMBIENT_TEMP_SENSOR" "$AMBIENT_TEMP_DEV" "$AMBIENT_TEMP_SLOPE" "$AMBIENT_TEMP_INTERCEPT"
fi
Which gives out (The line numers are probably wrong, because I have put in more in hive.sh)
Date-time 2016-02-06 19:30:01
/home/hivetool/hive.sh: line 376: printf: 47.36: invalid number
Hive Weight 0,00 Sensor: HX711 Slope: 21733,00 Intercept: 52000,00 Device:
/home/hivetool/hive.sh: line 383: printf: 19.2: invalid number
Hive Temp 0,00 (DHT22 at 3 m=1,00 b=0,00)
Hive Humidity 47.6
/home/hivetool/hive.sh: line 392: printf: 3.7: invalid number
Ambient Temp 0,00 (DHT22 at 2 m=1,00 b=-2,00)
Emil,
I have also sent some updates to Paul for the weather data. The original code now expects decimal values but my weather data (from weatherunderground) didn't provide them that way so some fields stayed empty.
I you have the same problem I can provide you with the updated script.
It seems that my WU station sends the correct info
This was more a input to a new release, so the hivetool.log file works for non US settings
Maybe you should make a new thread here with your info, and attach the file so we can take a look at it.
Steven,
could you share here or provide me the updated script, my WU station provides data in full values also and I could expect in autumn some minus degrees in Celsius