Sorry Ewan, but I don't have any time to look at this further today as I am 
out the door in 20 minutes. In the interim a couple of questions for you:

1. can you run the commands you have been using but this time with the 
--debug=3 command line option, eg:

$ PYTHONPATH=/home/weewx/bin python -m user.gw1000 --sensors --debug=3

This will (should) place a whole lot of hex output in the log showing the 
actual data being sent to and received from the GW1000. Could you post a 
log extract showing this data for each command? Would be handy to see a 
couple of successful commands (sounds like --firmware-version and --discover 
may be working) and some that are not, eg --sensors and maybe --live-data 
(am guessing these are not working).

2. is this a GW1000 or GW1100 ? 

Gary
On Saturday, 25 September 2021 at 13:49:06 UTC+10 Evan Kimberly wrote:

> So now that I have the driver working, I decided to poke through some of 
> the options. I was able for the driver to see the IP, port, MAC address, 
> firmware version, and calibrations off of my GW1000. However, when I try to 
> see the sensors I get this error:
>
> 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'
> If I try to see live data I get a similar error.
>
> 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?
>
>
>
> On Friday, September 24, 2021 at 10:22:37 PM UTC-4 Evan Kimberly wrote:
>
>> Gary,
>>
>> Thanks so much! That's cleared the error. Now when I run the driver test, 
>> I get no block of text, just the following message:
>> 'Using configuration file /home/weewx/weewx.conf 
>>
>> 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!
>>
>>
>> On Friday, September 24, 2021 at 9:05:51 PM UTC-4 vince wrote:
>>
>>> Gary - this seems to be a freebsd limitation (see 
>>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241937)
>>>
>>> On Friday, September 24, 2021 at 6:02:06 PM UTC-7 gjr80 wrote:
>>>
>>>> > this doesn't seem to be written with freebsd in mind
>>>>
>>>> Correct. Call in unintentionally intentional if you like but I don't 
>>>> use BSD and nor do I see any other driver/extension including specific BSD 
>>>> instructions. That said I am happy to get a freebsd VM up and running if 
>>>> need be to deal with any gw1000 issues, keep in mind though that I am 
>>>> coming off a zero BSD knowledge baseline so don't expect an answer 
>>>> overnight :)
>>>>
>>>> That being said, and noting the issue above re log message lines line 
>>>> being too long (the gw1000 driver field map is really looong), I have 
>>>> patched the current GW1000 driver release file (v0.3.1) to limit the log 
>>>> entry to less than 80 characters (well 60 characters plus some other bits 
>>>> and pieces depending on your python version). You can try it if you want, 
>>>> to install it:
>>>>
>>>> 1. move aside your present gw1000.py (sorry but I have lost track 
>>>> where it is)
>>>> 2. download the patched gw1000.py from 
>>>> https://raw.githubusercontent.com/gjr80/weewx-gw1000/bsd_issues/bin/user/gw1000.py
>>>>  
>>>> and save it in place of your previous gw1000.py. I would use $ wget 
>>>> https://raw.githubusercontent.com/gjr80/weewx-gw1000/bsd_issues/bin/user/gw1000.py
>>>>  
>>>> to download it directly on my Debian system but I have no idea what you 
>>>> need do on BSD.
>>>> 3. restart WeeWX
>>>>
>>>> I have versioned this patched file as v0.3.1special and fior want of a 
>>>> better place have it in the bsd_issues branch in the GW100 driver 
>>>> GitHub repo, don't use this branch for anything as it will likely be 
>>>> deleted in the near future.
>>>>
>>>> Gary
>>>>
>>>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/175dc635-fc8d-4cbc-bae1-82c8209c793fn%40googlegroups.com.

Reply via email to