new driver ... next steps

629 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Bob Atchley

belum dibaca,
3 Mar 2020, 15.38.2603/03/20
kepadaweewx-development
I have a new weewx beta driver that should support the following weather stations:
Youshiko YC9388
Bresser PC 6 in 1
Garni 935PC
Ventus W835

I have the Youshiko weather station.

The driver is working reliably (I have 48 hours of weewx data and growing) but I view it as very much first steps.
I'm not a python expert by any means, so I'm hoping for feedback and improvements.

But the first step is sharing this with the community.  I'm also new to git.  I''ve just cloned the repository,
do I just add the driver into bin/user and commit it (or into bin/weewx/drivers)  or is it more complicated than that

Thanks

Bob

Thomas Keffer

belum dibaca,
3 Mar 2020, 15.49.5403/03/20
kepadaBob Atchley, weewx-development
Hello, Bob, and thanks for your effort.

Take a look at the many 3rd party drivers listed in the Wiki to see how others have done this. Just to pick one at random, how about the Rainwise IP-100? The driver is in bin/user/. It also uses an install program, install.py. A change log is also a good idea. Include a license. Add a readme with directions.

Then add your new driver to the list on the Wiki, with a link to your GitHub repository.

A great learning experience on git and github!

-tk



--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/341ac067-8ba7-4c51-b0bc-c19a9c764a93%40googlegroups.com.
Pesan telah dihapus

Bob Atchley

belum dibaca,
12 Mar 2020, 18.10.1912/03/20
kepadaweewx-development
Hi Tom,

Thanks for this, I have uploaded a first version - called it ws6in1 as that seems to be the common link between the 4 weather stations clones that I know about so far .
As suggested I have updated the Wiki linking to my Git repository - not used the utilities before but they seemed to do the job.  If you take a look and spot any howlers let me know

Bob

SteinWolf

belum dibaca,
15 Agu 2020, 13.57.0415/08/20
kepadaweewx-development
Hi!
I also have the Bresser and try to get the data from it.
At first I want to thank you, for bringing the affort of making a driver.
But second - it doesn't work on my raspi. It has an error: "No module named crcmod". Crcmod is installed, so I dont have the chance to set this driver in the weewx config file.
Any ideas?

Bob Atchley

belum dibaca,
15 Agu 2020, 15.06.2715/08/20
kepadaweewx-development
Hi SteinWolf,

A few questions ...
Are you using weewx 4.1.1 ?
Are you using python3 ?

The default is python2, so without seeing your logs my guess would be that you have installed crcmod for python3 but are running weewx with python2 (or vice versa).

I would strongly recommend using python3 (python2 is out of support).  The weewx installation documentation has very clear instruction on how to install weewx with python3.

For the ws6in1 driver:
$ pip3 install crcmod

Hope this helps.  If not please provide a bit more information

Regards

Bob

SteinWolf

belum dibaca,
15 Agu 2020, 17.11.0315/08/20
kepadaweewx-development
Hi Bob,

Yes I'm using weewx 4.1.1 and python3.
I have done everything as mentioned on the side http://www.weewx.com/docs/setup.htm
On point 2. download - I used "wget http://weewx.com/downloads/weewx-4.1.1.tar.gz" and with "sudo mv weewx-4.1.1.tar.gz /home/" I moved it to the home folder. CD to home and rest like the discription point 3 and so on.
I have also done pip3 install crcmod.
So I think everything should run on python3. (?)

I'm really new to this raspberry thing so I dont know how to give you more details.

BR,
Steinwolf

SteinWolf

belum dibaca,
15 Agu 2020, 17.22.1715/08/20
kepadaweewx-development
OHH - I used $ python -V to see the version and I think you are right. python 2.7.16 is installed. But how is this possible? And how do I install the Version 3???

SteinWolf

belum dibaca,
15 Agu 2020, 17.27.2515/08/20
kepadaweewx-development
Oh, and python3 -V and there is also a version 3.

Bob Atchley

belum dibaca,
16 Agu 2020, 02.27.1816/08/20
kepadaweewx-development
Hi SteinWolf,

Yes both are installed but python2 is the default.  If you carried out step 3.4 in the install:

$ python3 ./setup.py build
$ sudo python3 ./setup.py install

Then you should be using python3.  If you are not sure what you did its easy to check

$ head -1 /home/weewx/bin/weewxd
should give you an output of "#!/usr/bin/python3"

If you are using python3 you could try installing the crcmod package explicitly:

$ sudo apt install python3-crcmod

if that doesn't work  could you provide the output from /var/log/syslog when you start up weewx

Hope this helps

Bob

SteinWolf

belum dibaca,
16 Agu 2020, 10.02.1416/08/20
kepadaweewx-development
YES! last code was the right one. Now I could choose the driver.
But weewx ist still running in simulator mode.
And I now have the problem, that the index.html isnt showing up in the browser. "cd /var/www/html" and "ln -s /home/weewx/public_html weather" was done, but "10.0.0.xx/weather/index.html" doesnt work.
I dont know, how this driver is working, so do I need to point the weatherstation in the router to the raspberry, or is this automated, because it is in the same network?

Bob Atchley

belum dibaca,
16 Agu 2020, 10.48.0516/08/20
kepadaweewx-development
Hi SteinWolf,

A step close ....

If you have a look at your weewx.conf file (/home/weewx/weewx.conf) in the section starting "[Station]" you should see:
station_type = WS6in1

If you followed the readme instructions:

There should also be a WS6in1 section

Can you confirm these are present.

The driver is responsible for fetching the data off the weather station so that weewx can process it.
We need to get that working before we get too worried about presenting the data.  However I would say that in general web servers are very careful about restricting access.  You need to make sure that the web server has read permission to the data.

Hope this helps

Bob

SteinWolf

belum dibaca,
16 Agu 2020, 11.14.4916/08/20
kepadaweewx-development
Yes - step by step we (I with your help) got it.
So... at "/home/weewx/weewx.conf" there is no 6in1 section and there is simulator at the Station info. BUT when I do
"sudo wee_config --reconfigure" it says driver WS6in1 (user.ws6in1), AND "Saved backup to /etc/weewx/weewx.conf.20200816160218".
So the reconfigured file is always in the folder /etc/weewx and not /home/weewx. Weired. I dont know why, because I followed the instructions carefully.
Sould I just copy the weewx.conf from the /etc to /home?

Bob Atchley

belum dibaca,
16 Agu 2020, 11.52.4616/08/20
kepadaweewx-development
That's very odd  ... If you install weewx via the debian distribution  it puts the files in the normal linux locations (/etc, /usr/bin ...)
If you install manually (which is what your initial post led me to believe) then everything gets put in /home/weewx/

I think you have done both ?  If so,  you need to delete one or the other.

To remove the distribution version I think its (but check the documentation):
$ sudo apt-get remove weewx

or to remove the manually installed one
$ sudo rm -rf /home/weewx/

But to answer your question ... Yes you should be able to copy the file
As long as you are running weewx from the area /home/weewx area this should work

Bob

SteinWolf

belum dibaca,
16 Agu 2020, 14.07.0716/08/20
kepadaweewx-development
Hmm. I done all from this site: http://weewx.com/docs/setup.htm
And in my opinion this is the manually way. But I cannot exclude, that I had done both in the many attempts I had done until now.
OK. I now started over again.
Removed both versions, because commands like wee_config doesn't work anymore, since I deleted the /etc version.
Installed weewx again using setup.py. Successfull? Unfortunately, not. It seems to work but no command works. Even your driver is impossible to install. It says "no such command" if I try to use wee_extension or wee_config.
Seems like I bricked the whole thing now. *facepalm* *lol* Poor me. Now I have to install the whole raspberry (again).
Or do you think there is a better way???
Man - hey thanks for your efforts to help such a noob like me. I'm not sure if I can start over again today and tomorrow I have to go to work and maybe dont come back until friday - so I'm maybe not able to answer again - until weekend.

Bob Atchley

belum dibaca,
16 Agu 2020, 15.54.4116/08/20
kepadaweewx-development
Actually if you have followed the instructions you should nearly be there ...

Linux needs to know where things are in order to run them.  There are 2 ways this can be achieved:
1) specify the full path with the command you are using
2) add the folder containing the commands to the $PATH environment variable.

So for you, the weewx command files are all in /home/weewx/bin/
Easiest way forward is to simply add this path to the commands in the instructions.  e.g. installing the driver would be:
$ /home/weewx/bin/wee_extension --install weewx-ws6in1.zip

Hope this makes sense.  If you had used the debian installation the weewx commands would be in /usr/bin/ which is already in the $PATH environment variable

Bob

SteinWolf

belum dibaca,
16 Agu 2020, 17.35.0516/08/20
kepadaweewx-development
Done!
So I guess "sudo /home/weewx/bin/weewxd" will start weewx? Done this.
Then, with another lines before, the last line shows up:
File "/home/weewx/bin/user/ws6in1.py", line 836, in find_my_device
raise ValueError('Device not found')
ValueError: Device not found
But hey - better then anything else before.
So hopefully I come back tomorrow to work on it again.
Thanks so far.
BR,
Steinwolf

SteinWolf

belum dibaca,
16 Agu 2020, 17.57.5816/08/20
kepadaweewx-development
Hey, and I also have installed the apache2 now - I guess the right way. The http://.../index.html shows me a "403 forbidden" but the weewx/public_html isn't build yet, so I think this is ok for the moment.
And way better then anything else before.
Next step will be to let weewx see the device.
Thanks again.
BR,
Steinwolf

Bob Atchley

belum dibaca,
17 Agu 2020, 01.10.5617/08/20
kepadaweewx-development
ValueError: Device not found

This means that the ws6in1 driver was unable to establish a connection to the weather station. 
Check that the usb cable is connected properly, possibly replace it with another cable

Nearly there ...

Bob
Pesan telah dihapus

SteinWolf

belum dibaca,
6 Des 2020, 18.40.5006/12/20
kepadaweewx-development
Hey Bob.
Sorry for my late repost. Its due to some circumstance, that I wasn't able to write earlier.
However, what should I say... This whole thing is, and as far as I know now always was, doomed to failure.
The name of the station has a "P" at the end, but not a "PC" - and therefore there is no usable usb port on it. I have the Wifi version. So I guess there is now way to get the data from the station (except maybe the weewx interceptor sniffer - but I couldnt find anything about, nor anyone on google who gets this to work).
So I''m stuck now with this station but I still hope, that in the future someone manages to get this connection up and running.
My apologies that I wasted your time.
BR,
Steinwolf

Bob Atchley

belum dibaca,
7 Des 2020, 01.32.3907/12/20
kepadaweewx-development
Hi SteinWolf,

I have not used either so I won't be able to help you, but I believe you have 2 choices to get your WiFi version working with weewx:

1) The interceptor
2) SDR

The first is better as you will also get pressure and indoor temperature and humidity

However the SDR method should also work:

If you post a help request in the main weewx user forum you should get help

Regards

Bob

SteinWolf

belum dibaca,
10 Jan 2021, 16.26.1510/01/21
kepadaweewx-development
Hi,
Yes I have tried the Interceptor before, but I didn't get any data. I guess that somehow this should work, as I now found a side, were users have included the station in FHEM (which is a home automatisation bridge- software or something) without any problems. Not with the interceptor, but with a similar methode. So the "sniffing" should work.
In my last attempt I was not able to sniff on the right IP address and also I have not the port to sniff at, as I don't know which port the station is using. This FHEM side mentioned port 80 but some users experienced port 8086 - so this is still unclear (I will need a port sniffer to check that, I guess, but I haven't found one right now).
Also I have now a new router (fritzbox) - finally. So I will try the whole thing again, as it is now far easier to access the home network. I suddenly realized that the old one was probably causing a lot of problems I had with my network. So maybe know it would work.
In the FHEM forum this guys entered the DNS from the raspberry as URL in the Bresser web-config (e.g.: rasberry.fritz.box) - which they got from the FHEM software - I guess. Which is unclear to me too, but then the station starts to send the data and the rest was easy. So maybe this would also be an idea (not only sniff, also send the data to the raspberry beforehand).

I will try all this and if it doesn't work then I will come back to the group, you mentioned above, to create a help request.

THANKS again!!!
BR,
Steinwolf
Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru