getting started

283 views
Skip to first unread message

Jim W.

unread,
Jul 2, 2016, 2:40:32 PM7/2/16
to weewx-user
I am a retired engineer. My only programing experience is with visual basic 15 years ago.
I installed Weewx on my RP3 using the GUI point and click method. I was never prompted for Lat. Lon. Location or station type.  I figured out  how to run  sudo dpkg-reconfigure weewx so I think its communicating with the weather station console.
Can someone explain:
How to view the data to confirm this.
Also how to modify the config file so I can make the changes to send the data to wunderground? I have tried to find the file using a text editor but it doesn't show up.
Thanks for any help...
Ps... I have zero linux experience. 

Andrew Milner

unread,
Jul 2, 2016, 2:56:38 PM7/2/16
to weewx-user
Presumably you installed the .deb version by following these instructions:

Correct?

In which case the .conf file should be as described in 'layout' - (the last section of the instructions) - and be located at /etc/weewx/weewx.conf

James Wolff

unread,
Jul 2, 2016, 3:21:32 PM7/2/16
to weewx...@googlegroups.com
Yes... I used the .deb version.
My question is very basic... HOW do I modify the config file. 
Thanks for your patience!.

--
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/-w-h-Q6r640/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve2Q

unread,
Jul 2, 2016, 4:04:31 PM7/2/16
to weewx-user
Hi Jim..I now know a little bit more than the zero knowledge I started with. I am using a Raspberry Pi, but any platform will give you the same abilities. If you have access to a GUI, you go to the file location pointed out by Andrew and modify it (as per the instructions) with a graphic editor. If you don't have a GUI, just go to the /etc/weewx folder and type   sudo nano weewx.conf     this will bring up a pure text editor, and you can make the changes in weewx.conf to pretty much do whatever you wish. I did not use .deb installation; I used setup.py but even though the files have somewhat different locations you should be able to do what you want.

I have not tried to learn programming in linux and python, but over a year have figured out to do most of the modifications (mostly in appearance) that I want. It is definitely a good idea to find a site and learn basic linux commands like sudo, dir, rm, cp, mv, etc.

Steve
 


Jim W.

unread,
Jul 2, 2016, 4:54:50 PM7/2/16
to weewx-user
Thanks for the reply... using the GUI I don't see weewx in the file tree?
ok... I modified the weewx.conf file using the nano editor however I don't think it's running?
here is the sudo tail -f /var/log/syslog dump:

login as: pi
p...@192.168.1.12's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jul  2 16:42:18 2016 from mojo-10.home
pi@raspberrypi:~ $ sudo tail -f /var/log/syslog
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****      self.latitude_f      = fl                                                                                                             oat(stn_dict['latitude'])
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****  ValueError: could not convert                                                                                                              string to float: ok40.6976
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****  Exiting.
Jul  2 16:44:13 raspberrypi systemd[1]: Started LSB: weewx weather system.
Jul  2 16:44:13 raspberrypi weewx[1153]: Starting weewx weather system: weewx.
Jul  2 16:50:07 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:50:37 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:52:34 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:53:04 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:53:26 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:53:56 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:53:26 raspberrypi systemd[1]: Starting Session c4 of user pi.
Jul  2 16:53:26 raspberrypi systemd[1]: Started Session c4 of user pi.

Jim W.

unread,
Jul 2, 2016, 5:11:04 PM7/2/16
to weewx-user


On Saturday, July 2, 2016 at 4:54:50 PM UTC-4, Jim W. wrote:
Thanks for the reply... using the GUI I don't see weewx in the file tree?
ok... I modified the weewx.conf file using the nano editor however I don't think it's running?
here is the sudo tail -f /var/log/syslog dump:

login as: pi
p...@192.168.1.12's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jul  2 16:42:18 2016 from mojo-10.home
pi@raspberrypi:~ $ sudo tail -f /var/log/syslog
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****      self.latitude_f      = fl                                                                                                             oat(stn_dict['latitude'])
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****  ValueError: could not convert                                                                                                              string to float: ok40.6976
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****  Exiting.
Jul  2 16:44:13 raspberrypi systemd[1]: Started LSB: weewx weather system.
Jul  2 16:44:13 raspberrypi weewx[1153]: Starting weewx weather system: weewx.
Jul  2 16:50:07 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:50:37 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:52:34 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:53:04 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:53:26 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:53:56 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:53:26 raspberrypi systemd[1]: Starting Session c4 of user pi.
Jul  2 16:53:26 raspberrypi systemd[1]: Started Session c4 of user pi.

here is a debug dump:

login as: pi
p...@192.168.1.12's password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jul  2 16:42:18 2016 from mojo-10.home
pi@raspberrypi:~ $ sudo tail -f /var/log/syslog
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****      self.latitude_f      = fl                                                                                                             oat(stn_dict['latitude'])
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****  ValueError: could not convert                                                                                                              string to float: ok40.6976
Jul  2 16:44:13 raspberrypi weewx[1168]:     ****  Exiting.
Jul  2 16:44:13 raspberrypi systemd[1]: Started LSB: weewx weather system.
Jul  2 16:44:13 raspberrypi weewx[1153]: Starting weewx weather system: weewx.
Jul  2 16:50:07 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:50:37 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:52:34 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:53:04 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:53:26 raspberrypi rsyslogd-2007: action 'action 17' suspended, next re                                                                                                             try is Sat Jul  2 16:53:56 2016 [try http://www.rsyslog.com/e/2007 ]
Jul  2 16:53:26 raspberrypi systemd[1]: Starting Session c4 of user pi.
Jul  2 16:53:26 raspberrypi systemd[1]: Started Session c4 of user pi.
^[[B^Cpi@raspberrypsudo nano weewx.conf
pi@raspberrypi:~ $ cd/weewx
-bash: cd/weewx: No such file or directory
pi@raspberrypi:~ $ cd/ etc/weewx
-bash: cd/: No such file or directory
pi@raspberrypi:~ $
pi@raspberrypi:~ $ cd
pi@raspberrypi:~ $ /etc/weewx/weewx.config
-bash: /etc/weewx/weewx.config: No such file or directory
pi@raspberrypi:~ $ cd /etc/weewx
pi@raspberrypi:/etc/weewx $ sudo nano weewx.conf
pi@raspberrypi:/etc/weewx $ cd/
-bash: cd/: No such file or directory
pi@raspberrypi:/etc/weewx $ cd\
>
pi@raspberrypi:~ $ a
a2p                                     appletviewer                            arm-linux-gnueabihf-as                  arm-linux-gnueabihf-python3.4-config
accept                                  applygnupgdefaults                      arm-linux-gnueabihf-c++filt             arm-linux-gnueabihf-python3.4m-config
accessdb                                appres                                  arm-linux-gnueabihf-cpp                 arm-linux-gnueabihf-python3-config
aconnect                                apropos                                 arm-linux-gnueabihf-cpp-4.9             arm-linux-gnueabihf-python3m-config
acpi_available                          apt                                     arm-linux-gnueabihf-dwp                 arm-linux-gnueabihf-ranlib
addgnupghome                            apt-cache                               arm-linux-gnueabihf-elfedit             arm-linux-gnueabihf-readelf
addgroup                                apt-cdrom                               arm-linux-gnueabihf-g++                 arm-linux-gnueabihf-run
addpart                                 apt-config                              arm-linux-gnueabihf-g++-4.9             arm-linux-gnueabihf-size
addr2line                               apt-extracttemplates                    arm-linux-gnueabihf-gcc                 arm-linux-gnueabihf-strings
add-shell                               apt-ftparchive                          arm-linux-gnueabihf-gcc-4.9             arm-linux-gnueabihf-strip
adduser                                 apt-get                                 arm-linux-gnueabihf-gcc-ar              arm-unknown-linux-gnueabihf-pkg-config
agetty                                  aptitude                                arm-linux-gnueabihf-gcc-ar-4.9          arp
alacarte                                aptitude-create-state-bundle            arm-linux-gnueabihf-gcc-nm              arpd
alias                                   aptitude-curses                         arm-linux-gnueabihf-gcc-nm-4.9          as
alsactl                                 aptitude-run-state-bundle               arm-linux-gnueabihf-gcc-ranlib          aseqdump
alsa_in                                 apt-key                                 arm-linux-gnueabihf-gcc-ranlib-4.9      aseqnet
alsaloop                                apt-listchanges                         arm-linux-gnueabihf-gcov                aspell
alsamixer                               apt-mark                                arm-linux-gnueabihf-gcov-4.9            aspell-autobuildhash
alsa_out                                apt-sortpkgs                            arm-linux-gnueabihf-gprof               aspell-import
alsaucm                                 ar                                      arm-linux-gnueabihf-ld                  assistant
amidi                                   arch                                    arm-linux-gnueabihf-ld.bfd              avahi-daemon
amixer                                  arecord                                 arm-linux-gnueabihf-ld.gold             awk
aplay                                   arecordmidi                             arm-linux-gnueabihf-nm
aplaymidi                               arm-linux-gnueabihf-addr2line           arm-linux-gnueabihf-objcopy
apm_available                           arm-linux-gnueabihf-ar                  arm-linux-gnueabihf-objdump
pi@raspberrypi:~ $ a
a2p                                     appletviewer                            arm-linux-gnueabihf-as                  arm-linux-gnueabihf-python3.4-config
accept                                  applygnupgdefaults                      arm-linux-gnueabihf-c++filt             arm-linux-gnueabihf-python3.4m-config
accessdb                                appres                                  arm-linux-gnueabihf-cpp                 arm-linux-gnueabihf-python3-config
aconnect                                apropos                                 arm-linux-gnueabihf-cpp-4.9             arm-linux-gnueabihf-python3m-config
acpi_available                          apt                                     arm-linux-gnueabihf-dwp                 arm-linux-gnueabihf-ranlib
addgnupghome                            apt-cache                               arm-linux-gnueabihf-elfedit             arm-linux-gnueabihf-readelf
addgroup                                apt-cdrom                               arm-linux-gnueabihf-g++                 arm-linux-gnueabihf-run
addpart                                 apt-config                              arm-linux-gnueabihf-g++-4.9             arm-linux-gnueabihf-size
addr2line                               apt-extracttemplates                    arm-linux-gnueabihf-gcc                 arm-linux-gnueabihf-strings
add-shell                               apt-ftparchive                          arm-linux-gnueabihf-gcc-4.9             arm-linux-gnueabihf-strip
adduser                                 apt-get                                 arm-linux-gnueabihf-gcc-ar              arm-unknown-linux-gnueabihf-pkg-config
agetty                                  aptitude                                arm-linux-gnueabihf-gcc-ar-4.9          arp
alacarte                                aptitude-create-state-bundle            arm-linux-gnueabihf-gcc-nm              arpd
alias                                   aptitude-curses                         arm-linux-gnueabihf-gcc-nm-4.9          as
alsactl                                 aptitude-run-state-bundle               arm-linux-gnueabihf-gcc-ranlib          aseqdump
alsa_in                                 apt-key                                 arm-linux-gnueabihf-gcc-ranlib-4.9      aseqnet
alsaloop                                apt-listchanges                         arm-linux-gnueabihf-gcov                aspell
alsamixer                               apt-mark                                arm-linux-gnueabihf-gcov-4.9            aspell-autobuildhash
alsa_out                                apt-sortpkgs                            arm-linux-gnueabihf-gprof               aspell-import
alsaucm                                 ar                                      arm-linux-gnueabihf-ld                  assistant
amidi                                   arch                                    arm-linux-gnueabihf-ld.bfd              avahi-daemon
amixer                                  arecord                                 arm-linux-gnueabihf-ld.gold             awk
aplay                                   arecordmidi                             arm-linux-gnueabihf-nm
aplaymidi                               arm-linux-gnueabihf-addr2line           arm-linux-gnueabihf-objcopy
apm_available                           arm-linux-gnueabihf-ar                  arm-linux-gnueabihf-objdump
pi@raspberrypi:~ $ a
a2p                                     appletviewer                            arm-linux-gnueabihf-as                  arm-linux-gnueabihf-python3.4-config
accept                                  applygnupgdefaults                      arm-linux-gnueabihf-c++filt             arm-linux-gnueabihf-python3.4m-config
accessdb                                appres                                  arm-linux-gnueabihf-cpp                 arm-linux-gnueabihf-python3-config
aconnect                                apropos                                 arm-linux-gnueabihf-cpp-4.9             arm-linux-gnueabihf-python3m-config
acpi_available                          apt                                     arm-linux-gnueabihf-dwp                 arm-linux-gnueabihf-ranlib
addgnupghome                            apt-cache                               arm-linux-gnueabihf-elfedit             arm-linux-gnueabihf-readelf
addgroup                                apt-cdrom                               arm-linux-gnueabihf-g++                 arm-linux-gnueabihf-run
addpart                                 apt-config                              arm-linux-gnueabihf-g++-4.9             arm-linux-gnueabihf-size
addr2line                               apt-extracttemplates                    arm-linux-gnueabihf-gcc                 arm-linux-gnueabihf-strings
add-shell                               apt-ftparchive                          arm-linux-gnueabihf-gcc-4.9             arm-linux-gnueabihf-strip
adduser                                 apt-get                                 arm-linux-gnueabihf-gcc-ar              arm-unknown-linux-gnueabihf-pkg-config
agetty                                  aptitude                                arm-linux-gnueabihf-gcc-ar-4.9          arp
alacarte                                aptitude-create-state-bundle            arm-linux-gnueabihf-gcc-nm              arpd
alias                                   aptitude-curses                         arm-linux-gnueabihf-gcc-nm-4.9          as
alsactl                                 aptitude-run-state-bundle               arm-linux-gnueabihf-gcc-ranlib          aseqdump
alsa_in                                 apt-key                                 arm-linux-gnueabihf-gcc-ranlib-4.9      aseqnet
alsaloop                                apt-listchanges                         arm-linux-gnueabihf-gcov                aspell
alsamixer                               apt-mark                                arm-linux-gnueabihf-gcov-4.9            aspell-autobuildhash
alsa_out                                apt-sortpkgs                            arm-linux-gnueabihf-gprof               aspell-import
alsaucm                                 ar                                      arm-linux-gnueabihf-ld                  assistant
amidi                                   arch                                    arm-linux-gnueabihf-ld.bfd              avahi-daemon
amixer                                  arecord                                 arm-linux-gnueabihf-ld.gold             awk
aplay                                   arecordmidi                             arm-linux-gnueabihf-nm
aplaymidi                               arm-linux-gnueabihf-addr2line           arm-linux-gnueabihf-objcopy
apm_available                           arm-linux-gnueabihf-ar                  arm-linux-gnueabihf-objdump
pi@raspberrypi:~ $ w
w                   watchgnupg          wee_database        wee_reports         whereis             who                 wolfram             wpa_passphrase      wsgen
wait                wc                  wee_debug           weewxd              which               whoami              word-list-compress  wpa_supplicant      wsimport
wall                wdctl               wee_device          wget                while               wipefs              wpa_action          w.procps            wunderfixer
watch               wee_config          wee_extension       whatis              whiptail            wish8.5             wpa_cli             write
pi@raspberrypi:~ $ w
w                   watchgnupg          wee_database        wee_reports         whereis             who                 wolfram             wpa_passphrase      wsgen
wait                wc                  wee_debug           weewxd              which               whoami              word-list-compress  wpa_supplicant      wsimport
wall                wdctl               wee_device          wget                while               wipefs              wpa_action          w.procps            wunderfixer
watch               wee_config          wee_extension       whatis              whiptail            wish8.5             wpa_cli             write
pi@raspberrypi:~ $ who
pi       :0           2016-07-02 16:40 (:0)
pi       tty1         2016-07-02 16:40
pi       pts/0        2016-07-02 16:53 (mojo-10.home)
pi@raspberrypi:~ $ wee_debug
Usage: wee_debug --help
       wee_debug --info
            [--output|--output DEBUG_PATH]
            [--verbosity=0|1|2]
       wee_debug --version


Generate a standard suite of system/weewx information to aid in remote
debugging. The wee_debug output consists of two parts, the first part
containing a snapshot of relevant system/weewx information and the second part
a parsed and obfuscated copy of weewx.conf. This output can be redirected to
file and posted when seeking assistance via forums or email.

Options:
  -h, --help     show this help message and exit
  --info         Generate weewx debug output.
  --output       Write wee_debug output to DEBUG_PATH. DEBUG_PATH includes
                 path and file name. Default is /var/tmp/weewx.debug.
  --verbosity=N  How much detail to display, 0-2, default=1.
  --version      Display wee_debug version number.

wee_debug will attempt to obfuscate obvious personal/private information in
weewx.conf such as user names, passwords and API keys; however, the user
should thoroughly check the generated output for personal/private information
before posting the information publicly.
pi@raspberrypi:~ $ wee_debug --help
Usage: wee_debug --help
       wee_debug --info
            [--output|--output DEBUG_PATH]
            [--verbosity=0|1|2]
       wee_debug --version


Generate a standard suite of system/weewx information to aid in remote
debugging. The wee_debug output consists of two parts, the first part
containing a snapshot of relevant system/weewx information and the second part
a parsed and obfuscated copy of weewx.conf. This output can be redirected to
file and posted when seeking assistance via forums or email.

Options:
  -h, --help     show this help message and exit
  --info         Generate weewx debug output.
  --output       Write wee_debug output to DEBUG_PATH. DEBUG_PATH includes
                 path and file name. Default is /var/tmp/weewx.debug.
  --verbosity=N  How much detail to display, 0-2, default=1.
  --version      Display wee_debug version number.

wee_debug will attempt to obfuscate obvious personal/private information in
weewx.conf such as user names, passwords and API keys; however, the user
should thoroughly check the generated output for personal/private information
before posting the information publicly.
pi@raspberrypi:~ $ wee_debug --info
Using verbosity=1, displaying most info

wee_debug output will be sent to stdout(console)

Using configuration file /etc/weewx/weewx.conf
Using database binding 'wx_binding', which is bound to database 'archive_sqlite'

System info
  CPU implementer:        0x41
  Features:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
  CPU architecture:       7
  BogoMIPS:               76.80
  Hardware:               BCM2709
  CPU revision:           4
  CPU part:               0xd03
  model name:             ARMv7 Processor rev 4 (v7l)
  Serial:                 000000007da6cb5c
  processor:              3
  CPU variant:            0x0
  Revision:               a02082

  Operating system:       debian 8.0
                          Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l
  1 minute load average:  0.00
  5 minute load average:  0.01
  15 minute load average: 0.05

General weewx info
  Weewx version 3.5.0 detected.

Station info
  Station type: FineOffsetUSB
  Driver:       weewx.drivers.fousb

Driver info
[FineOffsetUSB]
    # This section is for the Fine Offset series of weather stations.

    # The station model, e.g., WH1080, WS1090, WS2080, WH3081
    model = WS2080

    # How often to poll the station for data, in seconds
    polling_interval = 60

    # The driver to use:
    driver = weewx.drivers.fousb

Currently installed extensions
No extensions installed

Traceback (most recent call last):
  File "/usr/bin/wee_debug", line 402, in <module>
    main()
  File "/usr/bin/wee_debug", line 144, in main
    options.verbosity)
  File "/usr/bin/wee_debug", line 223, in generateDebugInfo
    manager_info_dict = getManagerInfo(config_dict, db_binding_wx)
  File "/usr/bin/wee_debug", line 342, in getManagerInfo
    with weewx.manager.open_manager_with_config(config_dict, db_binding_wx) as dbmanager_wx:
  File "/usr/share/weewx/weewx/manager.py", line 984, in open_manager_with_config
    return open_manager(manager_dict, initialize)
  File "/usr/share/weewx/weewx/manager.py", line 976, in open_manager
    manager_dict['table_name'])
  File "/usr/share/weewx/weewx/manager.py", line 99, in open
    connection = weedb.connect(database_dict)
  File "/usr/share/weewx/weedb/__init__.py", line 66, in connect
    return driver_mod.connect(**db_dict)
  File "/usr/share/weewx/weedb/sqlite.py", line 44, in connect
    return Connection(database_name=database_name, SQLITE_ROOT=SQLITE_ROOT, **argv)
  File "/usr/share/weewx/weedb/sqlite.py", line 100, in __init__
    raise weedb.OperationalError("Attempt to open a non-existent database %s" % self.file_path)
weedb.OperationalError: Attempt to open a non-existent database /var/lib/weewx/weewx.sdb
pi@raspberrypi:~ $

Liz

unread,
Jul 2, 2016, 5:24:52 PM7/2/16
to weewx...@googlegroups.com
On Sat, 2 Jul 2016 13:54:49 -0700 (PDT)
"Jim W." <wolff....@gmail.com> wrote:

> Thanks for the reply... using the GUI I don't see weewx in the file
> tree? ok... I modified the weewx.conf file using the nano editor
> however I don't think it's running?

G'day Jim
You can start and stop Weewx with these commands

sudo /etc/init.d/weewx start

sudo /etc/init.d/weewx stop

you can check what it is doing with

sudo /etc/init.d/weewx status


When you have it running to your satisfaction, then arrange to have it
start automatically on boot.

Liz

vince

unread,
Jul 2, 2016, 11:15:46 PM7/2/16
to weewx-user
Jim - how are you progressing at this point ? 

Reason I ask is that I just installed the .deb on a new pi3 and had 'all kinds' of issues trying to get weewx working using the instructions at http://www.weewx.com/docs/debian.htm on top of a vanilla current Raspbian os.    It took quite a bit of gymnastics to get things working that are probably beyond "have no linux experience" levels of expertise.

In short - the debian instructions do not tell you the prerequisite packages you need 'before' trying to install Weewx using the .deb packaging.   Unfortunately the .deb file prompts you for things (it did for me) before blowing up badly at the package installation step after whining about missing prerequisites.  On a Raspbian system you need to install some packages 'before' installing weewx. 
  • sudo apt-get install -y python-configobj python-cheetah python-imaging python-usb
The list of packages for a vanilla setup.py install is at http://www.weewx.com/docs/setup.htm but the .deb requires a very particular set of packages as a minimum it seems.  My opinion is this is a bug (or two or three) in the .deb package.   For example - it shouldn't require python-usb if you have a serial connection to your station....but it does.  The setup.py package prerequisite list is solid if you want to use that as a reference.   There are other bugs in the .deb package including not deleting the stuff it installed if you do a "dpkg -r" to try to remove weewx, and it also doesn't clean the dpkg cached answers up

(I don't use the .deb package for these kinds of reasons, the setup.py method is far more straightforward and the docs are very accurate)

In any event, you'll also need to install a webserver, as one is not installed by default in Raspbian (not a bug).  Simplest is to do "sudo apt-get install -y apache2" to install the Apache webserver that the .deb weewx package assumes is there too.

Note also, weewx in .deb format does not put its output in the right place if you use the 'nginx' webserver, which is higher performance and lighter weight than apache.   You can link them together with a symlink, but again this is beyond really-new-to-linux expertise I suspect.   Just start with vanilla Raspbian, add the packages weewx expects, add httpd2, and then do your weewx installation.  It'll work at that point.

Lastly, I'd strongly recommend you start with the Simulator rather than trying to get it all working with a real station.  Running the Simulator for a day or three will get you more comfortable with the command-line and how to navigate around among where weewx is installed, configured, and where it writes to.   You can later switch to the real connection to your weather station via the instructions at http://www.weewx.com/docs/usersguide.htm#Changing_device_drivers but a short description is:
  • stop weewx 
  • delete the old simulator database
  • run the procedure in the changing_device_drivers
  • start weewx - it will create a new clean db for you
I'd also strongly suggest you do some self-paced free training on Linux to get more comfortable.  The free edx.org class on Linux is supposed to be very good.  Linux isn't rocket-science, but weewx 'does' assume a certain level of command-line proficiency, the ability to navigate around on the file system, and the ability to do some simple text file edits.

If you are running the full Raspbian with the gui interface, this might be a little easier initially, but the console-only setup is lighter by far and you're going to need to learn some command-line skills regardless.   Suggest you just 'go for smoke' as another now retired engineer I used to know used to say....

You can always reimage your SD card if you hose it up anyway, but trying to fix it is a great learning experience as well...

mwall

unread,
Jul 3, 2016, 1:07:14 AM7/3/16
to weewx-user
yet another install option is this:

http://weewx.com/apt/

that *should* be the easiest way of all.

read on for the boring backstory about dpkg and apt-get.


On Saturday, July 2, 2016 at 11:15:46 PM UTC-4, vince wrote:
Reason I ask is that I just installed the .deb on a new pi3 and had 'all kinds' of issues trying to get weewx working using the instructions at http://www.weewx.com/docs/debian.htm on top of a vanilla current Raspbian os.    It took quite a bit of gymnastics to get things working that are probably beyond "have no linux experience" levels of expertise.

it takes even more gymnastics to create a .deb package that works across debian releases.  unfortunately the folks at debian.org (or their new overlords at redhat) have not been making it any easier.

 
In short - the debian instructions do not tell you the prerequisite packages you need 'before' trying to install Weewx using the .deb packaging.   Unfortunately the .deb file prompts you for things (it did for me) before blowing up badly at the package installation step after whining about missing prerequisites.  On a Raspbian system you need to install some packages 'before' installing weewx. 
  • sudo apt-get install -y python-configobj python-cheetah python-imaging python-usb
you should not have to install the pre-requisites explicitly.  'apt-get -f install' will do it for you.  the problem is that dpkg knows how to install a .deb file, but it does not know how to resolve dependencies.  apt-get knows how to resolve dependencies, but does not know how to install a .deb file.  add to the mix the fact that we never know what someone might have already installed on their system.

we do not explicitly enumerate the dependencies in the instructions because the .deb package contains them already.

 
The list of packages for a vanilla setup.py install is at http://www.weewx.com/docs/setup.htm but the .deb requires a very particular set of packages as a minimum it seems.  My opinion is this is a bug (or two or three) in the .deb package.   For example - it shouldn't require python-usb if you have a serial connection to your station....but it does.  The setup.py package prerequisite list is solid if you want to use that as a reference.   There are other bugs in the .deb package including not deleting the stuff it installed if you do a "dpkg -r" to try to remove weewx, and it also doesn't clean the dpkg cached answers up

the goal with deb and rpm packages is to minimize the steps required to install weewx, and the deb and rpm packages are at the one-size-fits all end of the spectrum rather than the bespoke tailoring end.  i included both usb and serial because that ensures that every driver will work right out of the box.

as for 'dpkg -r', i'm pretty sure this is standard debian behavior, and not specific to weewx.

'dpkg --purge' is how you remove the package plus additional stuff, including the debconf settings.  'dpkg -r' just removes the package.

neither touches any weewx data.

 
(I don't use the .deb package for these kinds of reasons, the setup.py method is far more straightforward and the docs are very accurate)

In any event, you'll also need to install a webserver, as one is not installed by default in Raspbian (not a bug).  Simplest is to do "sudo apt-get install -y apache2" to install the Apache webserver that the .deb weewx package assumes is there too.

Note also, weewx in .deb format does not put its output in the right place if you use the 'nginx' webserver, which is higher performance and lighter weight than apache.   You can link them together with a symlink, but again this is beyond really-new-to-linux expertise I suspect.   Just start with vanilla Raspbian, add the packages weewx expects, add httpd2, and then do your weewx installation.  It'll work at that point.
 
redhat extends its tentacles even further.  the weewx .deb package uses /var/www, since that has been the standard location up to debian 7.  now we'll have to figure out where to put the logic to make the installer conditional, since debian 8 uses /var/www/html (we do not have the resources nor i the desire to release a different package of weewx for each version of debian, let alone its derivatives).

i think that keeping an apt repository is the way to make the installation process easiest - feedback about that process would be greatly appreciated.

the tug of war between one-button-to-install and tweak-every-detail continues...

m

Andrew Milner

unread,
Jul 3, 2016, 2:06:21 AM7/3/16
to weewx-user
for my twp cents' worth I still reckon the original setup.py method is the simplest and easiest to follow.  When I originally installed weewx my Linux knowledge was almost non existant but I managed to install via setup.py, and the instructions are now more explicit than when I did it.  The lis of dependancies was useful and I even managed to use apt-get at that time!!  Have never tried the package installers, but do know that whenever I have tried putting a package on an rpi it has usually ended in disaster - apart from through using apt-get.  Ubuntu installer seems to work ok also mind you.

Seems to me from reading various threads on his forum that the package installers require more Linux knowledge than just using apt-get and setup.py.

vince

unread,
Jul 3, 2016, 2:04:10 PM7/3/16
to weewx-user
On Saturday, July 2, 2016 at 10:07:14 PM UTC-7, mwall wrote:
yet another install option is this:

http://weewx.com/apt/

that *should* be the easiest way of all.


I can confirm that this worked great on a clean pi3 using the 2016-05-27 Raspian 'lite' (console only) image with a couple tweaks:
  • added apache2 to the 'apt-get install' line to install a webserver (the Raspbian image doesn't have one by default)
  • added a symlink so the generated weewx stuff appears under http://localhost/weewx
    • cd /var/www/html ; ln -s ../weewx

I feel your pain re: .deb packaging, which has driven me crazy since Debian has existed.  I've also run into differences between Debian and Ubuntu re: where their docroot is located, but my recollection is they converged in current versions to the same location, if that helps any.

Thanks for the clarification re: dpkg -r vs. --purge, I use dpkg so very rarely that I didn't notice that in the horrid man page for dpkg.  Geez what a mess.

Suggest we start going with apt as the preferred newbie/everybody .deb package method.  Much simpler and more expected behavior.

Marty Thompson

unread,
Jul 4, 2016, 4:40:35 PM7/4/16
to weewx-user
i myself use the deb install  apt will be better for me
i use Nginx as web server  because its not as hungry as Apache
i follow the deb  or now the apt install and then install nginx
sudo apt-get install nginx

# put a symbolic-link from nginx-document-root to weewx/public_html
cd /usr/share/nginx/www
sudo ln -s /home/weewx/public_html weather

# start nginx
sudo /etc/init.d/nginx start

# now the weather-data should be visible in local lan at http://ip.of.raspberry/weather
Code from Initram/pi-weather off Github

Jim W.

unread,
Jul 5, 2016, 11:21:03 AM7/5/16
to weewx-user
Ok... Slowly making progress (I think?) 
Can anyone explain why the reportengine is not working?


● weewx.service - LSB: weewx weather system
   Loaded: loaded (/etc/init.d/weewx)
   Active: active (running) since Tue 2016-07-05 09:17:05 EDT; 1h 55min ago
  Process: 444 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/weewx.service
           └─672 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf

Jul 05 11:05:15 raspberrypi weewx[672]: manager: added record 2016-07-05 11:05:00 EDT (1467731100) to database 'weewx.sdb'
Jul 05 11:05:15 raspberrypi weewx[672]: manager: added record 2016-07-05 11:05:00 EDT (1467731100) to daily summary in 'weewx.sdb'
Jul 05 11:05:17 raspberrypi weewx[672]: cheetahgenerator: Generated 14 files for report StandardReport in 1.09 seconds
Jul 05 11:05:17 raspberrypi weewx[672]: genimages: Generated 12 images for StandardReport in 0.63 seconds
Jul 05 11:05:17 raspberrypi weewx[672]: reportengine: copied 0 files to /var/www/weewx
Jul 05 11:10:15 raspberrypi weewx[672]: manager: added record 2016-07-05 11:10:00 EDT (1467731400) to database 'weewx.sdb'
Jul 05 11:10:15 raspberrypi weewx[672]: manager: added record 2016-07-05 11:10:00 EDT (1467731400) to daily summary in 'weewx.sdb'
Jul 05 11:10:17 raspberrypi weewx[672]: cheetahgenerator: Generated 14 files for report StandardReport in 1.10 seconds
Jul 05 11:10:17 raspberrypi weewx[672]: genimages: Generated 12 images for StandardReport in 0.63 seconds
Jul 05 11:10:17 raspberrypi weewx[672]: reportengine: copied 0 files to /var/www/weewx

Andrew Milner

unread,
Jul 5, 2016, 11:29:03 AM7/5/16
to weewx...@googlegroups.com
If you haven't told it to ftp anything - it doesn't!!

If you have then attach your .conf files or run weewx_debug.



--

Thomas Keffer

unread,
Jul 5, 2016, 12:01:07 PM7/5/16
to weewx-user
The "copy generator's" job is to copy static files, like CSS files, to
the HTML directory. As such, it need run only once after weewx starts
up. Thereafter, there's nothing to do.

-tk
> --
> 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

Jim W.

unread,
Jul 5, 2016, 12:12:54 PM7/5/16
to weewx-user
Ok... in the weewx.conf file I removed the comment symbol (#)  in front of HTML_ROOT = /var/www/weewx
but i'm not sure of how to deal with the 4 lines that deal with username and password and such?



    [[FTP]]
        # FTP'ing the results to a webserver is treated as just another report,
        # albeit one with an unusual report generator!
        skin = Ftp

        # If you wish to use FTP, uncomment and fill out the next four lines.
        #user = replace with the ftp username
        #password = replace with the ftp password
        #server = replace with the ftp server name, e.g, www.threefools.org
        #path = replace with the ftp destination directory (e.g., /weather)

        # Set to True for a secure FTP (SFTP) connection. Not all servers
        # support this.
        secure_ftp = False

        # To upload files from something other than what HTML_ROOT is set
        # to above, specify a different HTML_ROOT here.
        HTML_ROOT = /var/www/weewx

        # Most FTP servers use port 21
        port = 21

Jim W.

unread,
Jul 5, 2016, 12:19:15 PM7/5/16
to weewx-user
Because I used a DEB install the daemon mode is automatically on. How do I change it to direct running?


On Saturday, July 2, 2016 at 2:40:32 PM UTC-4, Jim W. wrote:

Andrew Milner

unread,
Jul 5, 2016, 12:43:02 PM7/5/16
to weewx-user
Stop it as described in the user guide.

Jim W.

unread,
Jul 5, 2016, 12:47:34 PM7/5/16
to weewx-user
Well... this is what I get:

pi@raspberrypi:~ $ /etc/init.d/weewx stop
[....] Stopping weewx (via systemctl): weewx.serviceFailed to stop weewx.service: Access denied
 failed!

Jim W.

unread,
Jul 5, 2016, 12:50:19 PM7/5/16
to weewx-user
Oops... figured it out. sudo!

vince

unread,
Jul 5, 2016, 1:43:54 PM7/5/16
to weewx-user
On Tuesday, July 5, 2016 at 9:50:19 AM UTC-7, Jim W. wrote:
Oops... figured it out. sudo!


Jim - on a pi you almost certainly are running normally as user 'pi' which is non-privileged.   Just about everything you will need to do will require 'sudo'.

Incidentally, you probably should use "systemctl stop weewx.service", as the 'service' backwards compatibility workaround isn't perfect on Raspbian.  Long story there.

On your other question re: ftp, you need to put in the user/pass of the system you want it to ftp to, the name of the computer you're trying to ftp to, and the path you want it to ftp the files into.   I don't know what your desired setup is, so I can't speculate how (or whether) you want to do this or not.  For what it's worth, I use the RSYNC method here.  FTP uses cleartext username/password so it's quite a bit passe' for the last decade+ unless you have special requirements.

Jim W.

unread,
Jul 8, 2016, 9:45:56 AM7/8/16
to weewx-user
Thanks to all! 

I now have my station (Ambient 2080) reporting to WU... I have noticed that when there is no wind WU appends my icon with "station missing some wind data."  I guessing that with no wind weewx sends a null instead of zero? 
Is there a way to see (debug?) the data being sent to WU?

Thanks again!


On Saturday, July 2, 2016 at 2:40:32 PM UTC-4, Jim W. wrote:

Andrew Milner

unread,
Jul 8, 2016, 9:54:44 AM7/8/16
to weewx-user
It is probably complaining about no wind direction - since weewx does not supply direction for zero wind (it's logical as the vane could be pointing in a random direction)


On Friday, 8 July 2016 16:45:56 UTC+3, Jim W. wrote:
Thanks to all! 

I now have my station (Ambient 2080) reporting to WU... I have noticed that when there is no wind WU appends my icon with "station missing some wind data."  I guessing that with no wind weewx sends a null instead of zero? out no wind direction

Thomas Keffer

unread,
Jul 8, 2016, 9:58:43 AM7/8/16
to weewx-user
If the wind speed is zero, then weewx sends zero. However, it sets the wind direction to null. See this thread.

There is no out-of-the-box way to print the URL. You'd have to insert a print statement before the call to urllib2.urlopen().

-tk

--
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+...@googlegroups.com.

mwall

unread,
Jul 8, 2016, 11:20:15 AM7/8/16
to weewx-user
On Friday, July 8, 2016 at 9:58:43 AM UTC-4, Tom Keffer wrote:
There is no out-of-the-box way to print the URL. You'd have to insert a print statement before the call to urllib2.urlopen().

set debug=2 in weewx.conf

that will display the url for every restful service

m
Reply all
Reply to author
Forward
0 new messages