[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-30 Thread gjr80
Something is not right. WeeWX was started but then did nothing:

Oct  1 16:02:20 raspberrypi kernel: [  366.572146] 
rpi_firmware_get_throttled: 4 callbacks suppressed
Oct  1 16:02:20 raspberrypi kernel: [  366.572153] Voltage normalised (
0x)
Oct  1 16:02:34 raspberrypi kernel: [  381.133930] Under-voltage detected! (
0x00050005)
Oct  1 16:02:38 raspberrypi kernel: [  385.294190] Voltage normalised (
0x)
Oct  1 16:02:51 raspberrypi kernel: [  397.774281] Under-voltage detected! (
0x00050005)
Oct  1 16:03:01 raspberrypi kernel: [  408.174338] Voltage normalised (
0x)
Oct  1 16:03:16 raspberrypi systemd[1]: Stopping LSB: weewx weather system
...
Oct  1 16:03:21 raspberrypi systemd[1]: weewx.service: Control process 
exited, code=exited, status=1/FAILURE
Oct  1 16:03:21 raspberrypi systemd[1]: weewx.service: Failed with result 
'exit-code'.
Oct  1 16:03:21 raspberrypi systemd[1]: Stopped LSB: weewx weather system.
Oct  1 16:05:21 raspberrypi systemd[1]: Starting LSB: weewx weather system
...
Oct  1 16:05:22 raspberrypi systemd[1]: Started LSB: weewx weather system.
Oct  1 16:06:54 raspberrypi kernel: [  640.936253] usb 1-1.3: USB disconnect
, device number 4
Oct  1 16:06:54 raspberrypi thd[353]: Error reading device 
'/dev/input/event0'
Oct  1 16:06:54 raspberrypi thd[353]: Error reading device 
'/dev/input/event1'
Oct  1 16:06:54 raspberrypi thd[353]: Error reading device 
'/dev/input/event2'
Oct  1 16:06:54 raspberrypi thd[353]: Error reading device 
'/dev/input/event3'
Oct  1 16:06:54 raspberrypi thd[353]: Error reading device 
'/dev/input/event4'
Oct  1 16:12:02 raspberrypi systemd[1]: Starting Cleanup of Temporary 
Directories...
Oct  1 16:12:02 raspberrypi systemd[1]: systemd-tmpfiles-clean.service: 
Succeeded.
Oct  1 16:12:02 raspberrypi systemd[1]: Started Cleanup of Temporary 
Directories.
Oct  1 16:17:01 raspberrypi CRON[1575]: (root) CMD (   cd / && run-parts 
--report 
/etc/cron.hourly)

There should have been a whole pile of log entries from WeeWX as it 
started. You might want to see what the following shows (after WeeWX was 
started/restarted):

$ sudo systemctl status weewx

Might also be taking a step back and running WeeWX directly 
. This should start 
WeeWX (not in daemon mode) and display loop packets and archive records to 
the console. Post the command you entered to start WeeWX as well as the the 
output you see.

Gary

On Tuesday, 1 October 2019 13:21:26 UTC+10, Lodewyk Jansen wrote:
>
> Hi Gary,
>
> Thanks it seems that there might be an issue with something somewhere but 
> i dont know where. 
>
> All the links in rc0..etc. is created. 
> The conf file is updated and the log file is attached. 
>
> Will try to get a system reboot log file also.
>
> Regards
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a7f78327-15cc-4b40-8c27-651e9347347e%40googlegroups.com.


[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-30 Thread Lodewyk Jansen
Hi Gary,

Thanks it seems that there might be an issue with something somewhere but i 
dont know where. 

All the links in rc0..etc. is created. 
The conf file is updated and the log file is attached. 

Will try to get a system reboot log file also.

Regards


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a7a7a5a8-42a9-47a6-b5a9-39aa7939cbd1%40googlegroups.com.


mylog
Description: Binary data


[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-30 Thread gjr80
Thanks. Starting to reach the limits of my expertise but I don't think 
there is anything wrong with the /etc/init.d/weewx script; rather I think 
there is some other fundamental problem. The run script is identical to the 
distributed Debian based version and since you can start and stop WeeWX via 
/etc/init.d/weewx its permissions are fine. Can you have a look in 
/etc/rc0.d, /etc/rc1.d, etc up to /etc/rc6.d. Is there a link in each to 
/etc/init.d/weewx ? The command 

$ sudo update-rc.d weewx defaults 98

should have created those links athis is what starts/stops WeeWX during 
boot and shutdown. /etc/rc0.d, /etc/rc1.d and /etc/rc6.d should have links 
named K01weewx whereas the others should have links named S01weewx, eg:

etc/rc6.d:
 2929 lrwxrwxrwx   1 root root   15 Jun 12 16:41 K01weewx -> ../init.d/weewx

and

/etc/rc5.d:
 2911 lrwxrwxrwx   1 root root   15 Jun 12 16:41 S01weewx -> ../init.d/weewx

I would also like to understand why WeeWX is starting with the 'Started 
Daemon to control my Weewx weather station.' message and why the loop 
packets and archive records are appearing in the log. I know you have 
provided a log when WeeWX was running but it was only a brief extract plus 
debug was turned off. Can you edit /home/weewx/weewx.conf, set debug = 1, 
save weewx.conf and then restart WeeWX. Let WeeWX run for at least three 
archive periods and then post a log extract showing from just before WeeWX 
was started through until the three archive periods elapsed.

Gary

On Tuesday, 1 October 2019 05:30:14 UTC+10, Lodewyk Jansen wrote:
>
> Hi Gary,
>
> Thanks you for the response - attached is the syslog file. 
> The weather station was out for the week but it is back again. I restarted 
> it this morning and still no luck with Weewx running by itself. 
>
> Do you think there is something i need to edit in the daemon config file? 
> (found at  /etc/init.d/weewx)
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/45c5ed61-23fe-4b03-bd16-874c6d74aaba%40googlegroups.com.


[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-20 Thread gjr80
OK, still seems to be some unusual output; I have never seen the entry:

Sep 20 11:17:10 raspberrypi systemd[1]: Started Daemon to control my Weewx 
weather station.

plus WeeWX does not normally log the following, that looks more like the 
output from running WeeWX directly:

Sep 20 11:17:11 raspberrypi weewxd[1381]: REC:2019-09-20 11:13:00 NZST (
1568934780) altimeter: 1026.86096833, appTemp: 19.0996682438, barometer: 
1027.09152857, cloudbase: 1330.70119407, consBatteryVoltage: None, dateTime: 
1568934780, dewpoint: 8.93508609165, ET: 0.0, forecastRule: 9, heatindex: 
19.33, highOutTemp: 66.9, humidex: 20.1354183953, inDewpoint: 
8.32477957838, inHumidity: 46.0, inTemp: 20.33, interval: 1, 
leafTemp1: -67.22, leafTemp2: -63.33, leafWet1: 1.0, 
leafWet2: 8.0, lowOutTemp: 66.8, maxSolarRad: 755.506647187, outHumidity: 
51.0, outTemp: 19.33, pressure: 1023.02049079, rain: 0.0, rainRate: 
0.0, rxCheckPercent: 100.0, soilMoist1: 4.0, soilMoist2: 8.0, soilMoist3: 
4.0, soilMoist4: 32.0, soilTemp1: -67.22, soilTemp2: -67.78, 
soilTemp3: -67.22, soilTemp4: -67.78, txBatteryStatus: None, 
usUnits: 17, windchill: 19.33, windDir: None, windGust: 0.0, 
windGustDir: None, windrun: 0.0, windSpeed: 0.0

In terms of a startup log, unless you have changed the logging you should 
the WeeWX log in /var/log/syslog. After booting the RPi if you look in 
syslog you should see the whole boot sequence and towards the end you 
should see an attempt to start WeeWX, something like:

Sep 21 09:47:09 stretch cron[322]: (CRON) INFO (Running @reboot jobs)
Sep 21 09:47:09 stretch systemd[1]: Started OpenBSD Secure Shell server.
Sep 21 09:47:10 stretch systemd[1]: nginx.service: Failed to read PID from 
file /run/nginx.pid: Invalid argument
Sep 21 09:47:10 stretch systemd[1]: Started A high performance web server 
and a reverse proxy server.
Sep 21 09:47:10 stretch systemd[1]: Started The PHP 7.0 FastCGI Process 
Manager.
Sep 21 09:47:11 stretch dhclient[305]: bound to 192.168.2.103 -- renewal in 
1463 seconds.
Sep 21 09:47:11 stretch sh[291]: bound to 192.168.2.103 -- renewal in 1463 
seconds.
Sep 21 09:47:11 stretch mysqld[443]: 2019-09-21  9:47:11 140538782215552 [
Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as 
process 443 ...
Sep 21 09:47:11 stretch systemd[1]: Reloading OpenBSD Secure Shell server.
Sep 21 09:47:11 stretch sh[291]: enp0s3=enp0s3
Sep 21 09:47:11 stretch weewx[352]: engine: Initializing weewx version 3.9.
2a1
Sep 21 09:47:11 stretch weewx[352]: engine: Using Python 2.7.13 (default, 
Sep 26 2018, 18:42:22) #012[GCC 6.3.0 20170516]
Sep 21 09:47:11 stretch weewx[352]: engine: Platform Linux-4.9.0-8-amd64-
x86_64-with-debian-9.8
Sep 21 09:47:11 stretch weewx[352]: engine: Locale is 'en_AU.UTF-8'
Sep 21 09:47:11 stretch weewx[352]: engine: pid file is /var/run/weewx.pid
Sep 21 09:47:11 stretch weewx[309]: Starting weewx weather system: weewx.
Sep 21 09:47:11 stretch systemd[1]: Started LSB: weewx weather system.
Sep 21 09:47:11 stretch systemd[1]: Reloaded OpenBSD Secure Shell server.
Sep 21 09:47:11 stretch weewx[462]: engine: Using configuration file /home/
weewx/weewx.conf
Sep 21 09:47:11 stretch weewx[462]: engine: Loading station type Simulator (
weewx.drivers.simulator)
Sep 21 09:47:11 stretch weewx[462]: engine: StdConvert target unit is 0x1
Sep 21 09:47:11 stretch weewx[462]: wxcalculate: The following values will 
be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, 
windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=
prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, 
inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, 
cloudbase=prefer_hardware
Sep 21 09:47:11 stretch weewx[462]: wxcalculate: The following algorithms 
will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Sep 21 09:47:11 stretch weewx[462]: engine: Archive will use data binding 
wx_binding
Sep 21 09:47:11 stretch weewx[462]: engine: Record generation will be 
attempted in 'hardware'
Sep 21 09:47:11 stretch weewx[462]: engine: Using archive interval of 300 
seconds (specified in weewx configuration)
Sep 21 09:47:11 stretch weewx[462]: engine: Using binding 'wx_binding' to 
database 'weewx.sdb'
Sep 21 09:47:11 stretch weewx[462]: manager: Starting backfill of daily 
summaries
Sep 21 09:47:11 stretch weewx[462]: restx: StationRegistry: Registration not 
requested.
Sep 21 09:47:11 stretch weewx[462]: restx: Wunderground: Posting not enabled
.
Sep 21 09:47:11 stretch weewx[462]: restx: PWSweather: Posting not enabled.
Sep 21 09:47:11 stretch weewx[462]: restx: CWOP: Posting not enabled.
Sep 21 09:47:11 stretch weewx[462]: restx: WOW: Posting not enabled.
Sep 21 09:47:11 stretch weewx[462]: restx: AWEKAS: Posting not enabled.
Sep 21 09:47:11 stretch weewx[462]: engine: Starting up weewx 

[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-19 Thread Lodewyk Jansen
Hi Gary,

Yes, WeeWX runs fine -- when I start it manually.

Not sure how I would get the log over a reboot but will look into it now 
and post the log once I have it. 

I followed the same instructions as detailed in the link you listed and I 
only opened the file to make sure the ROOT was updated and refer to the 
correct location. Other than that I did nothing else. 

Regards,

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a643a2fb-d8f3-48d0-ba87-4c261ba69c99%40googlegroups.com.


[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-19 Thread gjr80
OK, so WeeWX runs fine, the issue is purely one of WeeWX not starting after 
a reboot.

So was that log extract the startup of WeeWX as part of a reboot? I'm 
guessing not if your problem is that WeeWX does not start after a reboot. 
What is in the log on reboot?

Might also help to know what instructions you followed, I run WeeWX on a 
number of RPis and my log looks nothing like that. Setting WeeWX to run as 
a daemon on boot  
is as simple as copying a file, changing a file permission and creating a 
link. When I see something like 'Started Daemon to control my Weewx weather 
station.' I am wondering if something else has been modified.

Gary

On Friday, 20 September 2019 09:22:20 UTC+10, Lodewyk Jansen wrote:
>
> Hi Gary,
>
> I can start/stop/restart WeeWX with the following command:
> sudo /etc/init.d/weewx start/stop/restart
>
> So no issue with that. 
> My goal with this is to take the weather station out to a site and deploy. 
> then when everything is ready i connect (power-up) the raspberry pi to 
> archive all the weather data. I wont have a screen or mouse with me in the 
> field - therefore the automated start of WeeWX is essential. 
>
> Attached is the log file i created. 
>
> Regards,
> LJ
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8a74e421-caa8-413b-8104-ca5b7ec453b2%40googlegroups.com.


[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-19 Thread Lodewyk Jansen
Hi Gary,

I can start/stop/restart WeeWX with the following command:
sudo /etc/init.d/weewx start/stop/restart

So no issue with that. 
My goal with this is to take the weather station out to a site and deploy. 
then when everything is ready i connect (power-up) the raspberry pi to 
archive all the weather data. I wont have a screen or mouse with me in the 
field - therefore the automated start of WeeWX is essential. 

Attached is the log file i created. 

Regards,
LJ

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8ef5eeac-de1d-4ec2-9e4e-6cff85b10fbe%40googlegroups.com.


mylog
Description: Binary data


[weewx-user] Re: WeeWX doesnt run in daemon or startup after reboot - any help?

2019-09-19 Thread gjr80
Hi,

Regards your daemon problem, have you been able to run WeeWX directly 
? If not then you 
need to address that first, otherwise the best place to start is by posting 
the log from when WeeWX attempts to start. Have a look at the Help! Posting 
to weewx user 
 in the 
wiki.

Gary

On Friday, 20 September 2019 07:29:02 UTC+10, Lodewyk Jansen wrote:
>
> Hi,
>
> After installing the WeeWX (via python) and following the instruction to 
> run the program in daemon - it doesn't want to start after a reboot. 
>
> 1) Any suggestions on what i should change and where? 
> 2) something a bit more off topic - is it possible to ensure that the 
> raspberry pi will not go into sleep mode? (i had the pi powered on and 
> running python (manually) overnight. when i got back and plugged in my 
> screen it stayed blank - the LED light was on (Red). I am just not sure why 
> the screen didn't go on...)
>
> Please bare in mind that my python skills is basic and i am just starting 
> with everything - so i am guessing the fix might be something short and 
> easy. 
>
> Thanks in advance for your replies and help on this. 
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/06734532-9e02-4015-9fad-d06a3192bde7%40googlegroups.com.