Re: [weewx-user] New Timespan $daylight for the time while sun is up

2023-09-29 Thread Karen K
Yes.

Mks Mk schrieb am Samstag, 30. September 2023 um 03:08:55 UTC+2:

> when it comes to coding the best we can do is copy and paste,  all we 
> wanna know is if this tag (*$daylight*) actually does work within NOAA 
> template file.
> thank you for your help
>
> On Friday, September 29, 2023 at 9:13:23 PM UTC+3 Karen K wrote:
>
>> Mks Mk schrieb am Freitag, 29. September 2023 um 19:09:10 UTC+2:
>>
>> We want to add below code or similar to its action to the NOAA monthly 
>> report file "*NOAA-%Y-%m.txt.tmpl*" but we do not know if it is possible 
>> to do so because of the span tags?
>>
>>
>>
>> Why not trying it?
>>
>> If you are not sure about the $span tag, you can replace it by something 
>> else like $ii
>>  
>>
>

-- 
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/47a6836e-5a7c-40d7-89b5-3dadc9d0eeaan%40googlegroups.com.


Re: [weewx-user] WUnderground test

2023-09-29 Thread Craig Young
Thanks Gary, this helping a lot to understand the intricate details of 
weewx.  Given this I will update my driver to pass the daily rain as 
'dayRain' and then store that as a new field in the database for later use.

On Saturday, September 30, 2023 at 5:41:12 PM UTC+13 gjr80 wrote:

> On Saturday, 30 September 2023 at 13:29:28 UTC+10 craig.y...@gmail.com 
> wrote:
>
> If I set the WU password to an invalid value then any posts from weewx to 
> WU will fail, but debug = 2 will show me the URL in the log.  That will 
> work for testing and eliminate any erroneous values showing up in the WU 
> graphs.
>
>
> You would think you would be pretty safe doing this, though with WU's 
> history nothing would surprise me. I would put a dummy station ID in as 
> well.
>
> Gary
>

-- 
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/76a8dc3b-a545-441a-ab58-88a6991ffea7n%40googlegroups.com.


Re: [weewx-user] Belchertown weekly graph

2023-09-29 Thread Lorin Tremblay
Well that might be part of my problem

Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine: 
Caught unrecoverable exception in generator 
'user.belchertown.HighchartsJsonGenerator'
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     [Errno 13] Permission denied: '/var/www/html/weewx/json/week.json'
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     Traceback (most recent call last):
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
   File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     obj.start()
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
   File "/usr/share/weewx/weewx/reportengine.py", line 385, in start
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     self.run()
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
   File "/usr/share/weewx/user/belchertown.py", line 2817, in run
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     with open(json_filename, mode="w") as jf:
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     PermissionError: [Errno 13] Permission denied: 
'/var/www/html/weewx/json/week.json'
Sep 30 00:54:55 WeeWx-APRS270 wee_reports[18415] ERROR weewx.reportengine:  
     Generator terminated


What is the best way to correct this situation….


> On 29 Sep 23, at 22:50, vince  wrote:
> 
> Well, I always suggest the old sysadmin credo of "when in doubt, comment it 
> out" in working these kinds of things.  Start slowly and get 'one' chart 
> workingand look at your syslogs.  Do yours say anything indicating a 
> problem ?
> 
> You might also save your (not working) graphs.conf file someplace and 'copy' 
> the graphs.conf.example file into place as graphs.conf which should 
> definitely work.  At a minimum it'll take your edits out of the question at 
> least temporarily
> 
> I don't remember for Belchertown if you should stop/restart weewx after 
> fiddling with graphs.conf but that might be wise in this case just in case
> 
> 
> -- 
> 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/77309976-b444-4ade-9870-28d0690d8c44n%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/7C583C37-B759-4925-95DA-0323CF8B7CCE%40gmail.com.


Re: [weewx-user] WUnderground test

2023-09-29 Thread gjr80
On Saturday, 30 September 2023 at 13:29:28 UTC+10 craig.y...@gmail.com 
wrote:

If I set the WU password to an invalid value then any posts from weewx to 
WU will fail, but debug = 2 will show me the URL in the log.  That will 
work for testing and eliminate any erroneous values showing up in the WU 
graphs.


You would think you would be pretty safe doing this, though with WU's 
history nothing would surprise me. I would put a dummy station ID in as 
well.

Gary

-- 
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/61f6b077-3328-494c-87d8-ebf750513497n%40googlegroups.com.


Re: [weewx-user] WUnderground test

2023-09-29 Thread gjr80
On Saturday, 30 September 2023 at 13:25:10 UTC+10 craig.y...@gmail.com 
wrote:

>From restx.py:
'dayRain': 'dailyrainin=%.2f',

So the daily rain amount sent to WU is from the value 'dayRain'.  Since 
this is not a database observation type, if I add a 'dayRain' field to the 
database will restx.py use that instead?


I guess this is the dayRain reference  you mentioned in your other post. 
The problem with digging into the code is that you need to read it in its 
entirety, in this case, earlier on in restx.py you will find a comment 
 that 
mentions dayRain. In my response to your other post I mentioned that some 
drivers pass on a field dayRain to WeeWX, the dayRain entry/code you found 
in restx.py will make use of the current dayRain field if it is available, 
if it is not available WeeWX will calculate the value from the rain data in 
the database. Remember, WeeWX (generally) makes all fields received from 
the driver available in the current archive record, this is irrespective of 
whether the fields exist in the database. So if the driver passes through 
dayRain, dayRain will appear in the current archive record irrespective of 
whether dayRain is in the database schema. The same thing will happen if 
dayRain is in the database schema, but in this case dayRain is also saved 
to database.

To answer your question more succinctly, if you add dayRain to the database 
restx.py will use it, but not because you added it to the database, rather 
because your station/driver passes the value to WeeWX. If the dayRain field 
is not passed to WeeWX by the station/driver WeeWX will calculate the value 
separately.

Gary

-- 
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/73847815-5a5e-42cb-9c58-c281cf3bd627n%40googlegroups.com.


Re: [weewx-user] Daily Rain

2023-09-29 Thread gjr80
So if I understand correctly, WeeWX has not seen any rain so any rain or 
rain rate fields in the database are zero. This sounds correct. Your 
station/driver is passing through a field that contains the rain since 
midnight, that is being saved in WeeWX field signal3 and your site is 
displaying the correct value. Sounds like everything is operating as 
expected.

As an aside, I am not sure which documentation contained reference to 
'dayRain', as far as I can tell the only occurrence of 'dayRain' in the 
WeeWX documentation is in the wee_import section of the Utilities Guide 
, and I 
hope you are not using wee_import to feed WeeWX.

Some stations/drivers may emit a field named dayRain that (usually) 
contains the rainfall seen by the station hardware (but not necessarily 
WeeWX) since midnight. Some stations also emit other cumulative rain fields 
such as monthRain, yearRain etc. If the driver passes such a field to WeeWX 
in a loop packet WeeWX will 'accumulate' the data and make the field 
available in archive records. The field in the current archive record is 
then available in reports via a tag something like $current.dayRain. Since 
the dayRain field is not in the database schema it is not saved to database 
(WeeWX rule of thumb: if a field exists in an archive record and the same 
field exists in the database WeeWX will automatically save the field to 
database, if either of these conditions is not met the field is not saved). 
In your case you have put the dayRain data in another field (signal3) that 
does exist in the database, so the data is saved to database albeit under a 
different name.

The reason that WeeWX does not have a field dayRain (or weekRain or 
monthRain etc) in the schema is because WeeWX rainfall data is saved in the 
field rain and saving both rain and dayRain (under any name) is really 
saving the same data twice. Some drivers may use the dayRain (or weekRain 
or monthRain etc) field to calculate the rain field (rain = the current 
dayRain value - the previous dayRain value) and some drivers will pass the 
dayRain value to WeeWX in a loop packet, but the norm is to not save dayRain 
to database.

If you use dayRain/signal3 you need to setup units groups/formats/unit 
labels for the field, alter the Seasons template to display your field and 
after the current day (where WeeWX did not see some earlier rainfall) you 
won't notice the difference. At the end of the day (no pun intended), what 
you choose to display on your site is personal choice, if it was me I would 
be using the standard Seasons skin and avoid looking at the page for the 
rest of the day :)

Gary

On Saturday, 30 September 2023 at 13:13:16 UTC+10 craig.y...@gmail.com 
wrote:

> The 'rain' observation value passed in the loop packet is the amount of 
> rain accumulated by the sensor since the last loop report.
> Sensor: accumulated rain since last loop report) ---> Database: field 
> 'rain'
>
> The 'signal3' observation value passed in the loop packet is the amount of 
> rain accumulated by the sensor since midnight (the 'midnight' of the data 
> logger).
> Sensor: accumulated rain since midnight ---> Database: field 'signal3'
>
> Rain Rate is calculated in software: 
> weewx.conf|[StdWXCalculate]|[[Calculations]]|rainRate = software
>
> So on the Seasons report, Current conditions:
>
> Rain Today: 0.0mm
> Rain Rate: 0.0 mm/hr
>
> There is a single record in the Database (due to testing and clearing 
> after each test).  The fields have:
>
> rain: 0.0
> rainRate: 0.0
> signal3: 17.87
>
> This is because it was not raining during the testing period, but was 
> raining early this morning.  That is why 0 for both rain and rainRate.  But 
> signal3 has a value of 17.87 mm, the daily rain accumulated since 
> midnight.  So on the seasons report it should look like this:
>
> Rain Today: 17.87 mm
> Rain Rate: 0.0 mm/hr
>
> Reading through the documentation I saw several references to the term 
> 'dayRain'.  So I assumed that was either a constant in weewx or a database 
> field, whether hardware or software derived.  I could not find 'dayRain' in 
> the database so I posted this query to make sure.  My question then is do I 
> make one change to weewx.conf so that all reports will use signal3 as the 
> daily rain amount, or do I need to go to each report and change them 
> individually.
>
> "Just use $current.signal3"
> Do I put this in the weewx.conf file or in the Season skin.conf file?
>
>
> Craig
>
>
>
>
>
>
>
>
> On Saturday, September 30, 2023 at 1:57:19 PM UTC+13 gjr80 wrote:
>
>> Given a number of previous threads by the OP related to writing a driver, 
>> this could be a report issue or a driver issue. Tom covered off the report 
>> issue, but if it is a driver issue then it could be a case of garbage in = 
>> garbage out. Your driver should be emitting loop packets and the rain 
>> field in each loop packet must be the rainfall seen by the s

Re: [weewx-user] WUnderground test

2023-09-29 Thread Craig Young
If I set the WU password to an invalid value then any posts from weewx to 
WU will fail, but debug = 2 will show me the URL in the log.  That will 
work for testing and eliminate any erroneous values showing up in the WU 
graphs.

On Saturday, September 30, 2023 at 1:40:12 PM UTC+13 Tom Keffer wrote:

> Thousands of WeeWX stations are posting to the WU, so I'm quite confident 
> that they're doing it correctly.
>
> Nevertheless, if you want to see what it's posting, set debug=2, and it 
> will post the URL in the log.
>
> The mapping from WeeWX fields to WU fields is specified in the dictionary 
> weewx.restx.AmbientThread._FORMATS 
> 
>
> On Fri, Sep 29, 2023 at 5:15 PM Craig Young  wrote:
>
>> I am currently sending reports to WU using a different application.  But 
>> I am now switching over to weewx and need to verify that the request being 
>> sent to WU is correct without actually sending it.  I don't want to send a 
>> barometric pressure of 200 and throw off the WU ;historical graphs.
>> Better yet, is there a 'map' which configures which report values are 
>> mapped to which request parameters in the WU request?  If there is a 
>> problem I could then go in and change the mapping and verify the test 
>> output.
>>
>> Craig
>>
>> -- 
>> 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/40c8f749-f62a-4035-a2fc-d8837daf86e5n%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/7b860588-deea-409f-935c-95be4fac0dc0n%40googlegroups.com.


Re: [weewx-user] WUnderground test

2023-09-29 Thread Craig Young
>From restx.py:
'dayRain': 'dailyrainin=%.2f',

So the daily rain amount sent to WU is from the value 'dayRain'.  Since 
this is not a database observation type, if I add a 'dayRain' field to the 
database will restx.py use that instead?


On Saturday, September 30, 2023 at 1:40:12 PM UTC+13 Tom Keffer wrote:

> Thousands of WeeWX stations are posting to the WU, so I'm quite confident 
> that they're doing it correctly.
>
> Nevertheless, if you want to see what it's posting, set debug=2, and it 
> will post the URL in the log.
>
> The mapping from WeeWX fields to WU fields is specified in the dictionary 
> weewx.restx.AmbientThread._FORMATS 
> 
>
> On Fri, Sep 29, 2023 at 5:15 PM Craig Young  wrote:
>
>> I am currently sending reports to WU using a different application.  But 
>> I am now switching over to weewx and need to verify that the request being 
>> sent to WU is correct without actually sending it.  I don't want to send a 
>> barometric pressure of 200 and throw off the WU ;historical graphs.
>> Better yet, is there a 'map' which configures which report values are 
>> mapped to which request parameters in the WU request?  If there is a 
>> problem I could then go in and change the mapping and verify the test 
>> output.
>>
>> Craig
>>
>> -- 
>> 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/40c8f749-f62a-4035-a2fc-d8837daf86e5n%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/671f1755-0397-4da8-8ecc-04a2fc3feffan%40googlegroups.com.


Re: [weewx-user] Daily Rain

2023-09-29 Thread Craig Young
The 'rain' observation value passed in the loop packet is the amount of 
rain accumulated by the sensor since the last loop report.
Sensor: accumulated rain since last loop report) ---> Database: field 'rain'

The 'signal3' observation value passed in the loop packet is the amount of 
rain accumulated by the sensor since midnight (the 'midnight' of the data 
logger).
Sensor: accumulated rain since midnight ---> Database: field 'signal3'

Rain Rate is calculated in software: 
weewx.conf|[StdWXCalculate]|[[Calculations]]|rainRate = software

So on the Seasons report, Current conditions:

Rain Today: 0.0mm
Rain Rate: 0.0 mm/hr

There is a single record in the Database (due to testing and clearing after 
each test).  The fields have:

rain: 0.0
rainRate: 0.0
signal3: 17.87

This is because it was not raining during the testing period, but was 
raining early this morning.  That is why 0 for both rain and rainRate.  But 
signal3 has a value of 17.87 mm, the daily rain accumulated since 
midnight.  So on the seasons report it should look like this:

Rain Today: 17.87 mm
Rain Rate: 0.0 mm/hr

Reading through the documentation I saw several references to the term 
'dayRain'.  So I assumed that was either a constant in weewx or a database 
field, whether hardware or software derived.  I could not find 'dayRain' in 
the database so I posted this query to make sure.  My question then is do I 
make one change to weewx.conf so that all reports will use signal3 as the 
daily rain amount, or do I need to go to each report and change them 
individually.

"Just use $current.signal3"
Do I put this in the weewx.conf file or in the Season skin.conf file?


Craig








On Saturday, September 30, 2023 at 1:57:19 PM UTC+13 gjr80 wrote:

> Given a number of previous threads by the OP related to writing a driver, 
> this could be a report issue or a driver issue. Tom covered off the report 
> issue, but if it is a driver issue then it could be a case of garbage in = 
> garbage out. Your driver should be emitting loop packets and the rain 
> field in each loop packet must be the rainfall seen by the station since 
> the last loop packet. Provided you do this WeeWX will accumulate these loop 
> packet rain values and emit the total rain for the archive period in an 
> archive packet. This is the data you will see stored in the database 
> (appropriately converted given the loop packet unit system and database 
> unit system). Once you know your incoming data is good then I would be 
> worrying about what is appearing in reports.
>
> One other thing, if comparing WeeWX 'day rainfall' to a station provided 
> equivalent remember that WeeWX calculates the 'day rainfall' value from the 
> rain data it has seen on that day, so if you start WeeWX part way through 
> the day and there was rainfall earlier in the day then the WeeWX calculated 
> total will almost certainly be less than the station provided day rainfall 
> value.
>
> Gary
>
> On Saturday, 30 September 2023 at 10:28:27 UTC+10 tke...@gmail.com wrote:
>
>> I don't know exactly what you mean when you say your rain is the "amount 
>> since last report." The field "rain" should be the amount of rain that fell 
>> during the archive period, so perhaps that's what you're already doing.
>>
>> You say, "... the Season report shows the correct rain, as reported by 
>> the station, but sets Rain Today the same as rain." 
>>
>> I'm not sure what you mean by that. The "Rain Today" is the *sum* of 
>> rain since midnight, not the rain during the current archive period. If 
>> what you mean is that it's not the same as what is being emitted by your 
>> hardware as "signal3" (aka "dayRain"), it should be. If not, there's 
>> something wrong in the calculation that derives the field "rain" from 
>> "signal3".
>>
>> Nevertheless, if you want to display exactly what is being emitted by 
>> your hardware, that's simple enough. Just use $current.signal3. But, be 
>> sure your hardware is emitting what you think it's emitting. Is it "rain 
>> since midnight"? Or, "rain over the last 24 hours"? 
>>
>> Final comment: to avoid confusing yourself, why not just use the field 
>> name "dayRain" instead of "signal3"? I know it's not in the database, but 
>> new fields are super easy to add:
>>
>> wee_database --add-column=dayRain
>>
>>
>> -tk
>>
>> On Fri, Sep 29, 2023 at 4:38 PM Craig Young  wrote:
>>
>>> My station (hardware) sends both rain (amount since last report) and 
>>> daily rain (accumulates rain).  Currently I am mapping rain to rain in the 
>>> database and daily rain to signal3 in the database because I could not find 
>>> any 'dayRain' field.  When I run weewx the Season report shows the correct 
>>> rain, as reported by the station, but sets Rain Today the same as rain.
>>> If I want the Seasons report to show the correct daily rain (from the 
>>> hardware) where should I place it in the DB and do I need to change 
>>> weewx.conf or skin.conf to use the value?
>>>
>>> Craig
>>>
>>> -- 
>

Re: [weewx-user] Re: Belchertown weekly graph

2023-09-29 Thread vince
Well, I always suggest the old sysadmin credo of "when in doubt, comment it 
out" in working these kinds of things.  Start slowly and get 'one' chart 
workingand look at your syslogs.  Do yours say anything indicating a 
problem ?

You might also save your (not working) graphs.conf file someplace and 
'copy' the graphs.conf.example file into place as graphs.conf which should 
definitely work.  At a minimum it'll take your edits out of the question at 
least temporarily

I don't remember for Belchertown if you should stop/restart weewx after 
fiddling with graphs.conf but that might be wise in this case just in 
case

-- 
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/77309976-b444-4ade-9870-28d0690d8c44n%40googlegroups.com.


Re: [weewx-user] Re: Belchertown weekly graph

2023-09-29 Thread Kidney
Yup that what's it’s named , was a typo in my email..On Sep 29, 2023, at 22:29, vince  wrote:Try naming it "graphs.conf" (plural)On Friday, September 29, 2023 at 5:58:57 PM UTC-7 Lorin Tremblay wrote:Hi!I’ve try to read on the graph documentation and having a hard time figuring out why I have no graph whatsoever in my weekly tab….I assume there is something to do with the setting in graph.confHere is my week conf….[week]    # Chart Timespan Defaults    title = "This Week"    show_button = true    button_text = "Week"    time_length = 604800 # Last 7 days    tooltip_date_format = ""    aggregate_type = max    aggregate_interval = 3600 # 1 hour    gapsize = 3600 # 1 hour in seconds    [[chart1]]        title = Temperature        [[[outTemp]]]            zIndex = 1#            name = Temperature        [[[windchill]]]        [[[inTemp]]]            color = "#4efc03"        [[[heatindex]]]            color = "#f7a35c"        [[[dewpoint]]]            color = purple    [[chart2]]        # The combined Wind Chart works best in this configuration        title = Wind Speed and Direction        yAxis_min = 0        [[[windDir]]]            zIndex = 1            yAxis = 1            yAxis_max = 360            lineWidth = 0            # Here we can override the timespan default aggregate type with our own specific to this chart            aggregate_type = avg            marker                enabled = true            states                [hover]                        lineWidthPlus = 0        [[[windGust]]]        [[[windSpeed]]]            zIndex = 2    [[chart3]]        title = Rain        [[[rainRate]]]            yAxis = 1        [[[rainTotal]]]            name = Rain Total    [[chart4]]        title = Barometer        aggregate_type = avg        [[[barometer]]]            color = "#BECC00"



-- 
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/e729a421-04cb-47f1-bde7-954b0aa19849n%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/16A58504-2613-4E17-878F-79ED337FF885%40gmail.com.


[weewx-user] Re: Belchertown weekly graph

2023-09-29 Thread vince
Try naming it "graphs.conf" (plural)

On Friday, September 29, 2023 at 5:58:57 PM UTC-7 Lorin Tremblay wrote:

> Hi!
>
> I’ve try to read on the graph documentation and having a hard time 
> figuring out why I have no graph whatsoever in my weekly tab….
>
> I assume there is something to do with the setting in graph.conf
>
> Here is my week conf….
>
> *[week]*
> # Chart Timespan Defaults
> title = "This Week"
> show_button = true
> button_text = "Week"
> time_length = 604800 # Last 7 days
> tooltip_date_format = ""
> aggregate_type = max
> aggregate_interval = 3600 # 1 hour
> gapsize = 3600 # 1 hour in seconds
>
> [[chart1]]
> title = Temperature
> [[[outTemp]]]
> zIndex = 1
> #name = Temperature
> [[[windchill]]]
> [[[inTemp]]]
> color = "#4efc03"
> [[[heatindex]]]
> color = "#f7a35c"
> [[[dewpoint]]]
> color = purple
>
> [[chart2]]
> # The combined Wind Chart works best in this configuration
> title = Wind Speed and Direction
> yAxis_min = 0
> [[[windDir]]]
> zIndex = 1
> yAxis = 1
> yAxis_max = 360
> lineWidth = 0
> # Here we can override the timespan default aggregate type 
> with our own specific to this chart
> aggregate_type = avg
> marker
> enabled = true
> states
> [hover]
> lineWidthPlus = 0
> [[[windGust]]]
> [[[windSpeed]]]
> zIndex = 2
>
> [[chart3]]
> title = Rain
> [[[rainRate]]]
> yAxis = 1
> [[[rainTotal]]]
> name = Rain Total
>
> [[chart4]]
> title = Barometer
> aggregate_type = avg
> [[[barometer]]]
> color = "#BECC00"
>
>

-- 
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/e729a421-04cb-47f1-bde7-954b0aa19849n%40googlegroups.com.


Re: [weewx-user] New Timespan $daylight for the time while sun is up

2023-09-29 Thread Mks Mk
when it comes to coding the best we can do is copy and paste,  all we wanna 
know is if this tag (*$daylight*) actually does work within NOAA template 
file.
thank you for your help

On Friday, September 29, 2023 at 9:13:23 PM UTC+3 Karen K wrote:

> Mks Mk schrieb am Freitag, 29. September 2023 um 19:09:10 UTC+2:
>
> We want to add below code or similar to its action to the NOAA monthly 
> report file "*NOAA-%Y-%m.txt.tmpl*" but we do not know if it is possible 
> to do so because of the span tags?
>
>
>
> Why not trying it?
>
> If you are not sure about the $span tag, you can replace it by something 
> else like $ii
>  
>

-- 
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/7ea17351-647b-4a3e-8345-54eaa856cd65n%40googlegroups.com.


[weewx-user] Belchertown weekly graph

2023-09-29 Thread Lorin Tremblay
Hi!

I’ve try to read on the graph documentation and having a hard time figuring out 
why I have no graph whatsoever in my weekly tab….

I assume there is something to do with the setting in graph.conf

Here is my week conf….

[week]
# Chart Timespan Defaults
title = "This Week"
show_button = true
button_text = "Week"
time_length = 604800 # Last 7 days
tooltip_date_format = ""
aggregate_type = max
aggregate_interval = 3600 # 1 hour
gapsize = 3600 # 1 hour in seconds

[[chart1]]
title = Temperature
[[[outTemp]]]
zIndex = 1
#name = Temperature
[[[windchill]]]
[[[inTemp]]]
color = "#4efc03"
[[[heatindex]]]
color = "#f7a35c"
[[[dewpoint]]]
color = purple

[[chart2]]
# The combined Wind Chart works best in this configuration
title = Wind Speed and Direction
yAxis_min = 0
[[[windDir]]]
zIndex = 1
yAxis = 1
yAxis_max = 360
lineWidth = 0
# Here we can override the timespan default aggregate type with our 
own specific to this chart
aggregate_type = avg
marker
enabled = true
states
[hover]
lineWidthPlus = 0
[[[windGust]]]
[[[windSpeed]]]
zIndex = 2

[[chart3]]
title = Rain
[[[rainRate]]]
yAxis = 1
[[[rainTotal]]]
name = Rain Total

[[chart4]]
title = Barometer
aggregate_type = avg
[[[barometer]]]
color = "#BECC00"

-- 
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/B3961CFF-BF9F-464A-BCC7-C329F8A7CA4A%40gmail.com.


Re: [weewx-user] Daily Rain

2023-09-29 Thread gjr80
Given a number of previous threads by the OP related to writing a driver, 
this could be a report issue or a driver issue. Tom covered off the report 
issue, but if it is a driver issue then it could be a case of garbage in = 
garbage out. Your driver should be emitting loop packets and the rain field 
in each loop packet must be the rainfall seen by the station since the last 
loop packet. Provided you do this WeeWX will accumulate these loop packet 
rain values and emit the total rain for the archive period in an archive 
packet. This is the data you will see stored in the database (appropriately 
converted given the loop packet unit system and database unit system). Once 
you know your incoming data is good then I would be worrying about what is 
appearing in reports.

One other thing, if comparing WeeWX 'day rainfall' to a station provided 
equivalent remember that WeeWX calculates the 'day rainfall' value from the 
rain data it has seen on that day, so if you start WeeWX part way through 
the day and there was rainfall earlier in the day then the WeeWX calculated 
total will almost certainly be less than the station provided day rainfall 
value.

Gary

On Saturday, 30 September 2023 at 10:28:27 UTC+10 tke...@gmail.com wrote:

> I don't know exactly what you mean when you say your rain is the "amount 
> since last report." The field "rain" should be the amount of rain that fell 
> during the archive period, so perhaps that's what you're already doing.
>
> You say, "... the Season report shows the correct rain, as reported by the 
> station, but sets Rain Today the same as rain." 
>
> I'm not sure what you mean by that. The "Rain Today" is the *sum* of rain 
> since midnight, not the rain during the current archive period. If what you 
> mean is that it's not the same as what is being emitted by your hardware as 
> "signal3" (aka "dayRain"), it should be. If not, there's something wrong in 
> the calculation that derives the field "rain" from "signal3".
>
> Nevertheless, if you want to display exactly what is being emitted by your 
> hardware, that's simple enough. Just use $current.signal3. But, be sure 
> your hardware is emitting what you think it's emitting. Is it "rain since 
> midnight"? Or, "rain over the last 24 hours"? 
>
> Final comment: to avoid confusing yourself, why not just use the field 
> name "dayRain" instead of "signal3"? I know it's not in the database, but 
> new fields are super easy to add:
>
> wee_database --add-column=dayRain
>
>
> -tk
>
> On Fri, Sep 29, 2023 at 4:38 PM Craig Young  wrote:
>
>> My station (hardware) sends both rain (amount since last report) and 
>> daily rain (accumulates rain).  Currently I am mapping rain to rain in the 
>> database and daily rain to signal3 in the database because I could not find 
>> any 'dayRain' field.  When I run weewx the Season report shows the correct 
>> rain, as reported by the station, but sets Rain Today the same as rain.
>> If I want the Seasons report to show the correct daily rain (from the 
>> hardware) where should I place it in the DB and do I need to change 
>> weewx.conf or skin.conf to use the value?
>>
>> Craig
>>
>> -- 
>> 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/05844ab4-75a0-435a-a2dd-d85a5ec95d02n%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/302471a5-10de-4a6c-8e95-3655f2027bebn%40googlegroups.com.


Re: [weewx-user] WUnderground test

2023-09-29 Thread Tom Keffer
Thousands of WeeWX stations are posting to the WU, so I'm quite confident
that they're doing it correctly.

Nevertheless, if you want to see what it's posting, set debug=2, and it
will post the URL in the log.

The mapping from WeeWX fields to WU fields is specified in the dictionary
weewx.restx.AmbientThread._FORMATS


On Fri, Sep 29, 2023 at 5:15 PM Craig Young 
wrote:

> I am currently sending reports to WU using a different application.  But I
> am now switching over to weewx and need to verify that the request being
> sent to WU is correct without actually sending it.  I don't want to send a
> barometric pressure of 200 and throw off the WU ;historical graphs.
> Better yet, is there a 'map' which configures which report values are
> mapped to which request parameters in the WU request?  If there is a
> problem I could then go in and change the mapping and verify the test
> output.
>
> Craig
>
> --
> 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/40c8f749-f62a-4035-a2fc-d8837daf86e5n%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/CAPq0zEAQWZvTfTpRHOSWAJONnKJudQjqUune8L7D1isrmWO-OQ%40mail.gmail.com.


[weewx-user] Re: WUnderground test

2023-09-29 Thread vince
You're probably overthinking the accuracy and reliability of something as 
'awful' as Weather Underground as a service, but if it was me I'd probably 
register a fake test-use-only station there and use weewx to post there to 
that bogus non-existent station.   When you're happy with things, just set 
weewx up to post to your real station and (presumably) delete the 
test-use-only bogus one.

On Friday, September 29, 2023 at 5:14:57 PM UTC-7 Craig Young wrote:

> I am currently sending reports to WU using a different application.  But I 
> am now switching over to weewx and need to verify that the request being 
> sent to WU is correct without actually sending it.  I don't want to send a 
> barometric pressure of 200 and throw off the WU ;historical graphs.
> Better yet, is there a 'map' which configures which report values are 
> mapped to which request parameters in the WU request?  If there is a 
> problem I could then go in and change the mapping and verify the test 
> output.
>
> Craig
>

-- 
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/511ca9f3-1ebb-4d73-8c86-3651caff6adfn%40googlegroups.com.


Re: [weewx-user] Daily Rain

2023-09-29 Thread Tom Keffer
I don't know exactly what you mean when you say your rain is the "amount
since last report." The field "rain" should be the amount of rain that fell
during the archive period, so perhaps that's what you're already doing.

You say, "... the Season report shows the correct rain, as reported by the
station, but sets Rain Today the same as rain."

I'm not sure what you mean by that. The "Rain Today" is the *sum* of rain
since midnight, not the rain during the current archive period. If what you
mean is that it's not the same as what is being emitted by your hardware as
"signal3" (aka "dayRain"), it should be. If not, there's something wrong in
the calculation that derives the field "rain" from "signal3".

Nevertheless, if you want to display exactly what is being emitted by your
hardware, that's simple enough. Just use $current.signal3. But, be sure
your hardware is emitting what you think it's emitting. Is it "rain since
midnight"? Or, "rain over the last 24 hours"?

Final comment: to avoid confusing yourself, why not just use the field name
"dayRain" instead of "signal3"? I know it's not in the database, but new
fields are super easy to add:

wee_database --add-column=dayRain


-tk

On Fri, Sep 29, 2023 at 4:38 PM Craig Young 
wrote:

> My station (hardware) sends both rain (amount since last report) and daily
> rain (accumulates rain).  Currently I am mapping rain to rain in the
> database and daily rain to signal3 in the database because I could not find
> any 'dayRain' field.  When I run weewx the Season report shows the correct
> rain, as reported by the station, but sets Rain Today the same as rain.
> If I want the Seasons report to show the correct daily rain (from the
> hardware) where should I place it in the DB and do I need to change
> weewx.conf or skin.conf to use the value?
>
> Craig
>
> --
> 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/05844ab4-75a0-435a-a2dd-d85a5ec95d02n%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/CAPq0zECRyG6sm_B5werYsgAQPf5fOnr0Jn0X82e_ajBXqR2-nQ%40mail.gmail.com.


[weewx-user] WUnderground test

2023-09-29 Thread Craig Young
I am currently sending reports to WU using a different application.  But I 
am now switching over to weewx and need to verify that the request being 
sent to WU is correct without actually sending it.  I don't want to send a 
barometric pressure of 200 and throw off the WU ;historical graphs.
Better yet, is there a 'map' which configures which report values are 
mapped to which request parameters in the WU request?  If there is a 
problem I could then go in and change the mapping and verify the test 
output.

Craig

-- 
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/40c8f749-f62a-4035-a2fc-d8837daf86e5n%40googlegroups.com.


[weewx-user] Daily Rain

2023-09-29 Thread Craig Young
My station (hardware) sends both rain (amount since last report) and daily 
rain (accumulates rain).  Currently I am mapping rain to rain in the 
database and daily rain to signal3 in the database because I could not find 
any 'dayRain' field.  When I run weewx the Season report shows the correct 
rain, as reported by the station, but sets Rain Today the same as rain.
If I want the Seasons report to show the correct daily rain (from the 
hardware) where should I place it in the DB and do I need to change 
weewx.conf or skin.conf to use the value?

Craig

-- 
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/05844ab4-75a0-435a-a2dd-d85a5ec95d02n%40googlegroups.com.


Re: [weewx-user] want to use lux value to calculate value for 'radiation'

2023-09-29 Thread Eric K
You have to restart weewx before changes made to the weewx.conf file will 
take effect.
If you've restarted weewx, you should start to see additions to the graphs, 
every 5 minutes.

On Friday, September 29, 2023 at 2:49:54 PM UTC-5 Kevin Crivelli wrote:

> Should it reflect in the graphs immediately? I was able to login to ssh 
> from work and make the change but I'm not seeing any change in the graphs
>
> On Fri, Sep 29, 2023, 3:09 PM Kevin Crivelli  wrote:
>
>> Thank you! I'm gonna try this. Let ya know how it works out 
>>
>> On Fri, Sep 29, 2023, 11:17 AM Eric Koester  wrote:
>>
>>> Kevin Crivelli,Here's what my [[Corrections]] section looks like.
>>> Mine uses '> 0' rather than 'not None'
>>>
>>> [StdCalibrate]

 [[Corrections]]
 # For each type, an arbitrary calibration expression can be 
 given.
 # It should be in the units defined in the StdConvert section.
 # Example:  foo = foo + 0.2
 radiation = luminosity * 0.00789 if luminosity > 0 else None
 lightning_distance = lightning_distance / 1.609 if 
 lightning_strike_count > 0 else None#convert distance to miles
>>>
>>>
>>> On Wed, Sep 27, 2023 at 6:49 PM Kevin Crivelli  
>>> wrote:
>>>
 [StdCalibrate]
 
 [[Corrections]]
 windDir = windDir if windSpeed > 0 else None
 lightning_distance = lightning_distance if 
 lightning_strike_count > 0 else None
 # For each type, an arbitrary calibration expression can be 
 given.
 # It should be in the units defined in the StdConvert section.
 # Example:
 foo = foo + 0.2
 radiation = luminosity/126.7 if luminosity is not None else 
 None


 On Wednesday, September 27, 2023 at 7:11:05 PM UTC-4 Eric K wrote:

> Share the [StdCalibrate]  [[Corrections]] section of your weewx.conf 
> file with us.
>
> On Wednesday, September 27, 2023 at 5:53:10 PM UTC-5 Kevin Crivelli 
> wrote:
>
> I have the same problem but this didn't work for me. any ideas?
>
> On Tuesday, May 18, 2021 at 6:04:08 PM UTC-4 Greg Troxel wrote:
>
>
> Eric K <> writes: 
>
> > The Acurite Atlas weather sensor provides a UV and a lux value, but 
> not a 
> > radiation value. 
> > I want to use this formula to calculate solar radiation from the lux 
> sensor 
> > in the Acurite Atlas: radiation = lux * 0.0079 
>
> See also 
>
> https://github.com/weewx/weewx/wiki/Watts-and-lux 
>
> -- 
 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/oWp-9LivDJo/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 weewx-user+...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/weewx-user/fc6b65b0-69be-4ec7-9763-675f62302f48n%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+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/CADh_orjKiziRwWUTK%3DgGN2Kao%3DB3n4FGRvvmTDGn355iLpDRqQ%40mail.gmail.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/f78c3866-2868-41fa-8a2b-211f71f3d5b9n%40googlegroups.com.


Re: [weewx-user] want to use lux value to calculate value for 'radiation'

2023-09-29 Thread Kevin Crivelli
Should it reflect in the graphs immediately? I was able to login to ssh
from work and make the change but I'm not seeing any change in the graphs

On Fri, Sep 29, 2023, 3:09 PM Kevin Crivelli 
wrote:

> Thank you! I'm gonna try this. Let ya know how it works out
>
> On Fri, Sep 29, 2023, 11:17 AM Eric Koester 
> wrote:
>
>> Kevin Crivelli,Here's what my [[Corrections]] section looks like.
>> Mine uses '> 0' rather than 'not None'
>>
>> [StdCalibrate]
>>>
>>> [[Corrections]]
>>> # For each type, an arbitrary calibration expression can be
>>> given.
>>> # It should be in the units defined in the StdConvert section.
>>> # Example:  foo = foo + 0.2
>>> radiation = luminosity * 0.00789 if luminosity > 0 else None
>>> lightning_distance = lightning_distance / 1.609 if
>>> lightning_strike_count > 0 else None#convert distance to miles
>>
>>
>> On Wed, Sep 27, 2023 at 6:49 PM Kevin Crivelli 
>> wrote:
>>
>>> [StdCalibrate]
>>>
>>> [[Corrections]]
>>> windDir = windDir if windSpeed > 0 else None
>>> lightning_distance = lightning_distance if
>>> lightning_strike_count > 0 else None
>>> # For each type, an arbitrary calibration expression can be
>>> given.
>>> # It should be in the units defined in the StdConvert section.
>>> # Example:
>>> foo = foo + 0.2
>>> radiation = luminosity/126.7 if luminosity is not None else None
>>>
>>>
>>> On Wednesday, September 27, 2023 at 7:11:05 PM UTC-4 Eric K wrote:
>>>
 Share the [StdCalibrate]  [[Corrections]] section of your weewx.conf
 file with us.

 On Wednesday, September 27, 2023 at 5:53:10 PM UTC-5 Kevin Crivelli
 wrote:

 I have the same problem but this didn't work for me. any ideas?

 On Tuesday, May 18, 2021 at 6:04:08 PM UTC-4 Greg Troxel wrote:


 Eric K <> writes:

 > The Acurite Atlas weather sensor provides a UV and a lux value, but
 not a
 > radiation value.
 > I want to use this formula to calculate solar radiation from the lux
 sensor
 > in the Acurite Atlas: radiation = lux * 0.0079

 See also

 https://github.com/weewx/weewx/wiki/Watts-and-lux

 --
>>> 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/oWp-9LivDJo/unsubscribe.
>>> To unsubscribe from this group and all its topics, 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/fc6b65b0-69be-4ec7-9763-675f62302f48n%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/CADh_orjKiziRwWUTK%3DgGN2Kao%3DB3n4FGRvvmTDGn355iLpDRqQ%40mail.gmail.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/CAG3iCAwkSdJJxvQnZJtC6%2B60hMsdTSv2LyLs_YXsn77NpDQGOQ%40mail.gmail.com.


Re: [weewx-user] want to use lux value to calculate value for 'radiation'

2023-09-29 Thread Kevin Crivelli
Thank you! I'm gonna try this. Let ya know how it works out

On Fri, Sep 29, 2023, 11:17 AM Eric Koester  wrote:

> Kevin Crivelli,Here's what my [[Corrections]] section looks like.
> Mine uses '> 0' rather than 'not None'
>
> [StdCalibrate]
>>
>> [[Corrections]]
>> # For each type, an arbitrary calibration expression can be given.
>> # It should be in the units defined in the StdConvert section.
>> # Example:  foo = foo + 0.2
>> radiation = luminosity * 0.00789 if luminosity > 0 else None
>> lightning_distance = lightning_distance / 1.609 if
>> lightning_strike_count > 0 else None#convert distance to miles
>
>
> On Wed, Sep 27, 2023 at 6:49 PM Kevin Crivelli 
> wrote:
>
>> [StdCalibrate]
>>
>> [[Corrections]]
>> windDir = windDir if windSpeed > 0 else None
>> lightning_distance = lightning_distance if
>> lightning_strike_count > 0 else None
>> # For each type, an arbitrary calibration expression can be
>> given.
>> # It should be in the units defined in the StdConvert section.
>> # Example:
>> foo = foo + 0.2
>> radiation = luminosity/126.7 if luminosity is not None else None
>>
>>
>> On Wednesday, September 27, 2023 at 7:11:05 PM UTC-4 Eric K wrote:
>>
>>> Share the [StdCalibrate]  [[Corrections]] section of your weewx.conf
>>> file with us.
>>>
>>> On Wednesday, September 27, 2023 at 5:53:10 PM UTC-5 Kevin Crivelli
>>> wrote:
>>>
>>> I have the same problem but this didn't work for me. any ideas?
>>>
>>> On Tuesday, May 18, 2021 at 6:04:08 PM UTC-4 Greg Troxel wrote:
>>>
>>>
>>> Eric K <> writes:
>>>
>>> > The Acurite Atlas weather sensor provides a UV and a lux value, but
>>> not a
>>> > radiation value.
>>> > I want to use this formula to calculate solar radiation from the lux
>>> sensor
>>> > in the Acurite Atlas: radiation = lux * 0.0079
>>>
>>> See also
>>>
>>> https://github.com/weewx/weewx/wiki/Watts-and-lux
>>>
>>> --
>> 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/oWp-9LivDJo/unsubscribe.
>> To unsubscribe from this group and all its topics, 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/fc6b65b0-69be-4ec7-9763-675f62302f48n%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/CADh_orjKiziRwWUTK%3DgGN2Kao%3DB3n4FGRvvmTDGn355iLpDRqQ%40mail.gmail.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/CAG3iCAzEJEsFO10AFq0B%2BbbYB2iWzi%3D-wVxTENQ0-odxOxJJEw%40mail.gmail.com.


Re: [weewx-user] New Timespan $daylight for the time while sun is up

2023-09-29 Thread Karen K
Mks Mk schrieb am Freitag, 29. September 2023 um 19:09:10 UTC+2:

We want to add below code or similar to its action to the NOAA monthly 
report file "*NOAA-%Y-%m.txt.tmpl*" but we do not know if it is possible to 
do so because of the span tags?



Why not trying it?

If you are not sure about the $span tag, you can replace it by something 
else like $ii
 

-- 
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/6fadffa2-f14c-40d8-931e-bd8b2ea9b696n%40googlegroups.com.


Re: [weewx-user] New Timespan $daylight for the time while sun is up

2023-09-29 Thread Mks Mk
Hi

We want to add below code or similar to its action to the NOAA monthly 
report file "*NOAA-%Y-%m.txt.tmpl*" but we do not know if it is possible to 
do so because of the span tags?


  
day
sunrise
sunset
avg. temperature while sun is up 
 
#for $span in $LMTmonth.daylights 
 
$span.dateTime.format("%d") 
$span.start
$span.end
$span.outTemp.avg 
 
#end for 


thank you for your help

On Monday, January 30, 2023 at 3:45:53 PM UTC+3 Rory Gillies wrote:

> Thanks Again Karen K! It needed a little bit of tweaking but now it’s 
> working great. Here’s the working code extract from week.html.tmpl:
>
>
>   #from weewx.units import ValueTuple, ValueHelper
>   #attr $dayradiationacc=0
>   #attr $n=0
>   #for $dd in $year.days
>   #set $light=$daylight(timestamp=$dd)
>   #set $dayradiation=$light.radiation.avg.raw
>
>   #if $dayradiation is not None
>   #set $dayradiationacc=$dayradiationacc+$dayradiation
>   #set $n=$n+1
>   #end if
>   #end for
>   #if $n is not None
>
>   #set $dayradiationavg=$dayradiationacc/$n
> 
>   #set 
> $dayradiation_vh=ValueHelper(ValueTuple($dayradiationavg,$unit.unit_type.radiation,'group_radiation'),formatter=$station.formatter)
>   #else
>   #set $dayradiation_vh=0
>   #end if
>
>   $dayradiation_vh 
>   $Extras.Translations[$Extras.language].avg
>
>
> I had to change the initial values for $dayradiationacc and $n to #attr= 
> rather than #set=, and I put in a test for $n is not None to avoid a divide 
> by zero error at the start of a new week / month / year before the 
> $daylight tag returns a value > 1
>
> You can see it in action here: 
> https://www.360shetland.co.uk/weather/week.html
>
> Using the standard $week.radiation.avg tag returns a very low value 
> (around 4w/sqm prior to getting this working) as it is averaging each day 
> over 24 hours.
>
> Cheers!
>
> Rory
>
> On 28 Jan 2023, at 19:45, Karen K  wrote:
>
>
> #from weewx.units import ValueTuple, ValueHelper
> #set $dayradiationacc=0
> #set $n=0
> #for $dd in $week.days
> #set $light=$daylight(timestamp=$dd)
> #set $dayradiation=$light.radiation.sum.raw
> #if $dayradiation is not None
> #set $dayradiationacc=$dayradiationacc+$dayradiation
> #set $n=$n+1
> # end if
> #end for
> #set $dayradiationavg=$dayradiationacc/$n
> #set 
> $dayradiation_vh=ValueHelper(ValueTuple($dayradiationavg,$unit.unit_type.radiation,'group_radiation'),formatter=$station.formatter)
>
> -- 
> 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/7CPWHA8azqY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> weewx-user+...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/79c7e465-551b-43dd-84d3-08a7129be8c4n%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/ba1ad1ff-1562-420e-b801-cf393212896en%40googlegroups.com.


Re: [weewx-user] want to use lux value to calculate value for 'radiation'

2023-09-29 Thread Eric Koester
Kevin Crivelli,Here's what my [[Corrections]] section looks like.
Mine uses '> 0' rather than 'not None'

[StdCalibrate]
>
> [[Corrections]]
> # For each type, an arbitrary calibration expression can be given.
> # It should be in the units defined in the StdConvert section.
> # Example:  foo = foo + 0.2
> radiation = luminosity * 0.00789 if luminosity > 0 else None
> lightning_distance = lightning_distance / 1.609 if
> lightning_strike_count > 0 else None#convert distance to miles


On Wed, Sep 27, 2023 at 6:49 PM Kevin Crivelli 
wrote:

> [StdCalibrate]
>
> [[Corrections]]
> windDir = windDir if windSpeed > 0 else None
> lightning_distance = lightning_distance if lightning_strike_count
> > 0 else None
> # For each type, an arbitrary calibration expression can be given.
> # It should be in the units defined in the StdConvert section.
> # Example:
> foo = foo + 0.2
> radiation = luminosity/126.7 if luminosity is not None else None
>
>
> On Wednesday, September 27, 2023 at 7:11:05 PM UTC-4 Eric K wrote:
>
>> Share the [StdCalibrate]  [[Corrections]] section of your weewx.conf file
>> with us.
>>
>> On Wednesday, September 27, 2023 at 5:53:10 PM UTC-5 Kevin Crivelli wrote:
>>
>> I have the same problem but this didn't work for me. any ideas?
>>
>> On Tuesday, May 18, 2021 at 6:04:08 PM UTC-4 Greg Troxel wrote:
>>
>>
>> Eric K <> writes:
>>
>> > The Acurite Atlas weather sensor provides a UV and a lux value, but not
>> a
>> > radiation value.
>> > I want to use this formula to calculate solar radiation from the lux
>> sensor
>> > in the Acurite Atlas: radiation = lux * 0.0079
>>
>> See also
>>
>> https://github.com/weewx/weewx/wiki/Watts-and-lux
>>
>> --
> 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/oWp-9LivDJo/unsubscribe.
> To unsubscribe from this group and all its topics, 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/fc6b65b0-69be-4ec7-9763-675f62302f48n%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/CADh_orjKiziRwWUTK%3DgGN2Kao%3DB3n4FGRvvmTDGn355iLpDRqQ%40mail.gmail.com.


Re: [weewx-user] mosquitto & SSL

2023-09-29 Thread Stefan Gliessmann
good catch - I had them actually *copied* ... but nevertheless, I shall
probably *link* them as I copied cert1.pem, etc ... otherwise, in three
months I will wonder why MQTT stopped working suddenly ;)


On Fri, Sep 29, 2023 at 4:35 PM Graham Eddy  wrote:

> i was expecting log file to show either file not found (misnamed) or
> permission denied (user ‘mosquitto’ not able to read). maybe need to add 
> log_type
> debug to config file to get that message. anyway, looks like you fixed
> perms problem
>
> note: if you *moved* (not copied) them from letsencrypt, better put them
> back then copy them, or the cert refresh will get confused
> *⊣GE⊢*
>
> On 30 Sep 2023, at 12:25 am, Stefan Gliessmann <
> stefan.gliessm...@gmail.com> wrote:
>
> Well - I just moved my certs from the lets encrypt dir to the
> mosquitto/cert dir and now mosquitto restarted without problems ... :)
>
>
> On Fri, Sep 29, 2023 at 3:41 PM Graham Eddy  wrote:
>
>> try sudo journalctl -u mosquitto -n 50 to see the log messages (or sudo
>> tail -50 /var/log/mosquitto/* if it puts them there instead)
>> *⊣GE⊢*
>>
>> On 29 Sep 2023, at 11:35 pm, Stefan Gliessmann <
>> stefan.gliessm...@gmail.com> wrote:
>>
>> I am trying to get my weather station web presence secure with https://
>> Therefore, I also need my MQTT server be secure via SSL.
>>
>> I followed the setup by
>> https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/
>>
>> I received my certificates from Let's encrypt and edited my mosquitto
>> config file accordingly:
>>
>>   GNU nano 6.2 /etc/mosquitto/conf.d/myconfig.conf
>>
>> persistence false
>> allow_anonymous true
>> #allow_zero_length_clientid true
>> password_file /etc/mosquitto/passwd
>> acl_file /etc/mosquitto/acl
>> # mqtt
>> #listener 1883 localhost
>> listener 8883
>> certfile /etc/letsencrypt/live/
>> weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem
>> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem
>> keyfile /etc/letsencrypt/live/
>> weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem
>> tls_version tlsv1.2
>> protocol mqtt
>> # websockets
>> listener 9001
>> certfile /etc/letsencrypt/live/
>> weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem
>> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem
>> keyfile /etc/letsencrypt/live/
>> weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem
>> protocol websockets
>>
>> every time I reboot now mosquitto, I get an error by mosquitto:
>>
>> root@weewx:/# sudo systemctl restart mosquitto.service
>> Job for mosquitto.service failed because the control process exited with
>> error code.
>> See "systemctl status mosquitto.service" and "journalctl -xeu
>> mosquitto.service" for details.
>> root@weewx:/# sudo systemctl status mosquitto.service
>> *×* mosquitto.service - Mosquitto MQTT Broker
>>  Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled;
>> vendor preset: enabled)
>>  Active: *failed* (Result: exit-code) since Fri 2023-09-29 15:32:19
>> CEST; 1s ago
>>Docs: man:mosquitto.conf(5)
>>  man:mosquitto(8)
>> Process: 542132 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
>> (code=exited, status=0/SUCCESS)
>> Process: 542133 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto
>> (code=exited, status=0/SUCCESS)
>> Process: 542134 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto
>> (code=exited, status=0/SUCCESS)
>> Process: 542135 ExecStartPre=/bin/chown mosquitto /run/mosquitto
>> (code=exited, status=0/SUCCESS)
>> Process: 542136 ExecStart=/usr/sbin/mosquitto -c
>> /etc/mosquitto/mosquitto.conf *(code=exited, status=1/FAILURE)*
>>Main PID: 542136 (code=exited, status=1/FAILURE)
>> CPU: 22ms
>>
>> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart
>> job, restart counter is at 5.
>> Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.
>> Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Start request
>> repeated too quickly.*
>> Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Failed with result
>> 'exit-code'.*
>> Sep 29 15:32:19 weewx systemd[1]: *Failed to start Mosquitto MQTT
>> Broker.*
>> root@weewx:/#
>>
>> Once I command the certificates out, mosquitto starts up fine.
>>
>> I double checked that the certificates can be read by everybody.
>>
>> Any clue what else I check for?
>>
>> TIA,
>> Stefan
>>
>>
>> --
>> 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/0fb5acdb-156e-489c-a3bb-06acfe4381a8n%40googlegroups.com
>> 
>> .
>>
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Goo

Re: [weewx-user] mosquitto & SSL

2023-09-29 Thread Graham Eddy
i was expecting log file to show either file not found (misnamed) or permission 
denied (user ‘mosquitto’ not able to read). maybe need to add log_type debug to 
config file to get that message. anyway, looks like you fixed perms problem

note: if you moved (not copied) them from letsencrypt, better put them back 
then copy them, or the cert refresh will get confused
⊣GE⊢

> On 30 Sep 2023, at 12:25 am, Stefan Gliessmann  
> wrote:
> 
> Well - I just moved my certs from the lets encrypt dir to the mosquitto/cert 
> dir and now mosquitto restarted without problems ... :)
> 
> 
> On Fri, Sep 29, 2023 at 3:41 PM Graham Eddy  > wrote:
>> try sudo journalctl -u mosquitto -n 50 to see the log messages (or sudo tail 
>> -50 /var/log/mosquitto/* if it puts them there instead)
>> ⊣GE⊢
>> 
>>> On 29 Sep 2023, at 11:35 pm, Stefan Gliessmann >> > wrote:
>>> 
>>> I am trying to get my weather station web presence secure with https://
>>> Therefore, I also need my MQTT server be secure via SSL.
>>> 
>>> I followed the setup by 
>>> https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/
>>> 
>>> I received my certificates from Let's encrypt and edited my mosquitto 
>>> config file accordingly:
>>> 
>>>   GNU nano 6.2 /etc/mosquitto/conf.d/myconfig.conf  
>>> 
>>> persistence false
>>> allow_anonymous true
>>> #allow_zero_length_clientid true
>>> password_file /etc/mosquitto/passwd
>>> acl_file /etc/mosquitto/acl
>>> # mqtt
>>> #listener 1883 localhost
>>> listener 8883
>>> certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem 
>>> 
>>> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem 
>>> 
>>> keyfile 
>>> /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem 
>>> 
>>> tls_version tlsv1.2
>>> protocol mqtt
>>> # websockets
>>> listener 9001
>>> certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem 
>>> 
>>> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem 
>>> 
>>> keyfile 
>>> /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem 
>>> 
>>> protocol websockets
>>> 
>>> every time I reboot now mosquitto, I get an error by mosquitto:
>>> 
>>> root@weewx:/# sudo systemctl restart mosquitto.service 
>>> Job for mosquitto.service failed because the control process exited with 
>>> error code.
>>> See "systemctl status mosquitto.service" and "journalctl -xeu 
>>> mosquitto.service" for details.
>>> root@weewx:/# sudo systemctl status mosquitto.service 
>>> × mosquitto.service - Mosquitto MQTT Broker
>>>  Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor 
>>> preset: enabled)
>>>  Active: failed (Result: exit-code) since Fri 2023-09-29 15:32:19 CEST; 
>>> 1s ago
>>>Docs: man:mosquitto.conf(5)
>>>  man:mosquitto(8)
>>> Process: 542132 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto 
>>> (code=exited, status=0/SUCCESS)
>>> Process: 542133 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto 
>>> (code=exited, status=0/SUCCESS)
>>> Process: 542134 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto 
>>> (code=exited, status=0/SUCCESS)
>>> Process: 542135 ExecStartPre=/bin/chown mosquitto /run/mosquitto 
>>> (code=exited, status=0/SUCCESS)
>>> Process: 542136 ExecStart=/usr/sbin/mosquitto -c 
>>> /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
>>>Main PID: 542136 (code=exited, status=1/FAILURE)
>>> CPU: 22ms
>>> 
>>> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart job, 
>>> restart counter is at 5.
>>> Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.
>>> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Start request repeated 
>>> too quickly.
>>> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Failed with result 
>>> 'exit-code'.
>>> Sep 29 15:32:19 weewx systemd[1]: Failed to start Mosquitto MQTT Broker.
>>> root@weewx:/# 
>>> 
>>> Once I command the certificates out, mosquitto starts up fine.
>>> 
>>> I double checked that the certificates can be read by everybody.
>>> 
>>> Any clue what else I check for?
>>> 
>>> TIA,
>>> Stefan
>>> 
>>> 
>>> -- 
>>> 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/0fb5acdb-156e-489c-a3bb-06acfe4381a8n%

Re: [weewx-user] mosquitto & SSL

2023-09-29 Thread Stefan Gliessmann
Well - I just moved my certs from the lets encrypt dir to the
mosquitto/cert dir and now mosquitto restarted without problems ... :)


On Fri, Sep 29, 2023 at 3:41 PM Graham Eddy  wrote:

> try sudo journalctl -u mosquitto -n 50 to see the log messages (or sudo
> tail -50 /var/log/mosquitto/* if it puts them there instead)
> *⊣GE⊢*
>
> On 29 Sep 2023, at 11:35 pm, Stefan Gliessmann <
> stefan.gliessm...@gmail.com> wrote:
>
> I am trying to get my weather station web presence secure with https://
> Therefore, I also need my MQTT server be secure via SSL.
>
> I followed the setup by
> https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/
>
> I received my certificates from Let's encrypt and edited my mosquitto
> config file accordingly:
>
>   GNU nano 6.2 /etc/mosquitto/conf.d/myconfig.conf
>
> persistence false
> allow_anonymous true
> #allow_zero_length_clientid true
> password_file /etc/mosquitto/passwd
> acl_file /etc/mosquitto/acl
> # mqtt
> #listener 1883 localhost
> listener 8883
> certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem
> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem
> keyfile /etc/letsencrypt/live/
> weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem
> tls_version tlsv1.2
> protocol mqtt
> # websockets
> listener 9001
> certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem
> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem
> keyfile /etc/letsencrypt/live/
> weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem
> protocol websockets
>
> every time I reboot now mosquitto, I get an error by mosquitto:
>
> root@weewx:/# sudo systemctl restart mosquitto.service
> Job for mosquitto.service failed because the control process exited with
> error code.
> See "systemctl status mosquitto.service" and "journalctl -xeu
> mosquitto.service" for details.
> root@weewx:/# sudo systemctl status mosquitto.service
> *×* mosquitto.service - Mosquitto MQTT Broker
>  Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled;
> vendor preset: enabled)
>  Active: *failed* (Result: exit-code) since Fri 2023-09-29 15:32:19
> CEST; 1s ago
>Docs: man:mosquitto.conf(5)
>  man:mosquitto(8)
> Process: 542132 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
> (code=exited, status=0/SUCCESS)
> Process: 542133 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto
> (code=exited, status=0/SUCCESS)
> Process: 542134 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto
> (code=exited, status=0/SUCCESS)
> Process: 542135 ExecStartPre=/bin/chown mosquitto /run/mosquitto
> (code=exited, status=0/SUCCESS)
> Process: 542136 ExecStart=/usr/sbin/mosquitto -c
> /etc/mosquitto/mosquitto.conf *(code=exited, status=1/FAILURE)*
>Main PID: 542136 (code=exited, status=1/FAILURE)
> CPU: 22ms
>
> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart
> job, restart counter is at 5.
> Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.
> Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Start request
> repeated too quickly.*
> Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Failed with result
> 'exit-code'.*
> Sep 29 15:32:19 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*
> root@weewx:/#
>
> Once I command the certificates out, mosquitto starts up fine.
>
> I double checked that the certificates can be read by everybody.
>
> Any clue what else I check for?
>
> TIA,
> Stefan
>
>
> --
> 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/0fb5acdb-156e-489c-a3bb-06acfe4381a8n%40googlegroups.com
> 
> .
>
>
> --
> 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/wP9f-eDW6tk/unsubscribe.
> To unsubscribe from this group and all its topics, 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/049C6B06-B1C3-4335-A1A3-B690452E44B1%40geddy.au
> 
> .
>

-- 
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/CACXWM9Rx8n03ZtFY%3DKjAn%

Re: [weewx-user] mosquitto & SSL

2023-09-29 Thread Stefan Gliessmann
root@weewx:/# sudo journalctl -u mosquitto -n 50

Sep 29 15:31:52 weewx mosquitto[542060]: 1695994312: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:31:52 weewx systemd[1]: *mosquitto.service: Main process exited,
code=exited, status=1/FAILURE*

Sep 29 15:31:52 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:31:52 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:31:52 weewx systemd[1]: mosquitto.service: Scheduled restart job,
restart counter is at 5.

Sep 29 15:31:52 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:31:52 weewx systemd[1]: *mosquitto.service: Start request
repeated too quickly.*

Sep 29 15:31:52 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:31:52 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:32:18 weewx systemd[1]: Starting Mosquitto MQTT Broker...

Sep 29 15:32:18 weewx mosquitto[542113]: 1695994338: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Main process exited,
code=exited, status=1/FAILURE*

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:32:18 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:32:18 weewx systemd[1]: mosquitto.service: Scheduled restart job,
restart counter is at 1.

Sep 29 15:32:18 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:32:18 weewx systemd[1]: Starting Mosquitto MQTT Broker...

Sep 29 15:32:18 weewx mosquitto[542119]: 1695994338: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Main process exited,
code=exited, status=1/FAILURE*

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:32:18 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:32:18 weewx systemd[1]: mosquitto.service: Scheduled restart job,
restart counter is at 2.

Sep 29 15:32:18 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:32:18 weewx systemd[1]: Starting Mosquitto MQTT Broker...

Sep 29 15:32:18 weewx mosquitto[542125]: 1695994338: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Main process exited,
code=exited, status=1/FAILURE*

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:32:18 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:32:18 weewx systemd[1]: mosquitto.service: Scheduled restart job,
restart counter is at 3.

Sep 29 15:32:18 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:32:18 weewx systemd[1]: Starting Mosquitto MQTT Broker...

Sep 29 15:32:18 weewx mosquitto[542130]: 1695994338: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Main process exited,
code=exited, status=1/FAILURE*

Sep 29 15:32:18 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:32:18 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart job,
restart counter is at 4.

Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:32:19 weewx systemd[1]: Starting Mosquitto MQTT Broker...

Sep 29 15:32:19 weewx mosquitto[542136]: 1695994339: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Main process exited,
code=exited, status=1/FAILURE*

Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:32:19 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart job,
restart counter is at 5.

Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Start request
repeated too quickly.*

Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Failed with result
'exit-code'.*

Sep 29 15:32:19 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

Sep 29 15:36:37 weewx systemd[1]: Starting Mosquitto MQTT Broker...

Sep 29 15:36:37 weewx mosquitto[542525]: 1695994597: Loading config file
/etc/mosquitto/conf.d/myconfig.conf

Sep 29 15:36:37 weewx systemd[1]: Started Mosquitto MQTT Broker.


Mosquitto has issues with reading my mosquitto/conf.d/myconfig.conf when
the certificates are active.

It works fine when certificates are commanded out ...




On Fri, Sep 29, 2023 at 3:41 PM Graham Eddy  wrote:

> try sudo journalctl -u mosquitto -n 50 to see the log messages (or sudo
> tail -50 /var/log/mosquitto/* if it puts them there instead)
> *⊣GE⊢*
>
> On 29 Sep 2023, at 11:35 pm, Stefan Gliessmann <
> stefan.gliessm...@gmail.com> wrote:
>
> I am trying to get my weather station web presence secure with https://
> Therefore, I also need 

Re: [weewx-user] mosquitto & SSL

2023-09-29 Thread Graham Eddy
try sudo journalctl -u mosquitto -n 50 to see the log messages (or sudo tail 
-50 /var/log/mosquitto/* if it puts them there instead)
⊣GE⊢

> On 29 Sep 2023, at 11:35 pm, Stefan Gliessmann  
> wrote:
> 
> I am trying to get my weather station web presence secure with https://
> Therefore, I also need my MQTT server be secure via SSL.
> 
> I followed the setup by 
> https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/
> 
> I received my certificates from Let's encrypt and edited my mosquitto config 
> file accordingly:
> 
>   GNU nano 6.2 /etc/mosquitto/conf.d/myconfig.conf
>   
> persistence false
> allow_anonymous true
> #allow_zero_length_clientid true
> password_file /etc/mosquitto/passwd
> acl_file /etc/mosquitto/acl
> # mqtt
> #listener 1883 localhost
> listener 8883
> certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem
> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem
> keyfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem
> tls_version tlsv1.2
> protocol mqtt
> # websockets
> listener 9001
> certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem
> cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem
> keyfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem
> protocol websockets
> 
> every time I reboot now mosquitto, I get an error by mosquitto:
> 
> root@weewx:/# sudo systemctl restart mosquitto.service 
> Job for mosquitto.service failed because the control process exited with 
> error code.
> See "systemctl status mosquitto.service" and "journalctl -xeu 
> mosquitto.service" for details.
> root@weewx:/# sudo systemctl status mosquitto.service 
> × mosquitto.service - Mosquitto MQTT Broker
>  Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor 
> preset: enabled)
>  Active: failed (Result: exit-code) since Fri 2023-09-29 15:32:19 CEST; 
> 1s ago
>Docs: man:mosquitto.conf(5)
>  man:mosquitto(8)
> Process: 542132 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto 
> (code=exited, status=0/SUCCESS)
> Process: 542133 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto 
> (code=exited, status=0/SUCCESS)
> Process: 542134 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto 
> (code=exited, status=0/SUCCESS)
> Process: 542135 ExecStartPre=/bin/chown mosquitto /run/mosquitto 
> (code=exited, status=0/SUCCESS)
> Process: 542136 ExecStart=/usr/sbin/mosquitto -c 
> /etc/mosquitto/mosquitto.conf (code=exited, status=1/FAILURE)
>Main PID: 542136 (code=exited, status=1/FAILURE)
> CPU: 22ms
> 
> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart job, 
> restart counter is at 5.
> Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.
> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Start request repeated 
> too quickly.
> Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Failed with result 
> 'exit-code'.
> Sep 29 15:32:19 weewx systemd[1]: Failed to start Mosquitto MQTT Broker.
> root@weewx:/# 
> 
> Once I command the certificates out, mosquitto starts up fine.
> 
> I double checked that the certificates can be read by everybody.
> 
> Any clue what else I check for?
> 
> TIA,
> Stefan
> 
> 
> -- 
> 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/0fb5acdb-156e-489c-a3bb-06acfe4381a8n%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/049C6B06-B1C3-4335-A1A3-B690452E44B1%40geddy.au.


[weewx-user] mosquitto & SSL

2023-09-29 Thread Stefan Gliessmann
I am trying to get my weather station web presence secure with https://
Therefore, I also need my MQTT server be secure via SSL.

I followed the setup 
by https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/

I received my certificates from Let's encrypt and edited my mosquitto 
config file accordingly:

  GNU nano 6.2 /etc/mosquitto/conf.d/myconfig.conf 
 

persistence false

allow_anonymous true

#allow_zero_length_clientid true

password_file /etc/mosquitto/passwd

acl_file /etc/mosquitto/acl

# mqtt

#listener 1883 localhost

listener 8883

certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem

cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem

keyfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem

tls_version tlsv1.2

protocol mqtt

# websockets

listener 9001

certfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/cert.pem

cafile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/chain.pem

keyfile /etc/letsencrypt/live/weewx.bz3gfkrlqtrsc3sv.myfritz.net/privkey.pem

protocol websockets


every time I reboot now mosquitto, I get an error by mosquitto:


root@weewx:/# sudo systemctl restart mosquitto.service 

Job for mosquitto.service failed because the control process exited with 
error code.

See "systemctl status mosquitto.service" and "journalctl -xeu 
mosquitto.service" for details.

root@weewx:/# sudo systemctl status mosquitto.service 

*×* mosquitto.service - Mosquitto MQTT Broker

 Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor 
preset: enabled)

 Active: *failed* (Result: exit-code) since Fri 2023-09-29 15:32:19 
CEST; 1s ago

   Docs: man:mosquitto.conf(5)

 man:mosquitto(8)

Process: 542132 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto 
(code=exited, status=0/SUCCESS)

Process: 542133 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto 
(code=exited, status=0/SUCCESS)

Process: 542134 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto 
(code=exited, status=0/SUCCESS)

Process: 542135 ExecStartPre=/bin/chown mosquitto /run/mosquitto 
(code=exited, status=0/SUCCESS)

Process: 542136 ExecStart=/usr/sbin/mosquitto -c 
/etc/mosquitto/mosquitto.conf *(code=exited, status=1/FAILURE)*

   Main PID: 542136 (code=exited, status=1/FAILURE)

CPU: 22ms


Sep 29 15:32:19 weewx systemd[1]: mosquitto.service: Scheduled restart job, 
restart counter is at 5.

Sep 29 15:32:19 weewx systemd[1]: Stopped Mosquitto MQTT Broker.

Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Start request 
repeated too quickly.*

Sep 29 15:32:19 weewx systemd[1]: *mosquitto.service: Failed with result 
'exit-code'.*

Sep 29 15:32:19 weewx systemd[1]: *Failed to start Mosquitto MQTT Broker.*

root@weewx:/# 


Once I command the certificates out, mosquitto starts up fine.


I double checked that the certificates can be read by everybody.


Any clue what else I check for?


TIA,

Stefan


-- 
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/0fb5acdb-156e-489c-a3bb-06acfe4381a8n%40googlegroups.com.