Test the GW1000 driver by running the driver file directly using the --test-driver command line option:
for setup.py installs or for package installs use:
So to my understanding that command should become 'PYTHONPATH=/home/weewx/bin /usr/local/bin/python3 -m user.gw1000 --test-driver'but when i enter that command i receive 'PYTHONPATH=/home/weewx/bin: Command not found.'
root@weewx:/home/weewx/bin # PYTHONPATH=/home/weewx/bin; /usr/local/bin/python3 -m user.gw1000 --test-driver
PYTHONPATH=/home/weewx/bin: Command not found.
Using configuration file /home/weewx/weewx.conf
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 40] Message too long
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/logging/handlers.py", line 938, in emit
self.socket.send(msg)
OSError: [Errno 40] Message too long
Call stack:
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/weewx/bin/user/gw1000.py", line 5906, in <module>
main()
File "/home/weewx/bin/user/gw1000.py", line 5900, in main
direct_gw100.process_options()
File "/home/weewx/bin/user/gw1000.py", line 4833, in process_options
self.test_driver()
File "/home/weewx/bin/user/gw1000.py", line 5640, in test_driver
driver = Gw1000Driver(**self.stn_dict)
File "/home/weewx/bin/user/gw1000.py", line 1909, in __init__
super(Gw1000Driver, self).__init__(**stn_dict)
File "/home/weewx/bin/user/gw1000.py", line 1030, in __init__
loginf('field map is %s' % natural_sort_dict(self.field_map))
File "/home/weewx/bin/user/gw1000.py", line 537, in loginf
log.info(msg)
Message: "field map is {'co2': 'co2', 'co2_24h_avg': 'co2_24h_avg', 'dateTime':'datetime', 'daymaxwind': 'daymaxwind', 'dayRain': 'rainday', 'dewpoint': 'dewpoint', 'extraHumid1': 'humid1', 'extraHumid2': 'humid2', 'extraHumid3': 'humid3', 'extraHumid4': 'humid4', 'extraHumid5': 'humid5', 'extraHumid6': 'humid6', 'extraHumid7': 'humid7', 'extraHumid8': 'humid8', 'extraHumid17': 'humid17', 'extraTemp1': 'temp1', 'extraTemp2': 'temp2', 'extraTemp3': 'temp3', 'extraTemp4': 'temp4', 'extraTemp5': 'temp5', 'extraTemp6': 'temp6', 'extraTemp7': 'temp7', 'extraTemp8': 'temp8', 'extraTemp9': 'temp9', 'extraTemp10': 'temp10', 'extraTemp11':'temp11', 'extraTemp12': 'temp12', 'extraTemp13': 'temp13', 'extraTemp14': 'temp14', 'extraTemp15': 'temp15', 'extraTemp16': 'temp16', 'extraTemp17': 'temp17','heatindex': 'heatindex', 'hourRain': 'rainhour', 'inHumidity': 'inhumid', 'inTemp': 'intemp', 'leafWet1': 'leafwet1', 'leafWet2': 'leafwet2', 'leafWet3': 'leafwet3', 'leafWet4': 'leafwet4', 'leafWet5': 'leafwet5', 'leafWet6': 'leafwet6', 'leafWet7': 'leafwet7', 'leafWet8': 'leafwet8', 'leak1': 'leak1', 'leak2': 'leak2', 'leak3': 'leak3', 'leak4': 'leak4', 'lightning_distance': 'lightningdist', 'lightning_last_det_time': 'lightningdettime', 'lightning_strike_count': 'lightning_strike_count', 'lightningcount': 'lightningcount', 'luminosity': 'light', 'monthRain': 'rainmonth', 'outHumidity': 'outhumid', 'outTemp': 'outtemp', 'pm2_5':'pm251', 'pm2_51_24h_avg': 'pm251_24h_avg', 'pm2_52': 'pm252', 'pm2_52_24h_avg': 'pm252_24h_avg', 'pm2_53': 'pm253', 'pm2_53_24h_avg': 'pm253_24h_avg', 'pm2_54': 'pm254', 'pm2_54_24h_avg': 'pm254_24h_avg', 'pm2_55': 'pm255', 'pm2_55_24h_avg': 'pm255_24h_avg', 'pm10': 'pm10', 'pm10_24h_avg': 'pm10_24h_avg', 'pressure':'absbarometer', 'rain': 'rain', 'rainRate': 'rainrate', 'relbarometer': 'relbarometer', 'soilMoist1': 'soilmoist1', 'soilMoist2': 'soilmoist2', 'soilMoist3': 'soilmoist3', 'soilMoist4': 'soilmoist4', 'soilMoist5': 'soilmoist5', 'soilMoist6': 'soilmoist6', 'soilMoist7': 'soilmoist7', 'soilMoist8': 'soilmoist8', 'soilMoist9': 'soilmoist9', 'soilMoist10': 'soilmoist10', 'soilMoist11': 'soilmoist11','soilMoist12': 'soilmoist12', 'soilMoist13': 'soilmoist13', 'soilMoist14': 'soilmoist14', 'soilMoist15': 'soilmoist15', 'soilMoist16': 'soilmoist16', 'soilTemp1': 'soiltemp1', 'soilTemp2': 'soiltemp2', 'soilTemp3': 'soiltemp3', 'soilTemp4': 'soiltemp4', 'soilTemp5': 'soiltemp5', 'soilTemp6': 'soiltemp6', 'soilTemp7': 'soiltemp7', 'soilTemp8': 'soiltemp8', 'soilTemp9': 'soiltemp9', 'soilTemp10': 'soiltemp10', 'soilTemp11': 'soiltemp11', 'soilTemp12': 'soiltemp12', 'soilTemp13': 'soiltemp13', 'soilTemp14': 'soiltemp14', 'soilTemp15': 'soiltemp15', 'soilTemp16': 'soiltemp16', 'stormRain': 'rainevent', 'totalRain': 'raintotals', 'UV': 'uvi', 'uvradiation': 'uv', 'weekRain': 'rainweek', 'wh25_batt': 'wh25_batt', 'wh25_sig': 'wh25_sig', 'wh26_batt': 'wh26_batt', 'wh26_sig': 'wh26_sig', 'wh31_ch1_batt': 'wh31_ch1_batt', 'wh31_ch1_sig': 'wh31_ch1_sig', 'wh31_ch2_batt': 'wh31_ch2_batt', 'wh31_ch2_sig': 'wh31_ch2_sig', 'wh31_ch3_batt': 'wh31_ch3_batt', 'wh31_ch3_sig': 'wh31_ch3_sig', 'wh31_ch4_batt': 'wh31_ch4_batt', 'wh31_ch4_sig': 'wh31_ch4_sig', 'wh31_ch5_batt': 'wh31_ch5_batt', 'wh31_ch5_sig': 'wh31_ch5_sig', 'wh31_ch6_batt': 'wh31_ch6_batt', 'wh31_ch6_sig': 'wh31_ch6_sig', 'wh31_ch7_batt': 'wh31_ch7_batt', 'wh31_ch7_sig': 'wh31_ch7_sig', 'wh31_ch8_batt': 'wh31_ch8_batt', 'wh31_ch8_sig': 'wh31_ch8_sig', 'wh35_ch1_batt': 'wh35_ch1_batt', 'wh35_ch1_sig': 'wh35_ch1_sig', 'wh35_ch2_batt': 'wh35_ch2_batt', 'wh35_ch2_sig': 'wh35_ch2_sig', 'wh35_ch3_batt': 'wh35_ch3_batt', 'wh35_ch3_sig': 'wh35_ch3_sig', 'wh35_ch4_batt': 'wh35_ch4_batt', 'wh35_ch4_sig': 'wh35_ch4_sig', 'wh35_ch5_batt':'wh35_ch5_batt', 'wh35_ch5_sig': 'wh35_ch5_sig', 'wh35_ch6_batt': 'wh35_ch6_batt', 'wh35_ch6_sig': 'wh35_ch6_sig', 'wh35_ch7_batt': 'wh35_ch7_batt', 'wh35_ch7_sig': 'wh35_ch7_sig', 'wh35_ch8_batt': 'wh35_ch8_batt', 'wh35_ch8_sig': 'wh35_ch8_sig', 'wh40_batt': 'wh40_batt', 'wh40_sig': 'wh40_sig', 'wh41_ch1_batt': 'wh41_ch1_batt', 'wh41_ch1_sig': 'wh41_ch1_sig', 'wh41_ch2_batt': 'wh41_ch2_batt', 'wh41_ch2_sig': 'wh41_ch2_sig', 'wh41_ch3_batt': 'wh41_ch3_batt', 'wh41_ch3_sig': 'wh41_ch3_sig', 'wh41_ch4_batt': 'wh41_ch4_batt', 'wh41_ch4_sig': 'wh41_ch4_sig', 'wh45_batt': 'wh45_batt', 'wh45_sig': 'wh45_sig', 'wh51_ch1_batt': 'wh51_ch1_batt', 'wh51_ch1_sig': 'wh51_ch1_sig', 'wh51_ch2_batt': 'wh51_ch2_batt', 'wh51_ch2_sig': 'wh51_ch2_sig', 'wh51_ch3_batt': 'wh51_ch3_batt', 'wh51_ch3_sig': 'wh51_ch3_sig', 'wh51_ch4_batt': 'wh51_ch4_batt', 'wh51_ch4_sig': 'wh51_ch4_sig', 'wh51_ch5_batt': 'wh51_ch5_batt', 'wh51_ch5_sig': 'wh51_ch5_sig', 'wh51_ch6_batt': 'wh51_ch6_batt', 'wh51_ch6_sig': 'wh51_ch6_sig', 'wh51_ch7_batt': 'wh51_ch7_batt', 'wh51_ch7_sig': 'wh51_ch7_sig', 'wh51_ch8_batt': 'wh51_ch8_batt', 'wh51_ch8_sig': 'wh51_ch8_sig', 'wh51_ch9_batt': 'wh51_ch9_batt', 'wh51_ch9_sig': 'wh51_ch9_sig', 'wh51_ch10_batt': 'wh51_ch10_batt', 'wh51_ch10_sig': 'wh51_ch10_sig', 'wh51_ch11_batt': 'wh51_ch11_batt', 'wh51_ch11_sig': 'wh51_ch11_sig', 'wh51_ch12_batt': 'wh51_ch12_batt', 'wh51_ch12_sig': 'wh51_ch12_sig', 'wh51_ch13_batt': 'wh51_ch13_batt', 'wh51_ch13_sig': 'wh51_ch13_sig', 'wh51_ch14_batt': 'wh51_ch14_batt', 'wh51_ch14_sig': 'wh51_ch14_sig', 'wh51_ch15_batt': 'wh51_ch15_batt', 'wh51_ch15_sig': 'wh51_ch15_sig', 'wh51_ch16_batt': 'wh51_ch16_batt', 'wh51_ch16_sig': 'wh51_ch16_sig', 'wh55_ch1_batt': 'wh55_ch1_batt', 'wh55_ch1_sig': 'wh55_ch1_sig', 'wh55_ch2_batt': 'wh55_ch2_batt', 'wh55_ch2_sig': 'wh55_ch2_sig', 'wh55_ch3_batt': 'wh55_ch3_batt', 'wh55_ch3_sig': 'wh55_ch3_sig', 'wh55_ch4_batt': 'wh55_ch4_batt', 'wh55_ch4_sig': 'wh55_ch4_sig', 'wh57_batt': 'wh57_batt', 'wh57_sig': 'wh57_sig', 'wh65_batt': 'wh65_batt', 'wh65_sig': 'wh65_sig', 'wh68_batt': 'wh68_batt', 'wh68_sig': 'wh68_sig', 'windchill': 'windchill', 'windDir': 'winddir', 'windGust': 'gustspeed', 'windSpeed': 'windspeed', 'ws80_batt': 'ws80_batt', 'ws80_sig': 'ws80_sig', 'yearRain': 'rainyear'}"
Arguments: ()
Interrogating GW1000 at 192.168.0.200:45000
Where it then sits. It looks like this is still not finding the command, but it is outputting now instead of just telling me command not found then stopping. I am in the /home/weewx/bin directory when I execute this command. It doesn't seem to work when I am sitting at root.
I actually wasn't sure, haha. I am currently working out of the shell built into the GUI of TrueNAS. I just checked using 'ps -p$$ -ocommand=' and it came back as csh.
Using configuration file /home/weewx/weewx.conf--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.8/logging/handlers.py", line 934, in emit
self.socket.send(msg)
OSError: [Errno 40] Message too long
During handling of the above exception, another exception occurred:
...
Interrogating GW1000 at 192.168.0.200:45000
Message from rsyslog-8.2104.0:
--
To start using rsyslogd(8), stop syslogd(8) if it's running and
add the following lines to rc.conf(5):
syslogd_enable="NO"
rsyslogd_enable="YES"
It's recommended to copy syslog.conf(5) to
/usr/local/etc/rsyslog.conf and edit it there. Otherwise add
this:
rsyslogd_config="/etc/syslog.conf"
Add the following (3) lines to the beginning of the config file, for
basic functionality:
module(load="immark") # provides --MARK-- message capability
module(load="imuxsock") # provides support for local system logging
module(load="imklog") # kernel logging
newsyslog(8) has the path of syslogd's pid file hardcoded. To
make it work seamlessly with rsyslog, add this:
rsyslogd_pidfile="/var/run/syslog.pid"
Is syslog not already a logger? Is it not adequate and rsyslog more capable?
Interrogating GW1000 at 192.168.0.200:45000'
Still not sure why I'm not seeing any activity, but at least the errors are cleared! Thank you!
Interrogating GW1000 at 192.168.0.200:45000
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/weewx/bin/user/gw1000.py", line 5906, in <module>
main()
File "/home/weewx/bin/user/gw1000.py", line 5900, in main
direct_gw100.process_options()
File "/home/weewx/bin/user/gw1000.py", line 4858, in process_options
self.sensors()
File "/home/weewx/bin/user/gw1000.py", line 5432, in sensors
collector.update_sensor_id_data()
File "/home/weewx/bin/user/gw1000.py", line 2344, in update_sensor_id_data
self.sensors_obj.set_sensor_id_data(sensor_id_data)
File "/home/weewx/bin/user/gw1000.py", line 4108, in set_sensor_id_data
batt_fn = Gw1000Collector.sensor_ids[data[index:index + 1]]['batt_fn']
KeyError: b'0'
Interrogating GW1000 at 192.168.0.200:45000
Traceback (most recent call last):
File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/weewx/bin/user/gw1000.py", line 5906, in <module>
main()
File "/home/weewx/bin/user/gw1000.py", line 5900, in main
direct_gw100.process_options()
File "/home/weewx/bin/user/gw1000.py", line 4860, in process_options
self.live_data()
File "/home/weewx/bin/user/gw1000.py", line 5497, in live_data
live_sensor_data_dict = collector.get_live_sensor_data()
File "/home/weewx/bin/user/gw1000.py", line 2329, in get_live_sensor_data
self.update_sensor_id_data()
File "/home/weewx/bin/user/gw1000.py", line 2344, in update_sensor_id_data
self.sensors_obj.set_sensor_id_data(sensor_id_data)
File "/home/weewx/bin/user/gw1000.py", line 4108, in set_sensor_id_data
batt_fn = Gw1000Collector.sensor_ids[data[index:index + 1]]['batt_fn']
KeyError: b'0'
Does this help clarify my problem at all?
Hi Gary,
It’s no trouble at all. I sincerely appreciate all the help you are providing and am not in a rush. Truthfully, my time is fairly limited for this. I’ve been trying to respond to everyone as timely as possible. I have a three year old and a 4 month old, so my day time hours to tinker with this are limited!
As for your questions:
It is a GW1100, the newer model. Firmware is GW1100B_V2.0.4
when I run the sensors command with debug 3 I get this output in the debug.log file
Sep 25 09:42:15 weewx weewx[86253] DEBUG __main__: Sending packet 'FF FF 26 03 29' to '192.168.0.200:45000'-truncated by __main__
Sep 25 09:42:15 weewx weewx[86253] DEBUG __main__: Received response 'FF FF 26 09 E8 DB 84 E7 23 6C EC'-truncated by __main__
Sep 25 09:42:15 weewx weewx[86253] DEBUG __main__: Sending packet 'FF FF 30 03 33' to '192.168.0.200:45000'-truncated by __main__
Sep 25 09:42:15 weewx weewx[86253] DEBUG __main__: Received response 'FF FF 30 0B 02 01 61 4F 6E A2 27 01 26'-truncated by __main__
Sep 25 09:42:15 weewx weewx[86253] DEBUG __main__: Sending packet 'FF FF 3C 03 3F' to '192.168.0.200:45000'-truncated by __main__
I don’t see anything in the debug log after running the firmware version command, and I didn’t see anything after running the live data command, which is weird.
Is this the right location for the log?
Thanks
Evan