Hi Tom,

Sorry, still erroring...

root@raspberrypi:/home/weewx/bin# ./wee_device --set-interval=5
Using configuration file /home/weewx/weewx.conf
Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
Changing the interval will clear the station memory.
Interval is 60
Set interval to 5 minutes (y/n)? y
Traceback (most recent call last):
  File "./wee_device", line 78, in <module>
    main()
  File "./wee_device", line 74, in main
    device.configure(config_dict)
  File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
    self.do_options(options, parser, config_dict, not options.noprompt)
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 316, in do_options
    self.set_interval(options.interval, prompt)
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 378, in set_interval
    self.station.setArchiveInterval(interval)
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 540, in
setArchiveInterva                                      l
    self.station.set_archive_interval(interval)
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 686, in
set_archive_inter                                      val
    self.ws.write_safe(m.address, *cmd[1:])
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1120, in write_safe
    command_data = self.write_data(nybble_address,nybbles,encode_constant)
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1104, in write_data
    self.write_byte([encoded_data[i]])
  File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1017, in write_byte
    self.log("%02x" % ord(data))
TypeError: ord() expected string of length 1, but list found

Nigel

On Tue, 8 Sep 2020 at 00:40, Tom Keffer <[email protected]> wrote:

> Let's try that again. How about this version?
>
>
>
> On Sun, Sep 6, 2020 at 11:00 AM Devonian <[email protected]> wrote:
>
>> humpf - I don't like this new fangle google group on-line...
>>
>> Should be
>>
>> root@raspberrypi:/home/weewx/bin# ./wee_device --set-interval=5
>> Using configuration file /home/weewx/weewx.conf
>> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
>> Changing the interval will clear the station memory.
>> Interval is 60
>> Set interval to 5 minutes (y/n)? y
>> Traceback (most recent call last):
>>   File "./wee_device", line 78, in <module>
>>     main()
>>   File "./wee_device", line 74, in main
>>     device.configure(config_dict)
>>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in configure
>>     self.do_options(options, parser, config_dict, not options.noprompt)
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 316, in do_options
>>     self.set_interval(options.interval, prompt)
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 378, in
>> set_interval
>>     self.station.setArchiveInterval(interval)
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 540, in
>> setArchiveInterval
>>     self.station.set_archive_interval(interval)
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 686, in
>> set_archive_interval
>>     self.ws.write_safe(m.address, *cmd[1:])
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in write_safe
>>     command_data = self.write_data(nybble_address,nybbles,encode_constant)
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in write_data
>>     self.write_byte(encoded_data[i])
>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in write_byte
>>     self.log("%02x" % six.byte2int(data))
>> TypeError: 'int' object is not subscriptable
>>
>>
>> Nigel
>>
>> On Sunday, 6 September 2020 at 18:58:20 UTC+1 Devonian wrote:
>>
>>> ooops, ignore the first couple of lines above, copy/paste error
>>>
>>> Nigel
>>>
>>> On Sunday, 6 September 2020 at 18:56:22 UTC+1 Devonian wrote:
>>>
>>>> Hi Tom,
>>>>
>>>> Thanks, but...
>>>>
>>>> root@raspberrypi:/home/weewx/bin# ./wee_device --set-interval=5
>>>> Using configuration file /home/weewx/weewx.conf
>>>> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
>>>> Changing the interval will clear the station memory.
>>>> Interval is 60
>>>> Set interval to 5 minutes (y/n)? y
>>>> Traceback (most recent call last):
>>>>   File "./wee_device", line 78, in <module>
>>>>     main()
>>>>   File "./wee_device", line 74, in main
>>>>     device.configure(config_dict)
>>>>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in
>>>> configure
>>>>     self.do_options(options, parser, config_dict, not options.noprompt)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 316, in
>>>> do_options
>>>>     self.set_interval(options.interval, prompt)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 378, in
>>>> set_interval
>>>>     self.station.setArchiveInterval(interval)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 540, in
>>>> setArchiveInterval
>>>>     self.station.set_archive_interval(interval)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 686, in
>>>> set_archive_interval
>>>>     self.ws.write_safe(m.address, *cmd[1:])
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in
>>>> write_safe
>>>>     command_data =
>>>> self.write_data(nybble_address,nybbles,encode_constant)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in
>>>> write_data
>>>>     self.write_byte(encoded_data[i])
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in
>>>> write_byte
>>>>     self.log("%02x" % six.byte2int(data))
>>>> TypeError: 'int' object is not subscriptable
>>>>
>>>>
>>>> ---------------------------------------------------------------------------------------------------------------------------
>>>>
>>>> root@raspberrypi:/home/weewx/bin# ./wee_device --info
>>>> Using configuration file /home/weewx/weewx.conf
>>>> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
>>>> Querying the station for the configuration...
>>>> Traceback (most recent call last):
>>>>   File "./wee_device", line 78, in <module>
>>>>     main()
>>>>   File "./wee_device", line 74, in main
>>>>     device.configure(config_dict)
>>>>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in
>>>> configure
>>>>     self.do_options(options, parser, config_dict, not options.noprompt)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 320, in
>>>> do_options
>>>>     self.show_info()
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 326, in show_info
>>>>     config = self.station.getConfig()
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 548, in getConfig
>>>>     data = self.station.get_raw_data(list(Measure.IDS.keys()))
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 791, in
>>>> get_raw_data
>>>>     data_dict = dict(list(zip(labels, [m.conv.binary2value(d) for m, d
>>>> in zip(measures, raw_data)])))
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 791, in
>>>> <listcomp>
>>>>     data_dict = dict(list(zip(labels, [m.conv.binary2value(d) for m, d
>>>> in zip(measures, raw_data)])))
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1489, in
>>>> binary2value
>>>>     0)) - time.timezone
>>>> OverflowError: mktime argument out of range
>>>>
>>>>
>>>> ---------------------------------------------------------------------------------------------------------------------------
>>>>
>>>> root@raspberrypi:/home/weewx/bin# ./wee_device --clear-memory
>>>> Using configuration file /home/weewx/weewx.conf
>>>> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
>>>> Records in memory: 4
>>>> Clear console memory (y/n)? y
>>>> Traceback (most recent call last):
>>>>   File "./wee_device", line 78, in <module>
>>>>     main()
>>>>   File "./wee_device", line 74, in main
>>>>     device.configure(config_dict)
>>>>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in
>>>> configure
>>>>     self.do_options(options, parser, config_dict, not options.noprompt)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 318, in
>>>> do_options
>>>>     self.clear_history(prompt)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 395, in
>>>> clear_history
>>>>     self.station.clearHistory()
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 565, in
>>>> clearHistory
>>>>     self.station.clear_memory()
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 701, in
>>>> clear_memory
>>>>     self.ws.write_safe(m.address, *cmd[1:])
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in
>>>> write_safe
>>>>     command_data =
>>>> self.write_data(nybble_address,nybbles,encode_constant)
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in
>>>> write_data
>>>>     self.write_byte(encoded_data[i])
>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in
>>>> write_byte
>>>>     self.log("%02x" % six.byte2int(data))
>>>> TypeError: 'int' object is not subscriptable
>>>>
>>>> Sorry for the pain !
>>>>
>>>> Nigel
>>>>
>>>>
>>>>
>>>> On Sunday, 6 September 2020 at 16:38:02 UTC+1 [email protected] wrote:
>>>>
>>>>> Looks like you found a bug when running under Python 3. Try this
>>>>> version of ws23xx.py.
>>>>>
>>>>> -tk
>>>>>
>>>>> On Sun, Sep 6, 2020 at 8:13 AM Devonian <[email protected]> wrote:
>>>>>
>>>>>> I have setup a clean install (setup.py) in Debian Buster on a R-Pi as
>>>>>> per this
>>>>>> http://weewx.com/docs/setup.htm
>>>>>> and when trying to:
>>>>>> ./wee_device --set-interval=5
>>>>>>
>>>>>> I get this:
>>>>>>
>>>>>> Using configuration file /home/weewx/weewx.conf
>>>>>> Using WS23xx driver version 0.41 (weewx.drivers.ws23xx)
>>>>>> Changing the interval will clear the station memory.
>>>>>> Interval is 60
>>>>>> Set interval to 5 minutes (y/n)? y
>>>>>>
>>>>>> Traceback (most recent call last):
>>>>>>   File "./wee_device", line 78, in <module>
>>>>>>     main()
>>>>>>   File "./wee_device", line 74, in main
>>>>>>     device.configure(config_dict)
>>>>>>   File "/home/weewx/bin/weewx/drivers/__init__.py", line 67, in
>>>>>> configure
>>>>>>     self.do_options(options, parser, config_dict, not
>>>>>> options.noprompt)
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 316, in
>>>>>> do_options
>>>>>>     self.set_interval(options.interval, prompt)
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 378, in
>>>>>> set_interval
>>>>>>     self.station.setArchiveInterval(interval)
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 540, in
>>>>>> setArchiveInterval
>>>>>>     self.station.set_archive_interval(interval)
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 686, in
>>>>>> set_archive_interval
>>>>>>     self.ws.write_safe(m.address, *cmd[1:])
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1115, in
>>>>>> write_safe
>>>>>>     command_data =
>>>>>> self.write_data(nybble_address,nybbles,encode_constant)
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1099, in
>>>>>> write_data
>>>>>>     self.write_byte(encoded_data[i])
>>>>>>   File "/home/weewx/bin/weewx/drivers/ws23xx.py", line 1012, in
>>>>>> write_byte
>>>>>>     self.log("%02x" % ord(data))
>>>>>> TypeError: ord() expected string of length 1, but int found
>>>>>>
>>>>>> In fact, trying to use any wee_device command throws an error.
>>>>>>
>>>>>> Weewx does run and produces data/graphs, but I want 5 min intervals.
>>>>>>
>>>>>> Nigel
>>>>>>
>>>>>> --
>>>>>> 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/77c0d927-a9a0-4bc9-b668-efd285b917e8n%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/weewx-user/77c0d927-a9a0-4bc9-b668-efd285b917e8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>> 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/0261e4a4-5421-4495-9358-3a26f74b22e3n%40googlegroups.com
>> <https://groups.google.com/d/msgid/weewx-user/0261e4a4-5421-4495-9358-3a26f74b22e3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/weewx-user/_eXfjstpDyM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/CAPq0zEBdwX5A5MhbDRYhQ8MVkU8UxHC4Ug3ghUUJ3nY0x-OJ6A%40mail.gmail.com
> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEBdwX5A5MhbDRYhQ8MVkU8UxHC4Ug3ghUUJ3nY0x-OJ6A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CA%2BdVQkMZV3yVgr9%3D18M2n62H%3DMX1mapCbEZ7d_qqXi-RwRYbcw%40mail.gmail.com.

Reply via email to