Hi Bob,

Thanks for sending me your advice. I checked the syslog and found a couple
of problems.

The main problem was that my raspberry pi had two versions of python
installed - python 2 and python 3.
This in conjunction of parameter WEEWX_PYTHON=python2 in the weewx.conf
file located in /etc/default/ have caused that your program was running
under incompatible version of python 2.
It then caused that ws6in1 driver was not added to the list of
available drivers. Once the parameter was changed to python3, the driver
was accepted.

There was, however, another bug which I had to fix. The syslog was showing
this message and the driver had struggled to start

******************
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 Traceback (most recent call last):
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 self.console = loader_function(config_dict, self)
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 File "/usr/share/weewx/user/ws6in1.py", line 393, in loader
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 return ws6in1(**config_dict[DRIVER_NAME])
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 File "/usr/lib/python3/dist-packages/configobj.py", line 554, in
__getitem__
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 val = dict.__getitem__(self, key)
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL weewx.engine:     ****
 KeyError: 'WS6in1'
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL __main__: Unable to load
driver: 'WS6in1'
Jun 16 01:43:09 raspberrypi weewx[6975] CRITICAL __main__:     ****
 Exiting...
******************

What I did to fix it wa that I modified your code on the line 377 to this

DRIVER_NAME = 'ws6in1'

I only made the driver's name lower case.
After this it suddenly started to work.

It might be something specific for my raspberry pi unit, but the code had
to be modified to get it working.

In any case, your suggestions helped me to work my issue out.

PS: I noticed your new version of ws6in1 driver.
I installed it and after modification od the driver name value it also
works well. :-)

Kind regards - Ondrej


po 15. 6. 2020 o 9:20 Bob Atchley <bob.atch...@gmail.com> napĂ­sal(a):

> Hi Ondrej
>
> I don't understand the behaviour you are seeing and I need a bit more
> information.
>
> Are you trying to run with the weewx Simulator and the WS6in1 at the same
> time ?  You should only be using WS6in1.
>
> The results you are seeing cannot be conversion errors they are something
> completely different.
>
> Could you set the debug to '1' (in the weewx.conf file), restart weewx and
> then post the relevant output from the /var/log/syslog
>
> If you are familiar with databases it might be worth looking at the
> entries in the database to see whats actually been stored (i.e is it what
> you are expecting from the console or the same as the erroneous data being
> displayed)
>
> Good luck
>
> Bob
>
> --
> 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 weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/1d18b31b-8813-4397-9046-df27bc109801o%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/1d18b31b-8813-4397-9046-df27bc109801o%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAMj--Gorom351tDSxsD3YZ%3D6-ZwPAcjzyrhVhXMav7WuYL3t7g%40mail.gmail.com.

Reply via email to