User avatar
pingu512
Posts: 64
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
Contact: Website

Re: Weather Station now running

Mon Jan 06, 2014 7:29 pm

Hi Naill
I accept that I could have explained the location of files better. This all started with just the setup of the connection, but has expanded as I get more questions. I had been reluctant to duplicate the work done by Jim Easterbrook unless it was raspberry specific, but further questions have resulted in what I have so far.
The command
python -m pywws.LogData -vvv ~/weather/data
is first used to create the weather.ini file, so it appears to do nothing, but it does create a blank one. Some users may want then to directly edit it with their information including the location of output files, or you can down load my example.

I would need more information on the output produced from the process command.
Try
python -m pywws.Process ~/weather/data > outputfile.txt
This will direct the screen output to a file called outputfile.txt which you can then view or send your PC.

Niall101
Posts: 16
Joined: Fri May 10, 2013 2:24 pm
Location: Clinterty Observatories, Aberdeen

Re: Weather Station now running

Tue Jan 07, 2014 9:32 am

Hi again,

Thanks for the reply. In fact, last night I spent another few hours getting more acquanted with the Pi (and, obviously, Linux). I installed FileZilla on a PC and tried, unsuccessfully, to make an FTP connection to the Pi. Google then helped me install vsftpd onto the Pi (although the tutorial I was following was not without its own problems!).

I have now at least been able to bring a whole bunch of files into the PC where I was happier to look at them, without fear of 'breaking' the Pi ;) In fact, I was even able to see in, the bash log, where I had made the typos that gave me all the problems when I was trying to use the wget commands.

I did try your suggestion of capturing the console output (of the pywws.LogData and pywws.Process commands), but all I seemed to get was a blank file (so blank that it did not even appear on the FileZilla 'remote' directory listing view, despite being shown by an ls command - even the more command, applied to the output file, showed nothing).

However, my brain was now overheating and was beginning to dribble out of my ears by this time - so I will start again tonight (I even found the code listing for the pywws.Process command, and I will try and see how the error messages correspond to the actual Python code).

I'll be in touch again.

Cheers,
Niall
Scatch-built BBC B in 82: blank PCB+scavenged plastics& PSU. Sinclair Calc & ZX81 kits in 74&82. PONG (AY-3-8500) in 77. 1st PC in 89: 386/25+387&10MbHDD. Have previewed pictures with my PiCam. I'll maybe save one next week (new to Linux)!

henkg
Posts: 10
Joined: Sat Nov 24, 2012 7:42 pm
Location: Netherlands

Re: Weather Station now running

Wed Jan 08, 2014 2:06 pm

Searched a lot. Did not find it (yes, I am a linux novice)

Before making a backup of pywws data, I want to stop pywws temporarily.
How do I stop (and start) pywws on a running pi?
My RPI+PYWWS weather site: http://henkg.dyndns.org:82/

Niall101
Posts: 16
Joined: Fri May 10, 2013 2:24 pm
Location: Clinterty Observatories, Aberdeen

Re: Weather Station now running

Thu Jan 09, 2014 10:48 am

Hi Henk,

Remembering that I am also a total Linux newbie - assuming that you do not have any scheduled tasks being triggered by CRON, I don't see that there would be anything to actually 'stop'.

However, if CRON is controlling processes in the background, then - presumably - there must be a method of 'suspending' these whilst you transfer the data that you are after.

Continuing my own trials - I ended up having to revert to an earlier SD image (one that I had, fortunately, saved just after my first run of the LogData process). My attempts (using a tutorial from instructables.com) to install an FTP server ended up 'wrecking' my running image - to the extent that, when logging on as pi, I was being left at a totally different level in the directory structure. Without adequate Linux experience, and despite having taken copious notes, I had no idea how to get back to where I had started from - other than a complete SD card re-image :x

I still can't get the following to work:

Code: Select all

python -m pywws.LogData ~/weather/data > logged_output.txt
I always seem to end up with a completely 'empty' output file, despite seeing all the console output appearing on-screen (running 'headless' with Putty/SSH).

Also, LogData takes a LONG time to complete - often appearing to crash irrevocably, where the only solution is to power-cycle the Pi itself. If LogData does work, it is liberally scattered with 41-second and 5.8 second pauses. Why does this happen?

Cheers,
Niall
Scatch-built BBC B in 82: blank PCB+scavenged plastics& PSU. Sinclair Calc & ZX81 kits in 74&82. PONG (AY-3-8500) in 77. 1st PC in 89: 386/25+387&10MbHDD. Have previewed pictures with my PiCam. I'll maybe save one next week (new to Linux)!

User avatar
pingu512
Posts: 64
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
Contact: Website

Re: Weather Station now running

Fri Apr 11, 2014 7:33 pm

Anyone connected a Ambient WS-2090 weather station to a pi running pywws. What's the ws = setting in weather.ini?

User avatar
pingu512
Posts: 64
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
Contact: Website

Re: Weather Station now running

Fri Sep 05, 2014 7:35 pm

New and simplified tutorial at http://www.weather.dragontail.co.uk that now uses the python USB library. I have also updated the SD card image with the latest setup and 'wheezy".
Enjoy

Robert G
Posts: 2
Joined: Sat Feb 14, 2015 9:27 pm

Re: Weather Station now running

Sat Feb 14, 2015 9:34 pm

Hi there,

looking for a bit of advise. Im trying to set up my pi with a maplin wireless weather station ref N96FY. Ive unstalled wheezy and pywws and installed the usb module but im still getting the following error

[email protected] ~ $ sudo python -m pywws.TestWeatherStation
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/pywws/TestWeatherStation.py", line 59, in <module>
from . import WeatherStation
File "/usr/local/lib/python2.7/dist-packages/pywws/WeatherStation.py", line 96, in <module>
raise ImportError('No USB library found')
ImportError: No USB library found

I am a total novise when it comes to programming so any help would be gratefully received.

User avatar
pingu512
Posts: 64
Joined: Sun Apr 01, 2012 2:39 pm
Location: Chester
Contact: Website

Re: Weather Station now running

Sun Feb 15, 2015 4:50 pm

Looks like python usb is not loaded
see
http://www.weather.dragontail.co.uk/ind ... tion_setup

Robert G
Posts: 2
Joined: Sat Feb 14, 2015 9:27 pm

Re: Weather Station now running

Sun Feb 15, 2015 6:27 pm

Thanks a million - now for the next steps.

farrpau
Posts: 1
Joined: Thu Mar 12, 2015 7:18 pm

Re: Weather Station now running

Thu Mar 12, 2015 10:25 pm

Robert G wrote:Hi there,

looking for a bit of advise. Im trying to set up my pi with a maplin wireless weather station ref N96FY. Ive unstalled wheezy and pywws and installed the usb module but im still getting the following error

[email protected] ~ $ sudo python -m pywws.TestWeatherStation
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/dist-packages/pywws/TestWeatherStation.py", line 59, in <module>
from . import WeatherStation
File "/usr/local/lib/python2.7/dist-packages/pywws/WeatherStation.py", line 96, in <module>
raise ImportError('No USB library found')
ImportError: No USB library found

I am a total novise when it comes to programming so any help would be gratefully received.
was having exact same problem found my mistake in this instruction, between the add and change is a straight line (shift-\) not a backslash (\) as i entered it.

sudo nano /etc/udev/rules.d/39-weather-station.rules

Add the following lines changing the idVendor and idProduct if required

ACTION!="add|change", GOTO="station_end"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", GROUP="weather"
LABEL="station_end"

Return to “Automation, sensing and robotics”