Network storage and display recommendations

cd’d to /home/weewx/bin and tried to run “sudo weewx restart” and “weewx”; but still get “command not found” results. perhaps an uninstall and follow the weewx.com/docs/setup instructions? or is uninstall even necessary? i have a copy of my modified weewx.conf file outside the weewx construct, so deleting the entire weewx directory structure shouldn’t impact my modifications (as little as they are!). suggestions?

Peter’s on the money almost certainly.

You need to understand:

  1. where weewx things are installed to
  2. how the operating system finds commands
  3. how to edit a simple text file
  4. how to check/start/stop/restart a process
  5. how to safely shut down or restart your system
  6. how to find and understand the system logs
  7. how to leverage the huge weewx docs and wiki
  8. how to leverage the thousands of posts in the weewx-user google group

Items 2,3,4,5,6 are in that edx.org Linux class.

Items 1 is in the user guide. Items 7+8 are kinda obvious but lots of time people get frustrated and can’t find things because they’re not sure what terminology to use for to even search.

Anyway - you need to revisit the edx.org Linux class and find the section where they talk about shell command line $PATH. I’d guess 95% of new Linux command line users don’t understand this.

But to answer…

  • If you ran the setup.py version of the provisioner, the commands for weewx specifically are in /home/weewx/bin which is not in the default os command line $PATH.

  • so when you see things in the documents like “sudo wee_extension --list” you just need to fully specify the pathname to the command ala “sudo /home/weewx/bin/wee_extension --list

How to restart weewx is a different beast and where the os comes in. Debian10 uses systemd which has its own way of doing things that most old-school linux users (including me) are ‘not’ fond of. But it won the init system wars it seems so we need to deal with it.

The command you’re looking for is “systemctl” (system control):

  • systemctl status weewx
  • systemctl start weewx
  • systemctl stop weewx
  • systemctl status weewx

This is not Windows.
Do not reboot.
Do not restart the computer.
Do not uninstall and reinstall.
Relax.

And there is no such thing as a ‘weewx restart’ command.

  • read my long answer above that I was writing up when you were writing your latest followup.
  • then touch nothing and walk away from the computer for 5 minutes to just relax your mind.
  • then read it again and you’ll probably grok it a little better.

This is all normal new-linux-user stuff no matter how painful it is. It doesn’t take long to get the muscle memory, but it does hurt a bit initially. Just walk away and let your mind clear a little if it gets too frustrating.

(I still have the same pain even trying to use my wife’s iPad as I can’t even comprehend their user interface. I’m an old-school gimme a menu Google phone user).

1 Like

Thanks! I’ve been iusing command lines my entire IT life (over 55 years, since 1964) so i’m very comfortable with executables, paths, editors and generally syntax of things. So, were i get frustrated (probably because of the years of experience in other OS’s) is the linux syntax, lack of experience with linux command structures (especially path-ing constructs) and how to navigate. Did the EDx course and still reference it; but it’s sparse in many “labs.” So a little guidance now and then is helpful. I do understand where weewx placed things - generally. So thank you!
so:
Should i uninstall weewx and restart with the setup file from weewx?

Okay, just saw this post… i am (virtually) AFK, I’ll try the systemctl commands after this to see if i can better understand it. I posted a reply to your earlier posting, so disregard most of it!
again, thanks!
(p.s., i will NOT unistall and reinstall!)
question, should i go back to weewx logs and review what’s happening? or would that even help?
/David

No. This is not Windows. Don’t uninstall/reinstall and reboot and expect the answer to change.

Typical IT answers apply here:

  • what did you do
  • what did you see
  • what did you ‘expect’ to see
  • and of course always check the logs. On your system it’s /var/log/syslog which is owned by root so to view it, you’d need to preface with sudo ala “sudo less /var/log/syslog” (hit ‘q’ to get out of less)

The weewx wiki has a reasonably good page on $PATH here

It’s hard from your description to tell where you’re at, but my guess is perhaps you’re trying to switch from the Simulator driver to the WeatherflowUDP driver (???). The procedure for that is also in the weewx wiki here

You ‘do’ need to restart weewx after making changes to weewx.conf - that’s only read once when the process starts.

You do ‘not’ need to restart weewx if you change a skin html template file or a skin.conf - those are read at runtime

If you’re switching from the simulator to the real WF driver, you’ll have bogus simulated data in your db. Simplest way to clean that up is:

  • stop weewx
  • delete the weewx.sdb database file
  • start weewx

It’ll create a new clean one when weewx starts up.

FWIW - if you have weewx installed in simulator mode and can view its web pages in a browser pointed at your laptop running debian, you’re 98% of the way there.

current ‘situation:’

  1. nginx running (succefully)
  2. weewx (localhost) running with simulation information (“deb-107” data)
  3. installed ‘listen.py’ it runs succefully with interesting data from my Tempest.
  4. ran systemctl status, got the follow:
    I got a failure, not sure what this is about.
    ● weewx.service - weewx weather system
    Loaded: loaded (/etc/systemd/system/weewx.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2021-02-20 11:11:50 PST; 2min 53s ago
    Process: 7326 ExecStart=/home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf (code=exited, status=0/SUCCESS)
    Main PID: 7330 (code=exited, status=1/FAILURE)

After another AFK, i’ll read the provided doc’s. An interesting question: I just finished reading the “logging.md” doc, it says the weewx logging (should be?) in /var/log/weewx.log file? can’t find that instance of ‘weewx.log’ … so it’s probably in syslog?
thanks!

another, abet technical, question: on lat/long spec’s what’s the precision? I’m a ‘amateur’ GIS follower and use Manifold v8 and v9 GIS packages (which is why i have the heavy hardware for windows 10). We use five and six decimal lat/long (38.29137 -122.47541) but all the examples i see are in two or three notation. If i import data with higher precision, will weewx export data with that level of precision? - Reason i ask is i’d like to try to import several weather stations data into weewx, process that data and export to a GIS package for layered display over agricultural and land-use datasets.

By default it’s just in the normal /var/log/syslog. Do “tail -n 200 /var/log/syslog” and you will see the last 200 lines. It usually indicates the issue. The syslogs are the best place to look.

(you have to do something special to redirect weewx logs to a separate file, so just don’t worry doing that til you get things up and stable)

And re: lat/lon folks put in whatever decimal value they want and weewx does the right thing as a result.

thanks on the lat/long issue. I did a look at syslog, it seems i need a “WeatherFlowUDP” driver somewhere in my user directory. It fails to find it. I didn’t load one (duh) so i need to find the appropriate driver for WeatherFlow Tempest device and place that in an appropriate location.
so the obvious question is, where do i find that driver, and where should i place it?

the error i get is “no module named ‘user.weatherflowupd’”
and:
wee_device[8026] ERROR main: Unable to import driver user.weatherflowudp: No module named ‘user.weatherflowudp’

geez - c’mon man.

Search this forum site for “weewx udp”
open the first link
follow the instructions on the first announcement page in the thread

weewx is running! and it’s using the weatherflow drivers. However, the syslog shows command execution with “Deb-107” just after my name… i thought that was the name of the simulator for the website… not sure how it relates to the entry in syslog… i’ve included several lines showing the weatherflow debug output…

here’s a sample of the syslog:
Feb 20 16:19:25 Deb-107 systemd[1]: Stopped weewx weather system.
Feb 20 16:22:07 Deb-107 rtkit-daemon[1248]: Supervising 4 threads of 2 processes of 1 users.
Feb 20 16:22:07 Deb-107 rtkit-daemon[1248]: Supervising 4 threads of 2 processes of 1 users.
Feb 20 16:24:21 Deb-107 systemd[1]: Starting weewx weather system…
Feb 20 16:24:21 Deb-107 weewx[9388] INFO main: Initializing weewx version 4.4.0
Feb 20 16:24:21 Deb-107 weewx[9388] INFO main: Using Python 3.7.3 (default, Jul 25 2020, 13:03:44) #012[GCC 8.3.0]
Feb 20 16:24:21 Deb-107 weewx[9388] INFO main: Platform Linux-4.19.0-14-amd64-x86_64-with-debian-10.8
Feb 20 16:24:21 Deb-107 weewx[9388] INFO main: Locale is ‘en_US.UTF-8’
Feb 20 16:24:21 Deb-107 weewx[9388] INFO main: PID file is /var/run/weewx.pid
Feb 20 16:24:21 Deb-107 weewx[9392] INFO main: Using configuration file /home/weewx/weewx.conf
Feb 20 16:24:21 Deb-107 weewx[9392] INFO main: Debug is 1
Feb 20 16:24:21 Deb-107 weewx[9392] DEBUG main: Initializing engine
Feb 20 16:24:21 Deb-107 weewx[9392] INFO weewx.engine: Loading station type WeatherFlowUDP (user.weatherflowudp)
Feb 20 16:24:21 Deb-107 /weewxd: weatherflowudp: MainThread: driver version is 1.10
Feb 20 16:24:21 Deb-107 /weewxd: weatherflowudp: MainThread: sensor map is {‘outTemp’: ‘air_temperature.ST-00024219.obs_st’, ‘outHumidity’: ‘relative_humidity.ST-00024219.obs_st’, ‘pressure’: ‘station_pressure.ST-00024219.obs_st’, ‘outTempBatteryStatus’: ‘battery.ST-00024219.obs_st’, ‘windSpeed’: ‘wind_speed.ST-00024219.rapid_wind’, ‘windDir’: ‘wind_direction.ST-00024219.rapid_wind’, ‘lux’: ‘illumance.ST-00024219.obs_st’, ‘UV’: ‘uv.ST-00024219.obs_st’, ‘rain’: ‘rain_accumulated.ST-00024219.obs_st’, ‘windBatteryStatus’: ‘battery.ST-00024219.obs_st’, ‘radiation’: ‘solar_radiation.ST-00024219.obs_st’}

1 Like

Maybe not exactly what you want, but I went out and purchased a Raspberry Pi 4 with 7" display, etc. and implemented PiConsole. WeatherFlow PiConsole

It ended up only being an hour+ or so of work setting it up (after buying all the parts) and I’m quite impressed.

Your not far off the target!
I plan to get a basic skin running and play with multiple device input (tempest and two others) until it’s stable. I’ll then purchase a Pi4 with 10" touch monitor. Meanwhile, i’ll play with importing weewx data to a GIS package running from Manifold GIS. I use the gis package for agricultural and land-use analysis. adding weather info will help.

yes - that’s the hostname.
Congratulations. Go appropriately wild adding custom skins and extensions to do other stuff.
(further questions should be in weewx-users google group)

1 Like

The two are both excellent products but have very different implementations under the hood and different pros+cons.

PiConsole is a great turnkey pi-only solution for WF only. Personally I still think it’s the best UI that I’ve seen regardless of which vendor’s hardware (or servers) it talks to.

Weewx takes a different tact and supports dozens of hardware types, and has dozens (or more) of user-created ‘skins’ to set the look’n’feel and dozens of user-created ‘extensions’ to make it do more stuff to more gear. It also can upload to very many Internet sites. The Linux/unix expertise required is higher, as we’ve seen here in this thread, but for folks who want to tweak their setup to taste it’s more applicable for them. The WF driver uses the Hub UDP broadcasts but there is one fellow who is trying to add support for the WF server interfaces as well.

There are lots others like the weather32 stuff and meteobridge etc. for folks with requirements those apply more to.

Nice thing about WF is the open API so there are lots of options for the users !

1 Like

Yes, this project was so simple with PiConsole, what you are trying to do also sounds real cool, but probably a bit more work.

stopped webbrowser; stopped weewx; ran wee_device; restarted weewx; waited 1/2 hour, restarted webrowser. checked weewx status - all up and operational. checked localhost/weewx - it now shows correct site and relevant data. I’ll let it run tonight before i start playing with skins.

Thank you all for your patience and assistance!

1 Like