Re: [weewx-user] Unable to remove or purge weewx! Really?!

2023-01-05 Thread matthew wall
kevin,

please post the contents of /var/log/syslog from the period of time when you 
did the 'purge'.  when dpkg fails on pre- or post-inst, it means that the 
installation package encountered a configuration that it was not expecting and 
that it was unable to resolve.  i'd love to know what state your system is in 
so that we can make the dpkg configuration more robust, and only with that 
information can i tell you exactly what you should do to clean it up.

m

> On 05 Jan 2023, at 02:34, Kevin Key  wrote:
> 
> pi@ubuntu:~ $ sudo apt-get purge weewx
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> The following packages will be REMOVED:
>   weewx*
> 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> After this operation, 6,144 kB disk space will be freed.
> Do you want to continue? [Y/n] y
> (Reading database ... 85721 files and directories currently installed.)
> Removing weewx (4.9.1-1) ...
> Failed to stop weewx.service: Unit weewx.service not loaded.
> invoke-rc.d: initscript weewx, action "stop" failed.
> dpkg: error processing package weewx (--remove):
>  installed weewx package pre-removal script subprocess returned error exit 
> status 5
> dpkg: too many errors, stopping
> Errors were encountered while processing:
>  weewx
> Processing was halted because there were too many errors.
> E: Sub-process /usr/bin/dpkg returned an error code (1)

-- 
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/C2E3017C-87E0-48D5-B59F-8D9D1487763E%40gmail.com.


Re: [weewx-user] Re: weewx server?

2023-01-05 Thread pannetron
If you host a public website from a personal Linux server, as I do, look 
into using fail2ban as a way to detect and block some bad actor bots.  My 
implementation currently has about 2500 IPs blocked because they were 
looking for typical webserver security flaws.

On Wednesday, January 4, 2023 at 11:11:49 AM UTC-7 do...@dougjenkins.com 
wrote:

> Glad some of you find this useful.
>
> I have been using this method since it came out this summer (July 2022). I 
> run my infrastructure (Web Server, WeeWX, MQTT, MariaDB) as containers in 
> one stack in its own network all in Docker. I do this to limit what the 
> cloudflare tunnel can access on my network (just WeeWx stuff). All of this 
> works in docker in one stack and one YAML file!
>
> Like Tom Lawerence mentioned in the video I attached, you have to put 
> Cloudflare in your "circle of trust" as you are depending on them for both 
> the client and server/edge side of the tunnel. You have to make that 
> determination on your own if you are comfortable with that.
>
> As other methods mentioned here, they are all great alternatives. I was 
> not aware adafriut offered a dashboard to present your data. That can be a 
> good alternative than going through the hassle of hosting a full website 
> for your station.
>
> If I get a free moment in a few weeks, I can post a step-by-step article 
> on onboarding your WeeWX weather station as a public website using 
> Cloudflare. I think it can help a lot of users who struggle with the 
> network & security setup.
>
> DDJ
>
> On Wed, Jan 4, 2023 at 12:49 PM vince  wrote:
>
>> On Tuesday, January 3, 2023 at 6:41:01 PM UTC-8 do...@dougjenkins.com 
>> wrote:
>>
>>> If you are willing to roll up your sleeves and get technical, serving 
>>> your website at home can be done safely and securely without changing your 
>>> firewall. There are some steps to do, but at the end it will save you money 
>>> and it will give you some real-world IT experience.
>>>
>>>
>> Very cool - thanks for the pointer to the video.  I hadn't previously 
>> figured out the Zero Trust terminology enough to try the tunnel stuff. I'll 
>> have to try the tunnel thing too 
>>
>> For the original poster, Doug's steps 1-3 are very easy.  I'd previously 
>> done that using Google Domains ($12/year).
>>
>> Note - you probably still want to possibly harden your weewx webserver a 
>> bit.  There are zillions of bots trying to attack web servers 'especially' 
>> all things WordPress.  If you go just with a vanilla weewx setup you're 
>> likely in very good shape straight out of the box.  Cool cheap option for 
>> sure.
>>
>> -- 
>> 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.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/56afd382-a9ba-49e7-831f-2813872d6db0n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/276e98bc-7206-4581-bbfb-51d24133e409n%40googlegroups.com.


[weewx-user] Davis VP2 reliability with Rasp Pi zero

2023-01-05 Thread iams...@gmail.com
I've been using weewx running on a Pi Zero with no other tasks. 
Unfortunately, I live in a area that suffers power losses, often during a 
weather events, so I lose that data. What typically happens is that when 
the power comes back on, I get the dreaded "..page timestamp... less than 
final timestamp..." error. The only way I have been able to address it is 
to use the memory dump and clear.

 I don't understand why this happens since the VP2 is running with battery 
backup, yet the memory on the datalogger gets corrupted. Is this an issue 
with weewx that could be addressed?

Failing that, can I address this issue by adding a backup supply to my Pi 
Zero?

Thanks!

-- 
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/c833a23b-2957-4311-882a-cda796d0c928n%40googlegroups.com.


Re: [weewx-user] Add new observation - micro_sievert_hour (4.9.1, skin Bootstrap)

2023-01-05 Thread anb...@gmail.com
Thanks Tom!

Possible to write example, how to use weewx to lookup a string format for 
new units?

Thanks

2023 m. sausio 3 d., antradienis 21:40:49 UTC+2 tke...@gmail.com rašė:

> My best guess: instead of using weewx to look up a string format for your 
> new unit, the extension gaugeengine is doing its own lookup. So it is 
> unaware of the new unit. It also is not providing a fallback, hence the 
> error.
>
> On Tue, Jan 3, 2023 at 8:01 AM anb...@gmail.com  wrote:
>
>> Hello, 
>>
>> I will be highly appreciated if someone point me what is wrong when I 
>> adding new observation.
>>
>> Contents of extensions.py as following:
>>
>> weewx.units.obs_group_dict['ion_rad'] = 'group_radex'
>> weewx.units.obs_group_dict['cpm'] = 'group_counter'
>> weewx.units.USUnits['group_radex'] = 'micro_sievert_hour'
>> weewx.units.USUnits['group_counter'] = 'cpm'
>> weewx.units.MetricUnits['group_radex'] = 'micro_sievert_hour'
>> weewx.units.MetricUnits['group_counter'] = 'cpm'
>> weewx.units.default_unit_format_dict['micro_sievert_hour'] = '%.2f'
>> weewx.units.default_unit_format_dict['cpm']  = '%.0f'
>> weewx.units.default_unit_label_dict['micro_sievert_hour'] = ' µSv/h'
>> weewx.units.default_unit_label_dict['cpm']  = ' CPM'
>>
>> Error:
>>
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: Caught 
>> unrecoverable exception in generator 'user.gaugeengine.GaugeGenerator'
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   'micro_sievert_hour'
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   Traceback (most recent call last):
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>> File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   obj.start()
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>> File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   self.run()
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>> File "/usr/share/weewx/user/gaugeengine.py", line 121, in run
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   self.gen_gauges()
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>> File "/usr/share/weewx/user/gaugeengine.py", line 224, in gen_gauges
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   ret = self.gen_gauge(gauge, plot_options, img_file)
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>> File "/usr/share/weewx/user/gaugeengine.py", line 410, in gen_gauge
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   label_format = self.units_dict['StringFormats'][target_unit]
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>> File "/usr/lib/python3/dist-packages/configobj.py", line 554, in 
>> __getitem__
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   val = dict.__getitem__(self, key)
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   KeyError: 'micro_sievert_hour'
>> Jan  3 17:00:30 raspberrypi weewx[4310] ERROR weewx.reportengine: 
>>   Generator terminated
>>
>> Many Thanks!
>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/069dc394-5a77-49b9-ab0e-78219e1456a2n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/63227a5c-ee57-4e6a-9daf-9d5fcf1542ecn%40googlegroups.com.


Re: [weewx-user] Davis VP2 reliability with Rasp Pi zero

2023-01-05 Thread Tom Keffer
It should work.

What happens if you 'pull the plug' on your VP2? Does it keep running?
Perhaps the batteries are bad?

Personally, I use a UPS for both the weewx server and the VP2 and haven't
had a memory corruption problem in at least a decade. So, you could try
that.




On Thu, Jan 5, 2023 at 11:30 AM iams...@gmail.com 
wrote:

> I've been using weewx running on a Pi Zero with no other tasks.
> Unfortunately, I live in a area that suffers power losses, often during a
> weather events, so I lose that data. What typically happens is that when
> the power comes back on, I get the dreaded "..page timestamp... less than
> final timestamp..." error. The only way I have been able to address it is
> to use the memory dump and clear.
>
>  I don't understand why this happens since the VP2 is running with battery
> backup, yet the memory on the datalogger gets corrupted. Is this an issue
> with weewx that could be addressed?
>
> Failing that, can I address this issue by adding a backup supply to my Pi
> Zero?
>
> Thanks!
>
> --
> 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/c833a23b-2957-4311-882a-cda796d0c928n%40googlegroups.com
> 
> .
>

-- 
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/CAPq0zECWO61xDGH2OuXHJJfg8CZ%2B-Ly4u3exvcOXioDPgTOsLw%40mail.gmail.com.


Re: [weewx-user] Davis VP2 reliability with Rasp Pi zero

2023-01-05 Thread iams...@gmail.com
"What happens if you 'pull the plug' on your VP2? Does it keep running? 
Perhaps the batteries are bad?

Yes, it keeps running, that is why it seems to be a weewx issue to me. In 
other words, if the Pi Zero running weewx were not connected to the VP2, 
the data logger memory would not get corrupted. In fact, weewx is able to 
recover data that was gathered during the power outage (while the Pi is 
shut down). It is only when power is *restored *that the data logger 
corruption happens. At least I assume that is really the root of the issue, 
I really don't know. All I know is that almost every time the power goes 
out, I get the record time error and all data recording and uploading stops.

I've looked into getting a UPS for the Pi, which really appears to be 
nothing more than a $15 ext phone battery, but it seems to me this is a 
weewx problem that should be addressed. Alternately, I can contact Davis to 
see what they say.
"

On Thursday, January 5, 2023 at 3:34:40 PM UTC-8 tke...@gmail.com wrote:

> It should work.
>
> What happens if you 'pull the plug' on your VP2? Does it keep running? 
> Perhaps the batteries are bad?
>
> Personally, I use a UPS for both the weewx server and the VP2 and haven't 
> had a memory corruption problem in at least a decade. So, you could try 
> that.
>
>
>
>
> On Thu, Jan 5, 2023 at 11:30 AM iams...@gmail.com  
> wrote:
>
>> I've been using weewx running on a Pi Zero with no other tasks. 
>> Unfortunately, I live in a area that suffers power losses, often during a 
>> weather events, so I lose that data. What typically happens is that when 
>> the power comes back on, I get the dreaded "..page timestamp... less than 
>> final timestamp..." error. The only way I have been able to address it is 
>> to use the memory dump and clear.
>>
>>  I don't understand why this happens since the VP2 is running with 
>> battery backup, yet the memory on the datalogger gets corrupted. Is this an 
>> issue with weewx that could be addressed?
>>
>> Failing that, can I address this issue by adding a backup supply to my Pi 
>> Zero?
>>
>> Thanks!
>>
>> -- 
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/c833a23b-2957-4311-882a-cda796d0c928n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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/7bd3876d-96a1-4c3a-82fb-c4f406234066n%40googlegroups.com.


Re: [weewx-user] Davis VP2 reliability with Rasp Pi zero

2023-01-05 Thread Graham Eddy
It is much more likely your power supply being the problem. Get a ups to smooth the spikes (dunno if rpi hat does that)⊣ GE ⊢    phone➔brevityOn 6 Jan 2023 12:46 pm, "iams...@gmail.com"  wrote:"What happens if you 'pull the plug' on your VP2? Does it keep running? Perhaps the batteries are bad?Yes, it keeps running, that is why it seems to be a weewx issue to me. In other words, if the Pi Zero running weewx were not connected to the VP2, the data logger memory would not get corrupted. In fact, weewx is able to recover data that was gathered during the power outage (while the Pi is shut down). It is only when power is restored that the data logger corruption happens. At least I assume that is really the root of the issue, I really don't know. All I know is that almost every time the power goes out, I get the record time error and all data recording and uploading stops.I've looked into getting a UPS for the Pi, which really appears to be nothing more than a $15 ext phone battery, but it seems to me this is a weewx problem that should be addressed. Alternately, I can contact Davis to see what they say."On Thursday, January 5, 2023 at 3:34:40 PM UTC-8 tke...@gmail.com wrote:It should work.What happens if you 'pull the plug' on your VP2? Does it keep running? Perhaps the batteries are bad?Personally, I use a UPS for both the weewx server and the VP2 and haven't had a memory corruption problem in at least a decade. So, you could try that.On Thu, Jan 5, 2023 at 11:30 AM iams...@gmail.com  wrote:I've been using weewx running on a Pi Zero with no other tasks. Unfortunately, I live in a area that suffers power losses, often during a weather events, so I lose that data. What typically happens is that when the power comes back on, I get the dreaded "..page timestamp... less than final timestamp..." error. The only way I have been able to address it is to use the memory dump and clear. I don't understand why this happens since the VP2 is running with battery backup, yet the memory on the datalogger gets corrupted. Is this an issue with weewx that could be addressed?Failing that, can I address this issue by adding a backup supply to my Pi Zero?Thanks!



-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c833a23b-2957-4311-882a-cda796d0c928n%40googlegroups.com.





-- 
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/7bd3876d-96a1-4c3a-82fb-c4f406234066n%40googlegroups.com.




-- 
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/709fe62a-0bad-4448-9b1f-318c3e05bb72%40email.android.com.