Hi,
as described in the customization guide, i overwrite the StdPrint like the
following:
from weewx.engine import StdPrint
from weeutil.weeutil import timestamp_to_string
from weewx.engine import StdPrint
from weeutil.weeutil import timestamp_to_string
class MyPrint(StdPrint):
# Override the default new_loop_packet member function:
def new_loop_packet(self, event):
f = open('/var/www/wetter/mnt/loopData.php', 'w')
packet = event.packet
print >>f, "loopTime=", timestamp_to_string(packet['dateTime']),
"\n", "forecastIcon=", packet.get('forecastIcon', 'N/A'), "\n",
"forecastRule=", packet.get('forecastRule', 'N/A'), "\n", "trendIcon=",
packet.get('trendIcon', 'N/A'), "\n"
print >>f, "windSpeed=", packet.get('windSpeed', 'N/A'), "\n",
"windDir=", packet.get('windDir', 'N/A'), "\n", "windGustSpeed=",
packet.get('windGust', 'N/A'), "\n", "windGustDir=",
packet.get('windGustDir', 'N/A'), "\n"
f.close()
Everythings works fine, only the positions after the decimal point of the
windspeed are always zero:
loopTime= 2017-07-04 13:55:35 CEST (1499169335)
forecastIcon= 6
forecastRule= 44
trendIcon= 20
windSpeed= 2.0
windDir= 233.0
windGustSpeed= 2.0
windGustDir= 233.0
What is to do, to get the correct value after the decimal point?
Station: VantagePro2, Configured to show decimal values. On the station and
at Weatherunderground, i see the correct values.
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.