Linux-Beginner - How to change weewx.conf for station registry

303 views
Skip to first unread message

Martin

unread,
Mar 21, 2015, 8:08:48 AM3/21/15
to weewx...@googlegroups.com
Hi,
I am a Newbie with Linux and have no experiences. Maybe somebody can help me to reach my goal to have my weather-datas in the internet.

I already installed succesfully the weewx-software at my Raspberry pi. The weather station is Vantage Pro.

The link file:///home/weewx/public_html/index.html  is working and I have all weather-datas at the screen. This screen I like to have for the internet.

The weewx-userguide says I have to do 2 things:
1. Enable the StationRegistry in weewx.conf by setting the option register_this_station to True
2. Provide a station_url, either in section [Station], or in the [[StationRegistry]] section.

How can I open the weewx.conf for changing the option into "True"? (the file "weewx.conf" I have found in the path but I can not start it for changing...)
I have no personal homepage. How can I get a URL for this weather-station?

It would be grate to receive some assistance. Thank you in advance.

Martin

mwall

unread,
Mar 21, 2015, 9:27:23 AM3/21/15
to weewx...@googlegroups.com
hi martin,

welcome to the world of linux.  as they say, unix is user-friendly, but rather picky about who its friends are.

it sounds like you do not have permission to modify weewx.conf.  this will do it:

sudo emacs /etc/weewx/weewx.conf

you can replace 'emacs' with whatever editor you prefer.

after you make the changes you must restart weewx:

sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start

the 'sudo' command makes the command after it be executed as the user 'root'

see 'integrating with a web server' in the weewx guide for instructions about how to set up a local web server.

m

Martin

unread,
Mar 21, 2015, 10:02:05 AM3/21/15
to weewx...@googlegroups.com
Hi,
thank you for the quick answer!
Unfortunately it does not work with: sudo emacs /etc/weewx/weewc.conf. The reply is: sudo: emacs: command not found

The weewx.config file is in following path: /home/pi/Downloads/weewx-3.1.0/

When I double-click to the file weewx.config it opens the files and I can read a lot of text. Is this the mode to change the registry into true?

I can read:
# To register this weather station, set this to True
register_this_station = False

Should I change here the word "False" into "True"? Is this they way in Linux to change settings or should a "programm" start, where I can choose the settings?

Sorry for my unprofessional questions...

Martin
Message has been deleted

Chris Thompstone

unread,
Mar 21, 2015, 10:13:40 AM3/21/15
to weewx...@googlegroups.com
the downloads folder is likely where you just expanded the install files.

try:
sudo nano /etc/weewx/weewx.conf

if that doesnt work then either weewx.conf is somewhere else or nano is not installed.

But more to the point:
are you trying to create a local webserver for your weather station to use from your home network or an internet connected website?

because changing this from false to true wont give you a weather station website that's locally available or internet available.

It only registers your weather station on the weewx, just adding yours to the list...

Martin

unread,
Mar 21, 2015, 10:56:10 AM3/21/15
to weewx...@googlegroups.com

Hi,
I tried: sudo nano/etc/weewx/weewx.conf
and it opened the weewx.conf the same like when I am doing double-click to this file: I can read a lot of things but there are no options to change...

My intention was to have the Vantage Pro-informations available from the internet and not only from my home network.

Should I give up now?

Martin

Chris Thompstone

unread,
Mar 21, 2015, 11:26:05 AM3/21/15
to weewx...@googlegroups.com
you'll need a webserver to publish to.

Or possibly run a webserver on your broadband connection, which is probably not recommended unless you know what your doing.

Do you have any free webspace given to you from your internet service provider (ISP)?

vince

unread,
Mar 21, 2015, 12:37:42 PM3/21/15
to weewx...@googlegroups.com
On Saturday, March 21, 2015 at 8:26:05 AM UTC-7, Chris Thompstone wrote:
you'll need a webserver to publish to.


Or he could publish to Weather Underground or PWS or CWOP etc. and use their webserver to view things, and have your pi quietly generating and uploading data to it.   All he needs to do get an account from them (procedure varies, see their websites for instructions), the username and password into weewx.conf and restart weewx.

Of course, since the user is not able yet to edit False to True in weeex, I'd call that unlikely to succeed quite yet.  

Martin - you need to have 'some' basic unix/linux skills here.  This stuff is pretty easy to set up, but you need to at least be able to edit a simple text file.  I'd suggest you take a look at the 'free' online Introduction to Linux course at edx.org and go through that as time permits.  The URL there is https://www.edx.org/course/introduction-linux-linuxfoundationx-lfs101x-2

The course is totally free, they'll try to get you to pay for a certificate of completion, but you don't need to do that.  Register for the class, you can start anytime.  It should help you spin up on the basics. 

Martin

unread,
Mar 21, 2015, 1:49:39 PM3/21/15
to weewx...@googlegroups.com
Hi Chris +Vince,

thank you very much for your replies and advice!

Yes my problem is that I have no experience with Linux and I am not able to edit False into True in the weewx.config.

At the moment I would be happy to have the Vantage-Informations at my local network. One thing I do not understand:

when I am working with my Raspberry Pi browser I have a wonderfull webpage with all Davis-VantagePro informations. (file:///home/weewx/public_html/index.html ) Also the http://localhost/weewx is working with the Raspi browser.
But when I switch to my laptop which is in the local network the http://localhost/weewx is not working. (file not found)

Is the reason for that, that I am not able to change False into True?

Maybe you can give me again short information.

I think I have to learn the basics to be succesful with my project.
THank you again,
Martin

Chris Thompstone

unread,
Mar 21, 2015, 2:05:53 PM3/21/15
to weewx...@googlegroups.com
if the webserver software on the pi is accepting external connections, then

get the ip address of the pi. type ifconfig at the terminal.

then try the ip address in the laptop's browser.  for example:

http://192.168.1.10/weewx

substitute the address as required.

Chris

Martin

unread,
Mar 21, 2015, 2:12:29 PM3/21/15
to weewx...@googlegroups.com
Hi Chtis and thanks again,

when I type IP adress at my laptop (http://192.168.1.2.) I receive following message:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

Do you have an idea, why the content is missing?

Martin


Dave Webb KB1PVH

unread,
Mar 21, 2015, 2:22:58 PM3/21/15
to weewx...@googlegroups.com

Now try 192.168.1.2/weewx

Dave-KB1PVH

Sent from my Samsung S4

Martin

unread,
Mar 21, 2015, 3:17:39 PM3/21/15
to weewx...@googlegroups.com
Hi Dave, Chris and Steve,

now it works!!! 

You saved my day.

thank you for making a newbie happy.

Regards from Austria

Martin

Martin

unread,
Mar 22, 2015, 4:46:41 AM3/22/15
to weewx...@googlegroups.com
Hi again,

today in the morning (06:45) it workded very well with actual datas.

Than I decided to change the time at the rasperry pi and at the davis station. (it was 1 hour differnce).

After that I do not receive actuall information. When I open file:///home/weewx/public_html/index.html  I always get the datas from 06:45. The same happens with my local IP-adress/weewx.

How can I receive again the actual datas?

Thank you in advance!

Martin

Chris Thompstone

unread,
Mar 22, 2015, 5:45:29 AM3/22/15
to weewx...@googlegroups.com
did you try restarting the weewx service?

service weewx stop
service weewx start

then wait 5 mins


Martin

unread,
Mar 22, 2015, 6:19:35 AM3/22/15
to weewx...@googlegroups.com
Hi Chris,

unfortunately it does not work with "service weewx stop/start".

I also stopped and started the weewx with

sudo /etc/init.d/weewx stop
sudo /etc/init.d/weewx start

After testing in the morning I changed the following things at my system:

timezone with:
sudo dpkg-reconfigure tzdata
here I chanded into timezone of Berlin

I also were able now to change the weewx.conf . I took the nano-editor and changed weewx.conf:

sudo nano/etc/weewx/weewx.conf

Register this station to True (from False)

After these amendings it does not show the actual datas. (always the old datas from 06:45)

Any idea?

Thank you!

Chris Thompstone

unread,
Mar 22, 2015, 6:56:43 AM3/22/15
to weewx...@googlegroups.com
did you try rebooting it?
Shouldn't really have to do that.

How did you install weewx?
Is the weewx service setup?

or are you running weewx manually?

this:

Register this station to True (from False)

Only puts you website on the users map so that other people can reach it to have a look.
If your weather website is not publicly available there is probably not much point in doing this.

Chris

Chris Thompstone

unread,
Mar 22, 2015, 6:59:01 AM3/22/15
to weewx...@googlegroups.com
what does this give you?

service weewx status

Chris

Martin

unread,
Mar 22, 2015, 7:24:25 AM3/22/15
to weewx...@googlegroups.com
Hi,

it says: status of weewx weather system: running

Should I uninstall and install it again like yesterday?

Uninstall with following commands:

sudo dpkg -r weewx

To uninstall weewx, removing configuration files but retaining data:

sudo dpkg --purge weewx

To remove data:

sudo rm -r /var/lib/weewx sudo rm -r /var/www/weewx

Chris Thompstone

unread,
Mar 22, 2015, 7:38:06 AM3/22/15
to weewx...@googlegroups.com
I would not remove it. Not yet anyway.
Do this

tail -f /var/log/syslog

And wait.

Ctrl c to stop the output

Martin

unread,
Mar 22, 2015, 7:53:51 AM3/22/15
to weewx...@googlegroups.com
ok - 

with this command it shows this:

r report StandardReport in 1.80 seconds
Mar 22 12:20:21 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.23 seconds
Mar 22 12:25:20 raspberrypi weewx[4217]: cheetahgenerator: Generated 14 files for report StandardReport in 1.86 seconds
Mar 22 12:25:21 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.24 seconds
Mar 22 12:30:20 raspberrypi weewx[4217]: cheetahgenerator: Generated 14 files for report StandardReport in 1.83 seconds
Mar 22 12:30:21 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.29 seconds
Mar 22 12:35:20 raspberrypi weewx[4217]: cheetahgenerator: Generated 14 files for report StandardReport in 1.78 seconds
Mar 22 12:35:21 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.24 seconds
Mar 22 12:40:18 raspberrypi weewx[4217]: cheetahgenerator: Generated 14 files for report StandardReport in 1.94 seconds
Mar 22 12:40:19 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.23 seconds
Mar 22 12:45:20 raspberrypi weewx[4217]: cheetahgenerator: Generated 14 files for report StandardReport in 2.49 seconds
Mar 22 12:45:21 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.27 seconds
^[[1;2AMar 22 12:50:20 raspberrypi weewx[4217]: cheetahgenerator: Generated 14 files for report StandardReport in 1.86 seconds
Mar 22 12:50:21 raspberrypi weewx[4217]: genimages: Generated 12 images for StandardReport in 1.26 seconds
^C
pi@raspberrypi ~ $ 

any idea ?

Chris Thompstone

unread,
Mar 22, 2015, 8:04:06 AM3/22/15
to weewx...@googlegroups.com
Not sure what's happening here.
The database looks like it's not getting updated.

Have you tried a reboot ?

Have you changed anything else in weewx.conf ?

One of the others might have to help you out from here...

Chris

Martin

unread,
Mar 22, 2015, 9:39:43 AM3/22/15
to weewx...@googlegroups.com
thank you again for your support.

I think I will uninstall this programm and than make a new installation as I have done it yesterday.

It always shows me the same screen without updating the files with same time of 06:45:00.....:

WetterSchanze

Current Weather Conditions

03/22/15 06:45:00

Current Conditions
Outside Temperature2.7°C
Wind Chill2.7°C
Heat Index2.7°C
Dewpoint1.6°C
Humidity92%
Barometer1017.3 mbar
Barometer Trend (3 hours)-0.2 mbar
Wind0.4 m/s from 0° (N)
Rain Rate0.0 mm/hr
Inside Temperature19.4°C

 

Since Midnightummary:  

Martin

unread,
Mar 22, 2015, 11:01:53 AM3/22/15
to weewx...@googlegroups.com
Hi again,

I uninstalled now weewx and tried to open website with the weather-datas: file not found

Then I installed again the weewx-programm like yesterday. After 5 minutes i opened in the browser the same adress as before: file:///var/www/weewx/index.html  and had again the "old" website with the datas from 06:40 in the morning.

Maybe interesting this website is doing each 5 minutes a refresh but showing always the old files from 06:40....

should I give up now?

Andrew Milner

unread,
Mar 22, 2015, 12:02:09 PM3/22/15
to weewx...@googlegroups.com
You could try stopping weewx, edit weewx.conf to set debug=1, restartt weewx and attach the logfile from when ypou start weewx

This would provide more information as to what is happening with your system.

Martin

unread,
Mar 22, 2015, 1:29:07 PM3/22/15
to weewx...@googlegroups.com
Hi,
I made this:
i@raspberrypi ~ $ sudo /etc/init.d/weewx stop
[ ok ] Stopping weewx weather system: weewx..
pi@raspberrypi ~ $ sudo /etc/init.d/weewx start
[ ok ] Starting weewx weather system: weewx.
pi@raspberrypi ~ $ sudo tail -f /var/log/syslog
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: StdConvert target unit is 0x1
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Archive will use data binding wx_binding
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Record generation will be attempted in 'hardware'
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Using archive interval of 300 seconds
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Using binding 'wx_binding' to database '/var/lib/weewx/weewx.sdb'
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Starting backfill of daily summaries
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Daily summaries up to date.
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Starting up weewx version 3.1.0
Mar 22 18:20:55 raspberrypi weewx[8531]: engine: Clock error is 0.00 seconds (positive is fast)
Mar 22 18:20:57 raspberrypi weewx[8531]: engine: Starting main packet loop.

^Cpi@raspberrypi ~ $ B

Does this maybe help?

The internet-webpage says that weewx is running since 3 hours, but always shows datas from 06:45. Is maybe a memory full - does the Davis-Data-Logger has memory?

thank you for your assistance.

Chris Thompstone

unread,
Mar 22, 2015, 2:02:27 PM3/22/15
to weewx...@googlegroups.com
attached the weewx.conf file for us to look at.

It might be that the website is being generated to /var/www

Need to let the syslog command run for about 10 mins

Chris

Martin

unread,
Mar 22, 2015, 4:13:51 PM3/22/15
to weewx...@googlegroups.com
Hi again,
now I formated the sd-card, installed the noobs-system with raspian and also reinstalled weewx.

Now it works perfect like it should and I can check the weather-datas from my local web.

Thank you very much for your support and for spending your time with my problems....

Martin
Reply all
Reply to author
Forward
0 new messages