Re: [weewx-user] Handling scarce external data

2020-05-20 Thread Pila
This possibly returns me to my first try. Why the line_gap_fraction has no 
effect? It describes the problem perfectly. I have a gap in the data. But 
neither data points are connected nor even shown when they are in the gap..

If there is a time gap in the data, the option line_gap_fraction controls 
how line plots will be drawn.

-- 
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/3159b06e-7d5a-4c50-b162-fc6e85030ab7%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-20 Thread Pila
Precisely what I found out: there are no (soilTemp2 = '' ) records, records 
are either: (soilTemp2 IS NULL) or (soilTemp2 > 1). There is no third 
option.

But, what stil bugs me: Plot does not acknowledge in any way (dot, segment 
nor anything) sporadic data in soilTemp2 field. If data is in every 5 
minutes spaced records - all is well. As soon as one record has an empty 
soilTemp2 field, plot breaks. It does not display dot alone or segment 
alone. Nothing. Plot resumes only when both neighbour records have data in 
the field soilTemp2.

But OK, I can try this variants now :) 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/8dd45854-b84c-494e-8294-e9374cd50519%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-20 Thread Pila
If a line has an embedded value of None, it is considered to be two 
separate line segments, regardless of the setting of gap_fraction. So, I 
would suggest leaving the data value out entirely, rather than setting it 
to None.
>
>
> Does that make sense?
>
>
I believe I got it! I think my problem is with using the pond.py to read 
the data and how it reacts when the field is empty. If I understand well, a 
command:

event.record['leafTemp1'] = float(value[0])

will add the data to the database even if nothing is there to be add. 
Instead of simply skipping the add operation, it will add empty data 
represented by None. None breaks line in plot. If the above line would not 
execute, nothing would be placed in the database and the line would not be 
broken.

Now I save something in each pass: real data or "Hey, this is empty!". 
Instead, I want to save the data only once per hour and nothing in between!

I do not know Python but am a programmer. I expected this in pond.py should 
fix the issue:
if value[0]: 
   event.record['leafTemp1'] = float(value[0])

I tried this but it seems to not work. But, if I am on the right track, I 
may have been to quick. To test, I can clear the fields between 
measurements.

  

-- 
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/1e3e3177-4e1c-4e62-a51c-4ba746930079%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-19 Thread Pila
Plot will not draw line when data points are one hour apart. Only when data 
points are 5 minutes apart, line will be plotted.

But, since I am unable to fix python breaking when a field is missing, I 
can not continue.

-- 
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/5b63ac31-f321-430c-8799-4b122c136b2a%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-19 Thread Pila
Not working. I have two problems.

1) First location has this sporadic (hourly) temp as the last temp it is 
reading from pond.txt. When the field is empty, it logs "pond: cannot read 
value: could not convert string to float:." as defined in pond.py. When 
there is a temp, it is properly added to the database. If it matters, new 
sporadic data is saved at :15 minutes each hour. 

The plot is ignoring all the data saved at one hour interval. Plotting 
stopped with the last datappint saved at 5 min interval. Last plotted 
datapoint was at 13:15. All further hourly datapoints starting from 14:15 
to 20:15 inclusive are not ploted. After I reverted to the old way, from 
20:30 data is plotted again from that point on.

That particular plot displays 3 different temperatures: other 2 are being 
saved at 5 min intervals.

2) Second location apparently breaks after the empty field, when I save the 
hourly data into the second position at the pond.txt. like ",24.1" without 
quotes. Pond.py never loads the number after the empty field and the comma 
to the database. As soon as I reverted to saving both temps, both fields 
are being read correctly.

What to save as an empty field so that pond.py does not break further 
reading after the empty field? There is no data, logically, I shouldn't 
save anything there. Seems like Python problem? I do not know Python. 
Should I read data differently?

I am saving data into pond.txt like this:
Location 1:
23.4,21.8,22.4,23.3,18.0,17.4
Location 2:
18,24.1

Reading it with code modified to read multiple comma separated fields:

with open(self.filename) as f:
   line = f.readline()
   value = line.split(',')
   syslog.syslog(syslog.LOG_DEBUG, "pond: found value of %s" % value)
event.record['leafTemp1'] = float(value[0])
event.record['extraTemp2'] = float(value[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/ac9eabf1-8170-43de-9958-090d8f537c1a%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-19 Thread Pila
I misspoke :( I was pulling the data every hour but it was kept available 
to WeeWx to read it for the entire hour, not just once per observation. I 
left it that way as I could not fix the plot gaps.

I adjusted for both sporadic observations to be available to WeeWx only 
once. WeeWx saves all the other data every 5 minutes. But now: graphs do 
not even show this lone data points. One is the temperature observation 
every hour (may be several hours) and the second is the sea temperature 
with 3 observations per day. Two different locations, separate computers 
and installations, no new data plots for these any of these observations. 
Everything else works as normal. Graphs are updated regularly.

My program places the data when it is available to pond.txt (at say 13th 
min). Leaves it to be read by WeeWx at 15th min and then my program removes 
the data at 18th min. The index page shows correctly the last existing 
observations. Hence, I believe data is correctly added into the database. 

As for pot: I am using line_gap_fraction. Docs are very brief. it is 
written:

... No line_gap_fraction specified ... to connect data points. The only 
thing I can do is to add:

line_gap_fraction = 0

and it seems to be ignored. No data points and nothing connected since I 
changed availability of the data from permanent to single observation only 
when the new one exists.

Another related question arose. WeeWx reads my data using pond.py. How, 
that I have started serving it empty fields, it logs a line:

pond: cannot read value: could not convert string to float

Data is prepared for pond.py and saved to pond.txt like this:

18,24.4 (both temps available)

or

,24.4   (no sea, only air)

or just a , (only comma in the pond.txt) when no data is to be read by the 
WeeWx.

Is that a problem? They are not logged as errors, but observation of a 
fact: no data to read.

-- 
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/e84214d2-f8da-476d-89f3-e677ac07d644%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-19 Thread Pila
2. Use aggregate type 'last'. It will return the last non-null value. For 
example,
>
>
> The last measured sea temperature is $day.seaTemperature.last at 
> $day.seaTemperature.lasttime
>
> You don't want to use $latest.seaTemperature because that would give you 
> seaTemperature in the last record of the database, which is likely to be 
> null.
> pond.txt for reading 60 minutes and remove it at 9:18. No data is 
> available for reading until new data is read
>
> Thanks! I am glad to confirm .last does perfectly what I mistakenly tried 
to achieve with latest. 

I have adjusted my program to provide the sea temp only when new 
measurement is available, so by tomorrow, I should have few separate rare 
data points to play with.

Doing that, I recalled I am already adding hourly temperature at this other 
location, I added it to the plot. Plot connects hourly temp points well. I 
just do not like square form of hourly data so I am off looking how to make 
lines connecting  data points round :)

Progress is made :) Many thanks for the nudge in the right direction!

-- 
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/30e8365b-8fcd-4fc6-8263-835807b496e1%40googlegroups.com.


Re: [weewx-user] Handling scarce external data

2020-05-19 Thread Pila
To make things shorter: OK, thanks, I will try but this is a slow thing to 
test :))

This sea temp is not important and I would avoid building anything separate 
for it. It is being displayed together with external temp. As I am pulling 
it now fir days, I can see there are 3 values every day: 8:00, 14:00 and 
15:00 every day.

I am pulling this data from our national Weather service and extract 
temperatures. Then save them to be read by the pond.py. Interval for saving 
data is 5 minutes for everything.

Last night, I started another instance of the same problem. I am trying to 
find a better position for my external weather sensors. So, I keep one at 
its usual place were it is affected by the building (too high if sunny). 
Second sensor I moved to potentially better place. For a reference, I am 
pulling official temperature as I dowith the sea above, but I get it only 
once per hour with 13 minute delay from the full hour. 

So, If I repeat saving this same temp for entire hour (as I do now) and 
other 2 sensors I get and save new data every 5 minutes, this one plot line 
gets quite jagged. It would be better if I can save data as I get it - once 
per hour) and connect points with smooth line. But, since I did not manage 
to do it with the sea temp, I did not even try it with this hourly temp.

-- 
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/3d3f4e0b-863a-46a0-9fa4-76ad3a7bff05%40googlegroups.com.


[weewx-user] Handling scarce external data

2020-05-10 Thread Pila
I have added one measurement (sea temperature) to WeeWx, which I get 
probably only 3 times a day. How to handle such scarce data source? As 
there are multiple variables which should be balanced here, I would 
appreciate pointers. Small amount of data points makes for annoyingly slow 
testing. 

Theoretical maximum is 6 measurements from 7:00 to 17:00 but the frequency 
depends on the location. Temperature will vary mostly 1 deg C between 
measurements, rarely 2 degs. The number of measurements may vary. I get new 
data when it is available and my system knows know this is a new 
measurement. Currently, measurements are made at 8:00, 14:00 and 15:00. I 
have two questions.

1) I would like normal day/week/month graphs with all points connected. 
Data from my weather station is saved once in 5 minutes. I use example set 
by pond.py to read data as extraTemp1. I see 3 ways to supply the data to 
pond.py.

a) Save the data and have it available for only one reading. E.g. save it 
at 8:13, it is read by WeeWx at 8:15 and removed from pond.txt at 8:18. 
Until new data arrives, nothing is to be read by WeeWx into this field. I 
just turned this mode on to test it again.

b) I could have one reading available for one hour (or some other 
duration). 8:00 reading is being received by my system at 8:18. I can leave 
it available at pond.txt for reading 60 minutes and remove it at 9:18. No 
data is available for reading until new data is read

c) Let the data be available until replaced with the new data. This I tried 
last day and it makes for a very jagged and wrong plot. It keeps the last 
temp from yesterday (the highest) overnight and it drops suddenly at 8:00 
the next morning to the lowest temperature.

Logically, I should collect data using a) and have it plotted with line 
connected. I tried it briefly with line_gap_fraction = 0 to connect my 
scarce data points but I still had breaks.

2) on the index page where the current values are, I should always see the 
last standing value. Longest interval with no data is between 15:00 and 
8:00 the next day. This is related to above methods a) and b). In the 
skin's index.html.tmpl I tried replacing $current.extraTemp1 with 
$latest.extraTemp1 but I was getting N/A.

I limit yscale to something like 15,25,1 to see the trends better.

Maybe I was to quick in testing a) and something did not refresh or 
regenerate. Since multiple features need to be balanced, I may have failed 
to see the desired result using method a) which I am retesting again.

-- 
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/a0cb5a23-f0dd-494f-99cf-6f0a69bdaddc%40googlegroups.com.


Re: [weewx-user] Re: anti_alias shrinks plot letters

2020-01-16 Thread Pila
Thanks, you are absolutelly right! Now I can see it easily: skin.conf 
points to non-existing fonts. Yes, docs says what will happend in such 
case, but...

I added a font, entered it into the skin.conf and now anti_alias = 3 does 
perfect job of smoothing nervous DS18B20 IC digital temperature sensors and 
I can read everything nicely :).

[image: daySmarttemp prozori 3.png]


Thanks again! Now it is easy to check various heating zones and check how 
my SmartHome heating is doing its job.



-- 
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/a6a54f8a-9ab1-4117-97e3-e89ee0135141%40googlegroups.com.


[weewx-user] Re: anti_alias shrinks plot letters

2020-01-11 Thread Pila
Thanks to gjr80, now I finally see in color :) So, this second part of my 
post is now solved. Answer was: I was using HTML color RGB codes and colors 
must be BGR.

-- 
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/42a117ae-837f-46b8-958d-c194e0b96c93%40googlegroups.com.


Re: [weewx-user] Re: US - Metric problem

2020-01-11 Thread Pila
Ye! Thank you! Since I did not see any particular explanation, I 
entered HTML colour codes :) Figuring, it is going to HMTL page.

This sentence of yours certanly should find its way to docs :)) 

-- 
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/5d9edb29-83cd-4b85-8028-9bbcf9b03e6f%40googlegroups.com.


[weewx-user] anti_alias shrinks plot letters

2020-01-11 Thread Pila


[image: daySmarttemp alias1.png]  


If I change Smartphone skin.conf anti_alias from 1 to 2, plots clean up 
nicely but all letters shrink to illegible size, as evidenced by attached 
plots. Why would anti_alias affect letters at all? 

What is a solution? To change all plot letter sizes manually back to 
regular size experimenting what it is?

Plus, this illustrates my inability to change plot line colors. I have 
defined:
chart_line_colors = 0xff, 0xff, 0x00cc00, 0xffc300
red, blue, green and yellow but my plots are ignoring me completely. Both 
order and colors are wrong. Where this cyan came from?


-- 
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/4d437493-e461-4394-adff-f60d9fc10626%40googlegroups.com.


Re: [weewx-user] Re: US - Metric problem

2020-01-10 Thread Pila
That is what was confusing me. To my belief, I use only metric and my 
WS2080 also uses only metric. So I expected this recognized type to be 
handled well. Problem with great programs is that they are big :) with lots 
of features and it takes months to get aquainted with their terminology as 
a new user.

But, since I did found how to convert the database to metric, all is well. 
I also added extraTemp4.

Now, I have a silly problem: I am unable to specify plot colours for my 4 
series. I was reading docs and believe I am doing it right. My colors are 
simply ignored and my 4th series is in cyan (light blue). I did in:

/home/weewx/skins/Smartphone/skin.conf

define my colours:

chart_line_colors = 0xff, 0xff, 0x00cc00, 0xFFC300

They are: red, blue, green and yellow. When I generate my plots, I get: 
blue, red, green, cyan in that order. What am I doing wrong? 







-- 
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/b4c87e13-9718-4fa2-b25c-dfc7e535023c%40googlegroups.com.


[weewx-user] US - Metric problem

2020-01-09 Thread Pila
I use exclusively metric units. I am adding extra Celsius temperatures to 
the database. Unfortunatelly for me, when I was building this particular 
system, I neglected to switch the database from US to Metric units 
(target_unit).

1) WeeWx is correctly reading my extraTemp1 as 18.4 but is saving it in F. 
So, my graph shows -8C instead of 18C. How can I tell WeeWx this input unit 
is C and not F?

2) Is there a (relatively) simple way of converting my existing database 
from US to Metric units? Google assumes I am illiterate so I can not find 
an answer. I am sure this will byte me again, so I would prefer to convert 
and have all my bases in Metric units.

-- 
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/99c8e325-c318-4422-8b56-f9b4d952d631%40googlegroups.com.


[weewx-user] can WeeWx be instaleld on LibreElec RPi?

2019-10-22 Thread Pila
Can I manually install WeeWx on an LibreElec RPi 3? It has Python 2.7.11 
instaleld on it.

Later, I would use different setup, but for the testing at the moment, I 
would need to run WeeWx for some time from an RPi with LE running.

-- 
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/f818679e-b1de-4723-bbbf-b94116dec705%40googlegroups.com.


Re: [weewx-user] Re: how to test for null data

2019-10-13 Thread Pila
I have cut power to a Fine Offset. After a restart, it is still waiting to set 
the clock automatically. Wrong time may remain for hours if not days. I can not 
say at the moment, it was 90 minutes ago.

According to plots, WeeWx seems to read and interpret the data correctly during 
this 90 minutes.

I would appreciate confirmation if the following statements are true.

Wrong time stamps from the weather station are not spoiling the data as being 
read by the WeeWx. I can leave time be wrong until it is set automatically. I 
can not set the FO internal time from a connected RPI Zero.

-- 
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/2FD73E15-5ECB-45BA-8B29-F91E84467D62%40gmail.com.


Re: [weewx-user] Re: how to test for null data

2019-10-13 Thread Pila
Fine Offset WS1080 using its factory USB cable and no batteries, draws mostly 
below 40 mA or tad below 0,2W. Maximal draw is 50 mA (0,26 w) with lights on.

-- 
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/B8EF3E12-E713-4E63-84C4-4E48F7C3D539%40gmail.com.


[weewx-user] Re: how to test for null data

2019-10-11 Thread Pila
For people in need of switching USB power to Fine Offset should it be 
needed, I have a news I did not find is published.

There is another switchable USB hub that is currently available. Plus, it 
is one of the quite rare hubs not backfeeding power to the RPi (or any 
other device) controling it!

Transcend USB 3.0 Hub 4 Port Powered Hub3 

Take care: there is almost identical HUB2 which does not have external 
Power Supply. I am talking about the HUB3. Back is labeled: TS-HUB3K. Power 
supply is declared at 18W.

mine are identified as:
ID 8564:4000 Transcend Information, Inc. RDF8

All 4 ports respond to power commands, but only port 1 actually kills the 
power. This is the single port on the side - FO should go there.

Power stability is not excellent, we may call it very good:
4,85v @ 0,94A
4.75v @ 1,62A 
4.74v @ 1,86A

For RPi running WeeWx and a Fine Offset, I would not expect problems with 
both RPi and FO powered from it. WeeWx should have no problem controling 
power to the FO using this hub (I did not verify WeeWX control of the hub!).

Hopefully, they did not "improve" it with new revisions cheaper to produce. 
Mine were made in 2016.

-- 
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/068aa482-8307-4b6b-950d-d5afc2c5c243%40googlegroups.com.


Re: [weewx-user] Re: minmax and maxmin with span killing page?

2019-10-11 Thread Pila
I did similarly. This add on report is being run by my script 3 minutes after 
midnight generating a report for midnight. It is on a 4 RPI Zero, better to not 
run out too at midnight. Clumsy but it works. 

Now I have a very good numerical description of minimums and maximums in last 7 
and last 30 days graphs in the Smartphone skin. 

As I am using Weewx only briefly, I am mostly unfamiliar with it. I am not 
certain what can I safely remove from this add on report config files. So, 
slowly... The first thing is to understand it and test if it can do what I need 
it to do.

Of course, the proper solution for me would be to fix it in a source code to 
achieve seamless consistent use of maxmin and minmax. Should I continue using 
it, that will have to wait until I learn Phyton. For now, I am unable to reduce 
graph margins.


Na 11. listopada 2019. 01:53:17 CEST, gjr80  wrote:
>Whilst it is true that the report_timing option 
><http://weewx.com/docs/customizing.htm#_The_report_timing_option_>
>
>only works down to the report level (ie it cannot discriminate between 
>templates) this is easily overcome with a little lateral thinking. 
>Duplicate the skin (with a unique name of course) containing the
>template 
>concerned and then disable/remove all other reports from the duplicated
>
>skin. Add a new entry under [StdReport] in weewx.conf for the duplicate
>
>skin with the desired report_timing option.
>
>Gary
>
>On Friday, 11 October 2019 08:23:43 UTC+10, Pila wrote:
>>
>> Yup. An extremely ugly fix to a problem for which I claim should not
>have 
>> existed. Works. I just hope it is not doing to a database something.
>>
>>
>> Na 10. listopada 2019. 15:47:53 CEST, Andrew Milner
>> > wrote:
>>>
>>> I think you can run wee_reports manually or via cron with a
>different 
>>> .conf (and therefore different skin(s)) specified.  this would
>permit just 
>>> doing the report(s) you wanted, at time you desire.
>>>
>>>
>>>
>>> On Thursday, 10 October 2019 14:45:53 UTC+3, Pila wrote:
>>>>
>>>> Yes, using span delta means I am using now as the starting point.
>That 
>>>> was I wanted to acheve.
>>>>
>>>> minmax: $span(day_delta=7).outTemp.minmax
>>>> maxmin: $span(day_delta=7).outTemp.maxmin
>>>>
>>>> I tried running a report with a midnight time, and it creates
>desired 
>>>> minmax spans, as you correctly stated. Any other time, it skips
>generating 
>>>> the page with no interactive display of the fault, only in the log.
>>>>
>>>> But now, my problem is how to create minmax lines on the midnight
>and 
>>>> reuse them entire day? report_timing option in weewx.conf is for
>enitre 
>>>> reports. That does not fit the bill. 
>>>>
>>>> I need a weekly and monthtly minmax / maxmin lines under the week
>and 
>>>> month OutTemp graphs. Closest to the usable idea I have:
>>>>
>>>> 1) in skin.conf, create two templates (for the two maxmin+minmax
>lines, 
>>>> one for week one for month)
>>>>
>>>> 2) include them to temp.html.tmpl
>>>>
>>>> But, I am unable to find a solution to create these two files at 
>>>> midnight only and reuse them the rest of the day? Can I, in a
>skin.conf, do 
>>>> somethng like:
>>>>
>>>> [ $(date +"%H:%M") == "00:00" ] && create_templates || skip
>>>>
>>>> I could try initially generating them manually at midnight, and
>then use 
>>>> stale_age in skin.conf to keep them for 24 hours. Not elegant and
>touchy, 
>>>> but it may work. I am open to any better suggestions.
>>>>
>>>>
>
>-- 
>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/66bc2e44-c1be-460a-b4cc-7aecad5cadf9%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/B12B5513-7231-4936-816B-D78455C87541%40gmail.com.


Re: [weewx-user] Re: minmax and maxmin with span killing page?

2019-10-10 Thread Pila




>I think you can run wee_reports manually or via cron with a different
>.conf 
>(and therefore different skin(s)) specified.  this would permit just
>doing 
>the report(s) you wanted, at time you desire.
>

I did not think of that! Far from elegant, but it should work. Hopefully I will 
be able to create a corresponding report! It actually does not even need to be 
run at midnight. It can be run at any time with midnight as argument.

I would prefer if program itself adjusted values for this problem too midnight, 
but I think this may be useful workaround. 

Thanks for a great idea!

-- 
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/565D6FCC-BEE0-481D-8349-D0EED6CAEF35%40gmail.com.


Re: [weewx-user] Re: how to test for null data

2019-10-10 Thread Pila
Wow! This is detailed explanation! Thanks. I was not aware there are nuances. 
Clearly, USB side in the FO is the culprit. We can not change it.

I did not know some glitches are recoverable by Weewx. For the master glitch, 
we are back to killing USB power with no batteries in FO. I will wire something 
up.

As for RPi, I have 7 of them running 24/7. RPi 3 is touchy. RPi 2 and 4 not so 
much. As I said before, my only Zero works 6 weeks perfectly against all odds 
powering FO. Unfortunately, I can kill USB power only on RPI 2 and 3, not on 
Zero and 4 would be a very wrong choice for the job anyway.

Na 10. listopada 2019. 13:26:55 CEST, Andrew Milner 
 wrote:
>you have misunderstood completely
>
>1. fineoffset usb connection can glitch at any time for no predictable 
>reason - maybe once a month, maybe once a year.  On many occasions it
>can 
>glitch and weewx is able to recover the connection.
>
>2. sometimes fineoffset glitches in such a way that the only solution
>is to 
>completely power off the fineoffset, remove any batteries, and restart
>it - 
>this does not happen very often.  the problem is inside the fineoffset
>and 
>is not connected to weewx, rpi or anything else.
>
>3. an alternative recover for the problem in 2 above is to have no 
>batteries in the fine offset, power it from a powered usb hub (a usb
>hub 
>with its own independant power supply) which is able to selectively
>flip 
>power on individual ports and do the power cut/restore via the usb
>supply.  
>Only certain powered usb hubs are able to do this - check weewx threads
>for 
>more details.
>
>4. the rpi (and pizero) is known for a poor susceptability to power 
>issues.  To avoid any such issues it is suggested to ensure a good
>beefy 
>power supply for the rpi and to avoid powering other devices off the
>usb 
>port (eg fineoffset).  however powering the fineoffset via powered usb
>hub 
>(either without the switcheable ports) is ok
>
>5. no solution has been found to avoid the glitches occurring.  the
>best 
>one can achieve is to try and recover when weewx is unable to recover. 
>
>
>6. it can run for months with no issues and then have 3 in a month
>
>7 the problem is a fault in the fineoffset firmware.  recovery demands
>that 
>the fineoffset hardware has no power (usb or battery) and is restarted.
> 
>Just killing the power over usb and running off battery will not stop
>the 
>problem occurring.
>
>
>
>
>
>On Thursday, 10 October 2019 14:11:53 UTC+3, Pila wrote:
>>
>> What you say, I read as: FO can have its batteries, it is enough to
>kill 
>> the power to the USB cable for a short time to fix USB connectivity? 
>> Meaning: A nutered (power cut, data only) USB cable between the Zero
>and 
>> USB Hub plus a SmartSWitch on the USB Hub power supply can restore
>USB when 
>> it fails (even with batteries in FO). I understood FO needs to be
>powered 
>> down.
>>
>> My proffessional deformation is to verify all the facts and measure 
>> everythng including things that supposedly do not work or should not
>be 
>> done. And then after having checked all facts, make decisions.
>>
>> This simple USB connection was both interesting to try and the only 
>> immediate thing I could do to connect my Weather Station permanently
>to RPi 
>> Zero without moving the station itself elsewehere. For anything else,
>I 
>> needed to get some more stuf which takes time at my present location.
>First 
>> step is always the same: hook it up, and if it works after a month or
>so, 
>> go on to the next step with it.
>>
>> I was willing to bet Zero + FO would not work at all! USB cable
>powering 
>> my RPi Zero is 3 meters (10 feet) long! I better not say measurements
>under 
>> load :) I was sure it would not work. Now, I am actually perplexed:
>it 
>> works perfectly fine over a month! On a Zaro where Node-RED and
>Mosquitto 
>> are using power needlesly, plus WeeWx and of course - Zero is
>powering the 
>> Fine Offset itself for few weeks now. But, somehow, against all odds,
>5 
>> weeks later, all is well!?! If I did not try it, I would not have
>believed 
>> it.
>>
>> Previously, I tested connection from my Fine Offset to a PC and USB 
>> stopped working. I beleived USB died. Now I decided to do a SmartHome
>thing 
>> which starts with a Weather station. So, when I plugged a Zero into
>FO, it 
>> suddenly worked years after I gave up thinking USB port is dead or
>corroded 
>> (small island, a VERY corrosive surrounding). Them eneloops in FO
>last 
>> forever, over a year.
>>
>> It was only when I started 

[weewx-user] Re: Weather station recommendations?

2019-10-10 Thread Pila
I was recently pondering the same question and came to conclusion that 
price-quality seems to support my current selection. So, I am offering my 
facts.

Fine Offset WS1080 (sold under many names). It seems to have a problem with 
USB port lockups. It can be remedied by automatically restarting it. It is 
said this can happen on a montly basis. OK, so that is sort of 
half-negative. If one has the right USB Hub, WeeWX can restart Weather 
station should a problem arise. For now, I can not comment on USB recovery, 
only that the problem existed on my original station. 

Shortest WeeWx read interval is 5 minutes. External sensors update the 
display every 6 seconds (or something like that) so it captures wind gusts. 
Minus: no extra sensors can be added.

Our was bought over 8 years ago. External sensors were under influence of 
harsh small island sea atmosphere, strong winds (100 km/h) and strong sun. 
And our cats who came to be fatal to it. Windex ball bearing rusted after 
few years - after replacing it, all was well. Display fell down almost 2 
meters to a hard wood floor (a curious kitten was to blame) and got a tiny 
spill damage on the screen. Still works perfectly. After some years, 
external humidity sensor started showing 20% more, which is common for this 
type of sensor. Internal humidity sensor works perfectly. One external 
cable got damaged by the sun, can be easily fixed. Solar charged batteries 
(I used quality NiMh) powering external sensors, lost power over night for 
the first time a day before removal! Measurements are verified to be 
correct. Sun shield for the external temperature sensor is far from perfect 
but can be separated over 1 meter from the rain and wind sensors which is a 
huge plus! After 8 years: apart from these problems, it stil works 
perfectly fine.

It was replaced 3 weeks ago. Why? Cats lost the windex arrow and somehow 
chew off one wind speed paddle (wind speed still works perfectly fine). One 
cable needs to be refited into a plug. Humidity is off 20%. We replaced it 
with the same model, but from a different "brand". Regular EU price 
available to us is 130€. The new one was bought for 100€.

The old one will be reused at another location, where windex and external 
humidity are irrelevant. Intereseting fact: the new model from a different 
vendor would not recognize sensors from the old one. Apart from that, they 
look identicall. 

I would buy it again.

-- 
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/e6f14f58-d7f4-4478-bac7-c3063a713987%40googlegroups.com.


Re: [weewx-user] Re: minmax and maxmin with span killing page?

2019-10-10 Thread Pila
Yes, using span delta means I am using now as the starting point. That was 
I wanted to acheve.

minmax: $span(day_delta=7).outTemp.minmax
maxmin: $span(day_delta=7).outTemp.maxmin

I tried running a report with a midnight time, and it creates desired 
minmax spans, as you correctly stated. Any other time, it skips generating 
the page with no interactive display of the fault, only in the log.

But now, my problem is how to create minmax lines on the midnight and reuse 
them entire day? report_timing option in weewx.conf is for enitre reports. 
That does not fit the bill. 

I need a weekly and monthtly minmax / maxmin lines under the week and month 
OutTemp graphs. Closest to the usable idea I have:

1) in skin.conf, create two templates (for the two maxmin+minmax lines, one 
for week one for month)

2) include them to temp.html.tmpl

But, I am unable to find a solution to create these two files at midnight 
only and reuse them the rest of the day? Can I, in a skin.conf, do somethng 
like:

[ $(date +"%H:%M") == "00:00" ] && create_templates || skip

I could try initially generating them manually at midnight, and then use 
stale_age in skin.conf to keep them for 24 hours. Not elegant and touchy, 
but it may work. I am open to any better suggestions.

-- 
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/528e8042-a539-4cc9-9042-ca5beb13136c%40googlegroups.com.


Re: [weewx-user] Re: how to test for null data

2019-10-10 Thread Pila
What you say, I read as: FO can have its batteries, it is enough to kill 
the power to the USB cable for a short time to fix USB connectivity? 
Meaning: A nutered (power cut, data only) USB cable between the Zero and 
USB Hub plus a SmartSWitch on the USB Hub power supply can restore USB when 
it fails (even with batteries in FO). I understood FO needs to be powered 
down.

My proffessional deformation is to verify all the facts and measure 
everythng including things that supposedly do not work or should not be 
done. And then after having checked all facts, make decisions.

This simple USB connection was both interesting to try and the only 
immediate thing I could do to connect my Weather Station permanently to RPi 
Zero without moving the station itself elsewehere. For anything else, I 
needed to get some more stuf which takes time at my present location. First 
step is always the same: hook it up, and if it works after a month or so, 
go on to the next step with it.

I was willing to bet Zero + FO would not work at all! USB cable powering my 
RPi Zero is 3 meters (10 feet) long! I better not say measurements under 
load :) I was sure it would not work. Now, I am actually perplexed: it 
works perfectly fine over a month! On a Zaro where Node-RED and Mosquitto 
are using power needlesly, plus WeeWx and of course - Zero is powering the 
Fine Offset itself for few weeks now. But, somehow, against all odds, 5 
weeks later, all is well!?! If I did not try it, I would not have believed 
it.

Previously, I tested connection from my Fine Offset to a PC and USB stopped 
working. I beleived USB died. Now I decided to do a SmartHome thing which 
starts with a Weather station. So, when I plugged a Zero into FO, it 
suddenly worked years after I gave up thinking USB port is dead or corroded 
(small island, a VERY corrosive surrounding). Them eneloops in FO last 
forever, over a year.

It was only when I started reading on WeeWX that I learned FO power needs 
to be fully cycled to restore USB connection. Reading info on Fine Offset, 
I understand it needs to be completely powered down, screen dead, history 
emptied. Only then it restores USB connection. So, when I said FO did not 
react to Zero rebooting, I meant - its screen remained unaffected by Zero 
rebooting. FO did not loose power long enought to restart. For now, USB 
connection was never lost, Zero is powering FO for the last 3 weeks (no 
batteries).

WeeWX log upon manual reboot seems unremarkable:

Oct 10 12:17:56 RPiZero kernel: [2.673222] usb 1-1: New USB device found
, idVendor=1941, idProduct=8021, bcdDevice= 1.00
Oct 10 12:17:56 RPiZero kernel: [2.688210] usb 1-1: New USB device 
strings: Mfr=0, Product=0, SerialNumber=0
Oct 10 12:17:56 RPiZero kernel: [2.713617] hid-generic 0003:1941:
8021.0001: hiddev96,hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-
2098.usb-1/input0

Oct 10 12:18:16 RPiZero weewx[345]: engine: Using configuration file /home/
weewx/weewx.conf
Oct 10 12:18:16 RPiZero weewx[345]: engine: Loading station type 
FineOffsetUSB (weewx.drivers.fousb)
Oct 10 12:18:16 RPiZero weewx[345]: fousb: driver version is 1.10
Oct 10 12:18:16 RPiZero weewx[345]: fousb: polling mode is PERIODIC
Oct 10 12:18:16 RPiZero weewx[345]: fousb: polling interval is 60
Oct 10 12:18:17 RPiZero weewx[345]: fousb: found station on USB bus= device=
Oct 10 12:18:17 RPiZero weewx[345]: engine: StdConvert target unit is 0x10
Oct 10 12:18:20 RPiZero weewx[345]: fousb: synchronising to the weather 
station (quality=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/ec3bc2aa-5e85-4b44--a681633323b9%40googlegroups.com.


Re: [weewx-user] Bash: get current weather data

2019-10-10 Thread Pila
If your code works well, than all is well. If I may offer advice: whenever 
you have repeated code, separate it into a funciton. When testing, one test 
must include >= or <= e.g. if heat_index is 45, nothing will get done. If 
rain is 0,9 or lower, it will be ignored. As lazy as I am, I hate criptic 
things like '${vars[41]}'. Luckily, your script does not need complex logic 
but a simple stright flow of not multiply correlated rules.

You may find it usefull how parsing WeeWX variables is done in my script. 
My parsing directly produces integers when needed, fixes the above problem 
with the rain below 0,99 being ignored plus leaves items which should be 
left alone. I will mostly not translate Croatian words to avoid creating 
mistakes, but that should not present a problem.

I did manual install of WeeWX to RPi Zero and use RPi Zero as a root user, 
so paths and rights may need to be adjusted for others. Most will say it is 
impossible to set bash variables from awk, but I do not care. Nor about 
comments on eval. Nor about using root account on Zero. Such comments are 
not how security is assured.

1) prepare a WeeWX report we will be parsing. I modified this file, but can 
be any skin:

/home/weewx/skins/Seasons/skin.conf

and added there
[[VremStanica]]
encoding = strict_ascii
template = VremStanica.txt.tmpl

then I created the file:
/home/weewx/skins/Seasons/VremStanica.txt.tmpl

and placed into it data I want extracted from WeeWX; adjust as needed. Name 
in the first colument will automatically become the variable name in the 
script. Note raw (epoch) times and lack of labels. It simplifes parsing 
when labels are stuck to the numbers.

Time$current.dateTime.raw
InTemp  $current.inTemp.format(add_label=False)
OutTemp $current.outTemp.format(add_label=False)
Dewpoint$current.dewpoint.format(add_label=False)
Humidity$current.outHumidity.format(add_label=False)
WindSpeed   $current.windSpeed
WindCardinal$current.windDir.ordinal_compass
WindDirection$current.windDir
RainRate$current.rainRate.format(add_label=False)
Sunrise $almanac.sun.rise.raw
Sunset  $almanac.sun.set.raw

After every report generation, we have the file with the last set of data 
created. For my manual install, it is located at:

/home/weewx/public_html/VremStanica.tx

2) parse generated data into variables in a bash script.

Oneliner awk with just the single last else print statement from bellow 
will parse all the WeeWx data from above and automatically assign variable 
names from that same file. My locale is using comma as a decimal separator. 
I round up RainRate so a 0,1 does not get integered to 0 - no rain. 
Cardinal wind directions I leave unchanged (as letters). All other values 
get converted to integers (no decimal separator).

eval $(awk '
{
if ($1 == "RainRate" && $2 > "0,0")
print ""$1"=\""int ($2+1)"\""
else if ($1 == "WindCardinal") # leave original
print ""$1"=\""$2"\""
else# convert to integer
print ""$1"=\""int ($2)"\""
}' /home/weewx/public_html/VremStanica.txt)

The above converts the entire VremStanica.txt into bash variables with the 
same names. We can use them normally in the script without any extra work. 

3) automate based on the parsed data. SmartHome needs complicated rules 
wich must work together: 5 rules can close a shutter and overlap (closed 
manually, it is raining, it is sunset, it is cold, strong wind...). Which 
rule and when is allowed to lift the shutter? They all must cooperate 
perfectly. That would be out of scope in this group.

The following system can be well used for lower amount of events that need 
tracking. Easy to read and use.

# setup initial location for the flag file RoletaKisaFlag
RoletaKisaFlag="/root/RoletaKisaFlag"

# write the single piece of data $RoletaDignuta into a flag file, creating 
it; Filename stands for its function (in my case: ShuttersRainFlag). File 
iself can also be used as a timestamp for the action. After the } a 
distinguishing addition (1,2,3 or a,b,c, or Kitchen, Balcony...) can be 
made for similar flags.
echo "$RoletaDignuta" > "${RoletaKisaFlag}"

# make a timestamp when (a RoletaKisa rule was activated and) the 
particular flag used
touch "${RoletaKisaFlag}"

# read in the timestamp from the particular flag
RoletaKisaFlagAge=$(date -r "${RoletaKisaFlag}" +%s)

-- 
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/8ede0467-3f26-4543-a5bc-9fe4ead26540%40googlegroups.com.


Re: [weewx-user] Re: how to test for null data

2019-10-08 Thread Pila
I agree. But for starters... Since rebooting Zero does not restart my Fine 
offset I need an external switch anyway.

But as I live on a an isolated island in a small country, getting particular 
equipment is not easy. This was just perfectly convenient solution with items I 
had laying around. Of course nothing can be used if not nearly bulletproof. 

I do have an extra powered hub and there can never be shortage of 
SmartSwitches. Zero will power the hub... Unless I fix is USB cable. 
Frankenstein style.


Na 8. listopada 2019. 12:03:31 CEST, Andrew Milner 
 wrote:
>I would be cautious about powering the fineoffset from the pizero, and 
>would prefer to have a powered hub to power the weather station.  The
>usb 
>interface on the fineoffsets is somewhat finicky at the best of times!!
> 
>Inadequate power supplies are behind many issues with rpi and weather 
>stations.
>
>the database should always reflect good data.
>
>
>
>On Tuesday, 8 October 2019 12:56:13 UTC+3, Pila wrote:
>>
>> Amazing amount of work and detail went into WeeWX! It is hard to find
>what 
>> can not be adjusted. 
>>
>> I parse data from a small text only report I added. I think:
>>
>> $current.DateTime.Raw
>>
>> is adequate. No need for $latest in this context? $current will be
>the 
>> time report was generated. If too old...
>>
>>
>>
>> Na 8. listopada 2019. 04:19:23 CEST, Andrew Milner
>> > wrote:
>>>
>>> as i said if communication is lost no data is saved in the database
>- so 
>>> you will not have n/a, null or anything else in the database.  in
>fact 
>>> weewx will ultimately stop running and eventually do a restart.  the
>
>>> symptom will be shown by the time of the generated html file - which
>will 
>>> be older than 5 minutes ago (or whatever archive period you have 
>>> specified).  do my test and see what happens.
>>>
>>>
>>>
>>> On Monday, 7 October 2019 21:15:43 UTC+3, Pila wrote:
>>>>
>>>> I meant: my external program parses output. How will my program
>know USB 
>>>> broke down? What value in my program should i test to find reset is
>needed? 
>>>> Will N/A be saved?
>>>>
>>>> Na 7. listopada 2019. 15:26:17 CEST, Andrew Milner
> 
>>>> wrote:
>>>>>
>>>>> the driver will log an error if communication with the fine offset
>is 
>>>>> lost, and does not continue to store data in the database until 
>>>>> communication is restored.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Monday, 7 October 2019 16:19:19 UTC+3, Pila wrote:
>>>>>>
>>>>>> I export InTemp to check if my USB connection to the First Offset
>
>>>>>> dropped dead.
>>>>>>
>>>>>> InTemp  $current.inTemp.format(add_label=False)
>>>>>> InTemp  $current.inTemp.raw
>>>>>>
>>>>>> What will be produced in case of null data? What do I need to
>test? 
>>>>>>
>>>>>> In the first case, I expect N/A to mean USB connection is lost. I
>am 
>>>>>> guessing N/A will not be in raw data. An empty field?
>>>>>>
>>>>>> So, probably the first line is a better choice for such purpose?
>>>>>>
>>>>>>
>
>-- 
>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/69bd7051-81fe-4119-b6c6-72f3934678fe%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/B85F1DB9-9494-4500-826B-6EBE80B57B05%40gmail.com.


Re: [weewx-user] Bash: get current weather data

2019-10-08 Thread Pila
You still did not say do you really need only notification or want something 
done based on that data!

My Zero today took the sunset time and external temperature directly from WeeWX 
report, and since it was less than 15C, closed shutters, emailed us and logged 
that fact. 

Did not need alarm.Py, no extensions, no Home automation server, no Node-Red, 
no MQTT. All in my tiny script. Plus of course WeeWX. 

In the morning (after the sunrise), when it gets over 18C, it will open 
shutters. Unless it rains, of course.

If you need something like that, I can help.


Na 8. listopada 2019. 18:30:38 CEST, Ramesh Rasappan  wrote:
>
>
>thank you all, I got it working in a couple of ways; i. use in-built 
>alarm.py ii. install extension crt: Cumulus Real-Time to get real-time
>data 
>and parse it with a bash script. I am sharing here my work (could be
>useful 
>for some noob like me!).
>
>My earlier post got deleted where I did share my bash script and 
>installation guidelines
>
>
>On Tuesday, October 8, 2019 at 9:55:25 PM UTC+5:30, Ramesh Rasappan
>wrote:
>>
>> @Pilla, although I got it working (see above), I am still interested
>to 
>> see your script! maybe you are handling it in a better way! (you
>could send 
>> it to me: chittukuruvii  at.   gmail)
>>
>>
>>
>> On Monday, October 7, 2019 at 6:22:01 PM UTC+5:30, Pila wrote:
>>>
>>> If you really want just to send a notification, use alarm.Py.
>>>
>>> If you want to base automation on this data, I can provide example
>how I 
>>> did it. But you would still need to solve sending e-mails on your
>own since 
>>> my RPI Zero uses my router to do so.
>>>
>>> Na 5. listopada 2019. 18:34:06 CEST, Ramesh Rasappan
> 
>>> wrote:
>>>>
>>>> do you parse the html page? could you please share the shell
>script? 
>>>> thanks
>>>>
>>>> On Friday, October 4, 2019 at 5:19:09 PM UTC+5:30, Pila wrote:
>>>>>
>>>>> If you really want notification, it can generate email.
>>>>>
>>>>> I use data to close shutters if it rains from the west half. I
>simply 
>>>>> parse generated page and extract data I need. All from shell
>script. 5 
>>>>> lines of code to extract 8 variables. My Zero jest closed shutters
>since it 
>>>>> was sunset. 
>>>>>
>>>>> Na 3. listopada 2019. 16:01:58 CEST, Ramesh Rasappan
> 
>>>>> wrote:
>>>>>>
>>>>>> My current setup pulls weather data from Offset console using 
>>>>>> weewx-wh23xx driver. I want to run a bash script that can get the
>current 
>>>>>> weather and send me a notification if it meets the criteria.
>>>>>>
>>>>>>
>>>>>> I could probably get the weather data directly from PWS console 
>>>>>> using weewx-wh23xx driver but I can't figure out this!! Of course
>one could 
>>>>>> use sqlite3 to pull the data from either weewx database 
>>>>>> (/var/lib/weewx/weewx.sdb) but it looks complicated for me that I
>have to 
>>>>>> run some complex script to retrieve the current data!
>>>>>>
>>>>>>
>>>>>> Can you share some script that can pull the current data from
>either 
>>>>>> weewx database or from the console? thank you
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> -- 
>>>>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>
>>>>> mojoj sažetosti.
>>>>>
>>>>
>
>-- 
>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/e093b4ac-0e0e-4d85-bc24-b1a42996428f%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/C551D884-01BC-4BE7-A1F1-04609A0F8E7C%40gmail.com.


Re: [weewx-user] Re: minmax and maxmin with span killing page?

2019-10-08 Thread Pila
OK. This is perfectly logical and acceptable limitation. It makes sense for 
both weekly and monthly or longer period where it will be used.

I am off investigating how to set such defined spans.

Thanks for the insight.


Na 8. listopada 2019. 02:43:36 CEST, Thomas Keffer  wrote:
>There is indeed a "minmax" aggregate, but it comes with limitations.
>The
>start and end of the aggregation interval must be at midnight. I
>suspect
>the problem is that you are attempting to do it from a random time of
>the
>day. In that case, minmax (and maxmin) would then be not well-defined
>mathematically.
>
>-tk
>
>On Mon, Oct 7, 2019 at 11:11 AM Pila  wrote:
>
>> They are not nearly the same thing. In the summer, we do not care
>about
>> the coldest night. Warmest nights are the problem. Warmest nights are
>of
>> interest. In the winter lowest daily maximum becomes crucial.
>>
>> Pity. This is very unfortunate missing crucial feature. These two
>really
>> should exist in any good meteo program.
>>
>> Then again, why they exist in standard form which is useless to
>describe
>> graphs?
>>
>>
>> Na 7. listopada 2019. 19:36:52 CEST, Andrew Milner <
>> andrew.s.r.mil...@gmail.com> wrote:
>>>
>>> there is no aggregate minmax or maxmin - just saying min will give
>the
>>> lowest value over the span and just saying max will give the highest
>value
>>> over the period
>>>
>>> so
>>>
>>> minmax: $span(day_delta=7).outTemp.minmax
>>> maxmin: $span(day_delta=7).outTemp.maxmin
>>>
>>> should be
>>>
>>> minmax: $span(day_delta=7).outTemp.min
>>> maxmin: $span(day_delta=7).outTemp.max
>>>
>>> On Monday, 7 October 2019 20:21:09 UTC+3, Pila wrote:
>>>>
>>>> Sorry, I was making notes on everything I wanted to ask, and in all
>that
>>>> logging, I forgot a log I should include :)
>>>>
>>>> wee_reports[14046]: cheetahgenerator: Generate failed with
>exception '>>> 'weewx.ViolatedPrecondition'>'
>>>> wee_reports[14046]: cheetahgenerator:  Ignoring template
>/home/weewx
>>>> /skins/Smartphone/temp.html.tmpl
>>>> wee_reports[14046]: cheetahgenerator:  Reason: Invalid
>aggregation
>>>> type 'minmax'
>>>> wee_reports[14046]:   Traceback (most recent call last):
>>>> wee_reports[14046]: File
>>>> "/home/weewx/bin/weewx/cheetahgenerator.py", line 332, in generate
>>>> wee_reports[14046]:   fd.write(str(compiled_template))
>>>> wee_reports[14046]: File
>>>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1045,
>in
>>>> __str__
>>>> wee_reports[14046]:   rc = getattr(self, mainMethName)()
>>>> wee_reports[14046]: File
>>>> "_home_weewx_skins_Smartphone_temp_html_tmpl.py", line 151, in
>respond
>>>> wee_reports[14046]: File "/home/weewx/bin/weewx/tags.py",
>line
>>>> 329, in __getattr__
>>>> wee_reports[14046]:   return self._do_query(aggregate_type)
>>>> wee_reports[14046]: File "/home/weewx/bin/weewx/tags.py",
>line
>>>> 343, in _do_query
>>>> wee_reports[14046]:   val=val, **self.option_dict)
>>>> wee_reports[14046]: File
>"/home/weewx/bin/weewx/wxmanager.py",
>>>> line 60, in getAggregate
>>>> wee_reports[14046]:   return
>weewx.manager.DaySummaryManager.
>>>> getAggregate(self, timespan, obs_type, aggregateType,
>**option_dict)
>>>> wee_reports[14046]: File
>"/home/weewx/bin/weewx/manager.py",
>>>> line 1268, in getAggregate
>>>> wee_reports[14046]:   **option_dict)
>>>> wee_reports[14046]: File
>"/home/weewx/bin/weewx/manager.py",
>>>> line 450, in getAggregate
>>>> wee_reports[14046]:   raise
>weewx.ViolatedPrecondition("Invalid
>>>> aggregation type '%s'" % aggregate_type)
>>>> wee_reports[14046]:   ViolatedPrecondition: Invalid aggregation
>>>> type 'minmax'
>>>>
>>>>
>>>>
>>>> --
>> 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 

Re: [weewx-user] Re: how to test for null data

2019-10-08 Thread Pila
Amazing amount of work and detail went into WeeWX! It is hard to find what can 
not be adjusted. 

I parse data from a small text only report I added. I think:

$current.DateTime.Raw

is adequate. No need for $latest in this context? $current will be the time 
report was generated. If too old...



Na 8. listopada 2019. 04:19:23 CEST, Andrew Milner 
 wrote:
>as i said if communication is lost no data is saved in the database -
>so 
>you will not have n/a, null or anything else in the database.  in fact 
>weewx will ultimately stop running and eventually do a restart.  the 
>symptom will be shown by the time of the generated html file - which
>will 
>be older than 5 minutes ago (or whatever archive period you have 
>specified).  do my test and see what happens.
>
>
>
>On Monday, 7 October 2019 21:15:43 UTC+3, Pila wrote:
>>
>> I meant: my external program parses output. How will my program know
>USB 
>> broke down? What value in my program should i test to find reset is
>needed? 
>> Will N/A be saved?
>>
>> Na 7. listopada 2019. 15:26:17 CEST, Andrew Milner
>> > wrote:
>>>
>>> the driver will log an error if communication with the fine offset
>is 
>>> lost, and does not continue to store data in the database until 
>>> communication is restored.
>>>
>>>
>>>
>>>
>>>
>>> On Monday, 7 October 2019 16:19:19 UTC+3, Pila wrote:
>>>>
>>>> I export InTemp to check if my USB connection to the First Offset 
>>>> dropped dead.
>>>>
>>>> InTemp  $current.inTemp.format(add_label=False)
>>>> InTemp  $current.inTemp.raw
>>>>
>>>> What will be produced in case of null data? What do I need to test?
>
>>>>
>>>> In the first case, I expect N/A to mean USB connection is lost. I
>am 
>>>> guessing N/A will not be in raw data. An empty field?
>>>>
>>>> So, probably the first line is a better choice for such purpose?
>>>>
>>>>
>
>-- 
>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/d568a3df-30af-4642-8337-7bbae390a8bf%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/85157583-D3D9-48D9-80FD-6805B629FEDE%40gmail.com.


Re: [weewx-user] Re: how to test for null data

2019-10-08 Thread Pila
Yes, I will. I would just prefer to test with a possibly working solution. This 
is an excellent explanation of the problem.

Generation is every 5 minutes like you say. My program parses Weewx output 3 
minutes later. I test a timestamp of generation.

An alternative would be to separate Weewx log and parse it. The above is less 
intensive.

Now I can do your test! Many thanks for your kind help and patience.

I thought it will be enough to restart a RPI Zero since it powers the weather 
station. I tried but it seems I will need a longer cutoff. Have to test if Zero 
cuts power to the USB while rebooting. 




Na 8. listopada 2019. 04:19:23 CEST, Andrew Milner 
 wrote:
>as i said if communication is lost no data is saved in the database -
>so 
>you will not have n/a, null or anything else in the database.  in fact 
>weewx will ultimately stop running and eventually do a restart.  the 
>symptom will be shown by the time of the generated html file - which
>will 
>be older than 5 minutes ago (or whatever archive period you have 
>specified).  do my test and see what happens.
>
>
>
>On Monday, 7 October 2019 21:15:43 UTC+3, Pila wrote:
>>
>> I meant: my external program parses output. How will my program know
>USB 
>> broke down? What value in my program should i test to find reset is
>needed? 
>> Will N/A be saved?
>>
>> Na 7. listopada 2019. 15:26:17 CEST, Andrew Milner
>> > wrote:
>>>
>>> the driver will log an error if communication with the fine offset
>is 
>>> lost, and does not continue to store data in the database until 
>>> communication is restored.
>>>
>>>
>>>
>>>
>>>
>>> On Monday, 7 October 2019 16:19:19 UTC+3, Pila wrote:
>>>>
>>>> I export InTemp to check if my USB connection to the First Offset 
>>>> dropped dead.
>>>>
>>>> InTemp  $current.inTemp.format(add_label=False)
>>>> InTemp  $current.inTemp.raw
>>>>
>>>> What will be produced in case of null data? What do I need to test?
>
>>>>
>>>> In the first case, I expect N/A to mean USB connection is lost. I
>am 
>>>> guessing N/A will not be in raw data. An empty field?
>>>>
>>>> So, probably the first line is a better choice for such purpose?
>>>>
>>>>
>
>-- 
>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/d568a3df-30af-4642-8337-7bbae390a8bf%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/AA368A01-7557-43B2-AE5C-F6A4E54CC3E1%40gmail.com.


Re: [weewx-user] Re: how to test for null data

2019-10-07 Thread Pila
I meant: my external program parses output. How will my program know USB broke 
down? What value in my program should i test to find reset is needed? Will N/A 
be saved?

Na 7. listopada 2019. 15:26:17 CEST, Andrew Milner 
 wrote:
>the driver will log an error if communication with the fine offset is
>lost, 
>and does not continue to store data in the database until communication
>is 
>restored.
>
>
>
>
>
>On Monday, 7 October 2019 16:19:19 UTC+3, Pila wrote:
>>
>> I export InTemp to check if my USB connection to the First Offset
>dropped 
>> dead.
>>
>> InTemp  $current.inTemp.format(add_label=False)
>> InTemp  $current.inTemp.raw
>>
>> What will be produced in case of null data? What do I need to test? 
>>
>> In the first case, I expect N/A to mean USB connection is lost. I am 
>> guessing N/A will not be in raw data. An empty field?
>>
>> So, probably the first line is a better choice for such purpose?
>>
>>
>
>-- 
>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/ae479a8c-309e-49b0-b797-9839a62743ff%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/C8DD1DB8-FE94-40FD-8694-BA20BCAF6CC0%40gmail.com.


Re: [weewx-user] Re: minmax and maxmin with span killing page?

2019-10-07 Thread Pila
They are not nearly the same thing. In the summer, we do not care about the 
coldest night. Warmest nights are the problem. Warmest nights are of interest. 
In the winter lowest daily maximum becomes crucial.

Pity. This is very unfortunate missing crucial feature. These two really should 
exist in any good meteo program.

Then again, why they exist in standard form which is useless to describe 
graphs? 


Na 7. listopada 2019. 19:36:52 CEST, Andrew Milner 
 wrote:
>there is no aggregate minmax or maxmin - just saying min will give the 
>lowest value over the span and just saying max will give the highest
>value 
>over the period
>
>so
>
>minmax: $span(day_delta=7).outTemp.minmax
>maxmin: $span(day_delta=7).outTemp.maxmin
>
>should be
>
>minmax: $span(day_delta=7).outTemp.min
>maxmin: $span(day_delta=7).outTemp.max
>
>On Monday, 7 October 2019 20:21:09 UTC+3, Pila wrote:
>>
>> Sorry, I was making notes on everything I wanted to ask, and in all
>that 
>> logging, I forgot a log I should include :)
>>
>> wee_reports[14046]: cheetahgenerator: Generate failed with exception
>'> 'weewx.ViolatedPrecondition'>'
>> wee_reports[14046]: cheetahgenerator:  Ignoring template
>/home/weewx/
>> skins/Smartphone/temp.html.tmpl
>> wee_reports[14046]: cheetahgenerator:  Reason: Invalid
>aggregation 
>> type 'minmax'
>> wee_reports[14046]:   Traceback (most recent call last):
>> wee_reports[14046]: File 
>> "/home/weewx/bin/weewx/cheetahgenerator.py", line 332, in generate
>> wee_reports[14046]:   fd.write(str(compiled_template))
>> wee_reports[14046]: File 
>> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1045, in
>
>> __str__
>> wee_reports[14046]:   rc = getattr(self, mainMethName)()
>> wee_reports[14046]: File 
>> "_home_weewx_skins_Smartphone_temp_html_tmpl.py", line 151, in
>respond
>> wee_reports[14046]: File "/home/weewx/bin/weewx/tags.py",
>line 329
>> , in __getattr__
>> wee_reports[14046]:   return self._do_query(aggregate_type)
>> wee_reports[14046]: File "/home/weewx/bin/weewx/tags.py",
>line 343
>> , in _do_query
>> wee_reports[14046]:   val=val, **self.option_dict)
>> wee_reports[14046]: File
>"/home/weewx/bin/weewx/wxmanager.py", 
>> line 60, in getAggregate
>> wee_reports[14046]:   return weewx.manager.DaySummaryManager.
>> getAggregate(self, timespan, obs_type, aggregateType, **option_dict)
>> wee_reports[14046]: File "/home/weewx/bin/weewx/manager.py",
>line 
>> 1268, in getAggregate
>> wee_reports[14046]:   **option_dict)
>> wee_reports[14046]: File "/home/weewx/bin/weewx/manager.py",
>line 
>> 450, in getAggregate
>> wee_reports[14046]:   raise
>weewx.ViolatedPrecondition("Invalid 
>> aggregation type '%s'" % aggregate_type)
>> wee_reports[14046]:   ViolatedPrecondition: Invalid aggregation
>type 
>> 'minmax'
>>
>>
>>
>>
>
>-- 
>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/e81fb202-03a6-41aa-b35b-4344f608fddb%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/26FB5345-2EA6-41AB-A6A7-09CD1FECBCA3%40gmail.com.


[weewx-user] Re: minmax and maxmin with span killing page?

2019-10-07 Thread Pila
Sorry, I was making notes on everything I wanted to ask, and in all that 
logging, I forgot a log I should include :)

wee_reports[14046]: cheetahgenerator: Generate failed with exception ''
wee_reports[14046]: cheetahgenerator:  Ignoring template /home/weewx/
skins/Smartphone/temp.html.tmpl
wee_reports[14046]: cheetahgenerator:  Reason: Invalid aggregation type 
'minmax'
wee_reports[14046]:   Traceback (most recent call last):
wee_reports[14046]: File "/home/weewx/bin/weewx/cheetahgenerator.py"
, line 332, in generate
wee_reports[14046]:   fd.write(str(compiled_template))
wee_reports[14046]: File 
"/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1045, in 
__str__
wee_reports[14046]:   rc = getattr(self, mainMethName)()
wee_reports[14046]: File 
"_home_weewx_skins_Smartphone_temp_html_tmpl.py", line 151, in respond
wee_reports[14046]: File "/home/weewx/bin/weewx/tags.py", line 329, 
in __getattr__
wee_reports[14046]:   return self._do_query(aggregate_type)
wee_reports[14046]: File "/home/weewx/bin/weewx/tags.py", line 343, 
in _do_query
wee_reports[14046]:   val=val, **self.option_dict)
wee_reports[14046]: File "/home/weewx/bin/weewx/wxmanager.py", line 
60, in getAggregate
wee_reports[14046]:   return weewx.manager.DaySummaryManager.
getAggregate(self, timespan, obs_type, aggregateType, **option_dict)
wee_reports[14046]: File "/home/weewx/bin/weewx/manager.py", line 
1268, in getAggregate
wee_reports[14046]:   **option_dict)
wee_reports[14046]: File "/home/weewx/bin/weewx/manager.py", line 
450, in getAggregate
wee_reports[14046]:   raise weewx.ViolatedPrecondition("Invalid 
aggregation type '%s'" % aggregate_type)
wee_reports[14046]:   ViolatedPrecondition: Invalid aggregation type 
'minmax'



-- 
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/a1ef2b75-9930-4ec9-a78e-4c26770c7866%40googlegroups.com.


[weewx-user] how to test for null data

2019-10-07 Thread Pila
I export InTemp to check if my USB connection to the First Offset dropped 
dead.

InTemp  $current.inTemp.format(add_label=False)
InTemp  $current.inTemp.raw

What will be produced in case of null data? What do I need to test? 

In the first case, I expect N/A to mean USB connection is lost. I am 
guessing N/A will not be in raw data. An empty field?

So, probably the first line is a better choice for such purpose?

-- 
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/6b994706-af4d-4268-bcde-bf9d379d7434%40googlegroups.com.


Re: [weewx-user] Bash: get current weather data

2019-10-07 Thread Pila
If you really want just to send a notification, use alarm.Py.

If you want to base automation on this data, I can provide example how I did 
it. But you would still need to solve sending e-mails on your own since my RPI 
Zero uses my router to do so.

Na 5. listopada 2019. 18:34:06 CEST, Ramesh Rasappan  wrote:
>do you parse the html page? could you please share the shell script?
>thanks
>
>On Friday, October 4, 2019 at 5:19:09 PM UTC+5:30, Pila wrote:
>>
>> If you really want notification, it can generate email.
>>
>> I use data to close shutters if it rains from the west half. I simply
>
>> parse generated page and extract data I need. All from shell script.
>5 
>> lines of code to extract 8 variables. My Zero jest closed shutters
>since it 
>> was sunset. 
>>
>> Na 3. listopada 2019. 16:01:58 CEST, Ramesh Rasappan
>> > wrote:
>>>
>>> My current setup pulls weather data from Offset console using 
>>> weewx-wh23xx driver. I want to run a bash script that can get the
>current 
>>> weather and send me a notification if it meets the criteria.
>>>
>>>
>>> I could probably get the weather data directly from PWS console 
>>> using weewx-wh23xx driver but I can't figure out this!! Of course
>one could 
>>> use sqlite3 to pull the data from either weewx database 
>>> (/var/lib/weewx/weewx.sdb) but it looks complicated for me that I
>have to 
>>> run some complex script to retrieve the current data!
>>>
>>>
>>> Can you share some script that can pull the current data from either
>
>>> weewx database or from the console? thank you
>>>
>>>
>>>
>>>
>> -- 
>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>mojoj 
>> sažetosti.
>>
>
>-- 
>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/729bdb6a-42fd-4f1e-a2d4-3e58fbb44814%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/A60E30FD-92AB-405D-AEB2-824FBCE83910%40gmail.com.


Re: [weewx-user] span delta does not start from NOW?

2019-10-07 Thread Pila
I have just realized I probably misspoke and invented a problem!

I made a mistake of looking the start time of the graph and assuming it to be 
27 hours ago! It is not since graph steps in 3 hours intervals.

Since I was working on this some time between other things I do, timeline (my 
reports) changed in the meantime and I failed to take that into account.

Span actually works as advertised taking NOW as a reference point. And does it 
literary. Graph is not. And both work fine. 

Am I right to say I was wrong?

Na 7. listopada 2019. 11:31:59 CEST, mrzimgjugl asdf  
wrote:
>Thanks to Andrew Milner, I can now fix wrong min/max lines using span
>with 
>delta. Now min/max correspond mostly with the graphs above them. Good
>thing 
>WeeWX is almost escellent and almost anything can be achieved with it.
>So, 
>I am expecting this should be fixable.
>
>Using span delta, I am getting some wierd results not seen on the
>graphs 
>directly above to which I tried to sync these min and max lines.
>
>Problem may be with the reference from which span delta starts and that
>
>reference seems not to be NOW. Possibly, the midnight before NOW is
>taken 
>as a reference and starting point for the span? I can see the problem
>in 
>many cases. How to fix that?
>
>Current report was generated at monday 9:15. Graph correctly starts at
>9:00 
>at Sunday and it just added new segment after 9:00 monday, so it shows
>27 
>hours. I have modified summary min/max text below the graph into:
>
>max: $span(hour_delta = 27).outTemp.max at $span(hour_delta = 
>27).outTemp.maxtime.format("%A %k:%M")
>min: $span(hour_delta = 27).outTemp.min at $span(hour_delta = 
>27).outTemp.mintime.format("%A %k:%M")
>
>But the text says:
>max: 25,6°C at Sunday 15:25
>min: 15,0°C at Sunday 6:55
>
>Sunday 6:55 should be out of scope since I generated report at monday
>9:15. 
>I do not see in manual a precise definition what is the starting point
>for 
>span delta. So, I estimate it is not using NOW as the end starting
>point 
>but something else.
>
>My question: what is the reference point in time for commands like:
>$span(hour_delta=27)
>$span(day_delta=7)
>$span(day_delta=30)
>
>I want spans to summarise the same period as the graphs above them.
>They 
>all summarise form the moment when the report is generated back for
>given 
>time: 27 hours or 7 or 30 days. Not take entire calendar days from the
>last 
>midngiht or something like this. I even tried to give all spans in
>hours, 
>but I do not think that helps. This is not the simplest issue to test.
>
>-- 
>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/5b5f998f-d384-4cd0-9c5b-b1019c06b40a%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/111669A1-4D6A-47F5-AA75-81E1AE361B1C%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-06 Thread Pila



Na 6. listopada 2019. 02:23:29 CEST, Thomas Keffer  wrote:
>>
>> I am funny that way. If it says 30 days, I expect 30 days. Not 1 day,
>2
>> tomorrow, 3 on the next day...
>>
>
>Where are you seeing this? The table heading in the Standard skin is
>clearly marked "This Month," the Seasons skin marked "Month."

Copied from the original installation:

Smartphone skin

rain.html.tmpl
24h rain
Rain last 7 days
Rain last 30 days

temp.html.tmpl 
24h temperature
7-day temperature
30-day temperature

wind.html.tmpl
24h
Last 7 days
Last 30 days

No ambiguity here.





>
>-tk

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/A05E1EC5-D3BE-4BB6-B66F-1501078F28D4%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-06 Thread Pila
Here is an example. I use WeeWX as a source of rain, wind, temperature, sunrise 
and sunset info.

Based on that, shutters will open and close automatically. 

But, I need to gage limits for e.g. at which cold temperature we start closing 
the balcony door. Or I risk closing a shutter with a cat on the balcony. I am 
even thinking of a PIR sensor.

But when WeeWX shows legend under the graphs unrelated to the graphs, I can 
make mistakes. And keep our cats stranded on the balcony!

Na 6. listopada 2019. 07:52:40 CEST, Liz  wrote:
>On Sat, 05 Oct 2019 12:37:21 +0200
>Pila  wrote:
>
>> Not when the title says Rain in last 30 days. Not when the title in
>> the graph says the same. Not when the graph shows the last 30 days of
>> rain. How can it now be good to show aggregate claiming no rain at
>> all? Just because it is after the midnight of the next month!
>
>Are you using a Croatian translation, because my English display does
>not say "last 30 days"?
>
>If so, your frustration comes from a difference in meaning when
>translated.
>Your title says what you want
>but the author's title says what he wrote, and it seems that they are
>not the same.
>
>Do you know how to go to github and get John Smith's code which
>provides something closer to what you want?
>
>
>Liz
>
>-- 
>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/20191006165240.45959f6f%40billiau.net.

-- 
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/61CA9DBF-0635-4232-B852-97949C9FA6DA%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-06 Thread Pila




>Are you using a Croatian translation, because my English display does
>not say "last 30 days"?

I apologize for taking to much poetic liberty. I want text to accurately sum 
the graph above it.

>
>Do you know how to go to github and get John Smith's code which
>provides something closer to what you want?

I am building SmartHome system and WeeWX is just one piece of the puzzle. I am 
reading it's customisation guide but it takes time. I do not know phyton. For 
now I am more frustrated examining SmartHome programs which I find unnecessary 
complicated. 

WeeWX just shocked me claiming no rain under the graph showing 106mm of rain.



>
>
>Liz

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/2EEB6D66-9C3C-465D-B12F-6F6304DA35A6%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-06 Thread Pila
I translated the titles. So, ignore the titles. I use the smartphone skin. On 
the rain page, there is a graph showing last 30 days of rain. 

But lines of text directly under the graph were saying no rain. Graph was 
displaying rain history. I do not accept 0 rain on the 1st of the month as 
acceptable when 106 mm of rain are shown on the 30 day train graph!

All I want is to have relevant numbers showing minimums, maximums, totals under 
the graph to refer to the data displayed in the graph directly above the text.

Not from the midnight, Monday or the first date of the current month.

Thanks to Andrew here, I converted to Delta method. It seems to work for data, 
but it is not displaying dates and day names at all, only the time. 

Also, in docs I do not see if Delta 7 days includes values from today or uses 
the last previous entire day for end. Because, that would also not correspond 
to the graph above it.


Na 6. listopada 2019. 02:23:29 CEST, Thomas Keffer  wrote:
>>
>> I am funny that way. If it says 30 days, I expect 30 days. Not 1 day,
>2
>> tomorrow, 3 on the next day...
>>
>
>Where are you seeing this? The table heading in the Standard skin is
>clearly marked "This Month," the Seasons skin marked "Month."
>
>-tk
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "weewx-user" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to weewx-user+unsubscr...@googlegroups.com.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/weewx-user/CAPq0zEAQ_mFwgjXSV4maEonT9Tdxt0sOz5HLc%3D4G1oAzzBmj%3DA%40mail.gmail.com.

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/19674F51-BBCF-4231-9356-81720E03434C%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-05 Thread Pila




>Thinking about this a little bit more - can't you just change the
>template 
>to use, for example
>rainfall for last 27 hours is $span(hour_delta = 27).rain.sum
>or
>rainfall for last 30 days is $span(day_delta=30).rain.sum
>or
>max temp in last 24 hours is $span(hour_delta=24).outTemp.max

Almost works! Many thanks for your help. But I tried dew point for 30 days 
and changed its template:

min 30 days: $span(day_delta=30).dewpoint.min u 
$span(day_delta=30).dewpoint.mintime
max 30 days: $span(day_delta=30).dewpoint.max u 
$span(day_delta=30).dewpoint.maxtime

min: $month.dewpoint.min u $month.dewpoint.mintime
max: $month.dewpoint.max u $month.dewpoint.maxtime

That extracts data from correct data span. But fails to print the corresponding 
date. Here is new output above the old wrong one. I can not say if the time is 
correct but the date is missing.

min 30 days: -6,2°C u 10:30:00
max 30 days: 24,0°C u 08:40:00

min: 3,5°C u 04.10.2019 12:46:09
max: 20,0°C u 02.10.2019 15:14:57 

Plus, I must find a date format without leading zero in day and hour.


>
>and so on
>
>in this way you are specifying the span of the total or over which the
>max 
>is calculated, and should satisfy your needs I suspect.
>
>
>
>On Saturday, 5 October 2019 14:37:44 UTC+3, Thomas Keffer wrote:
>>
>> On Sat, Oct 5, 2019 at 1:11 AM Pila > 
>> wrote:
>>
>>> Terrible choice in a great program. Sort of like writing close over
>the 
>>> switch that opens.
>>>
>>
>> Sorry you feel that way.
>>
>> Allowing it to be done either way is something I could spend my time
>on, 
>> but I'm not --- there are other, higher, priorities. 
>>
>> A central feature of WeeWX is its *extensibility*, allowing anyone to
>
>> customize it to just the way they want. In this case, not only is
>your way 
>> possible, there are examples of how to do it.
>>

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/DC38677C-F572-4B9F-8FFB-557B4174F897%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-05 Thread Pila
I am using it for about a month. So for now I did only small adjustments. Plus, 
I do not know cheetah or phyton nor what can be done. I will try to fit in your 
proposal.

I just expected it to do what it says on the tin: show the 30 day summary. I 
lost time searching what I broke to cause it to show 1 day summary under titles 
and graphs showing 30 days. 

I am funny that way. If it says 30 days, I expect 30 days. Not 1 day, 2 
tomorrow, 3 on the next day...

Na 5. listopada 2019. 15:12:59 CEST, Andrew Milner 
 wrote:
>Thinking about this a little bit more - can't you just change the
>template 
>to use, for example
>rainfall for last 27 hours is $span(hour_delta = 27).rain.sum
>or
>rainfall for last 30 days is $span(day_delta=30).rain.sum
>or
>max temp in last 24 hours is $span(hour_delta=24).outTemp.max
>
>and so on
>
>in this way you are specifying the span of the total or over which the
>max 
>is calculated, and should satisfy your needs I suspect.
>
>
>
>On Saturday, 5 October 2019 14:37:44 UTC+3, Thomas Keffer wrote:
>>
>> On Sat, Oct 5, 2019 at 1:11 AM Pila > 
>> wrote:
>>
>>> Terrible choice in a great program. Sort of like writing close over
>the 
>>> switch that opens.
>>>
>>
>> Sorry you feel that way.
>>
>> Allowing it to be done either way is something I could spend my time
>on, 
>> but I'm not --- there are other, higher, priorities. 
>>
>> A central feature of WeeWX is its *extensibility*, allowing anyone to
>
>> customize it to just the way they want. In this case, not only is
>your way 
>> possible, there are examples of how to do it.
>>
>
>-- 
>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/6c09cc1f-ce54-43a2-a3e6-0f550accebda%40googlegroups.com.

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/3DD6678F-A370-482D-B967-CB89AE647D02%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-05 Thread Pila



Na 5. listopada 2019. 10:54:34 CEST, Andrew Milner 
 wrote:
>if people wanted 24 hours or 30 days they will have written a search
>list 
>extension to provide the information

I am begging if someone did it to mail it to me as I will need days do do it.


>most people are probably like me - and work in days (which start at 
>midnight), months (which start on the first of themonth) and years
>(which 
>start on 1st January)

Not when the title says Rain in last 30 days. Not when the title in the graph 
says the same. Not when the graph shows the last 30 days of rain. How can it 
now be good to show aggregate claiming no rain at all? Just because it is after 
the midnight of the next month!


>
>On Saturday, 5 October 2019 11:19:06 UTC+3, Pila wrote:
>>
>> Actually, I can not believe we are the only ones wanting aggregate
>data 
>> for a month to show 30 days instead of just one day or aggregate for
>27 
>> hours to show data for 27 hours instead of nothing at 4 minutes after
>
>> midnight.
>>
>> Na 4. listopada 2019. 14:42:07 CEST, Thomas Keffer > > wrote:
>>>
>>> This is the correct behavior. As the title says, the aggregate
>values are 
>>> the aggregate *for today*, that is, *since midnight,* not for 24
>hours.
>>>
>>> If you want 24 hours, you will have to use a search list extension.
>There 
>>> is an example of how to write one in the section *Extending the list
>
>>> <http://www.weewx.com/docs/customizing.htm#extending_the_list>* in
>the 
>>> Customizing Guide.
>>>
>>> Same for other time periods (month, year, etc.)
>>>
>>> -tk
>>>
>>> On Fri, Oct 4, 2019 at 4:49 AM Pila > 
>>> wrote:
>>>
>>>> Does the same wrong thing for a day, too. Graph shows rain in last
>24 
>>>> (27) hours but all totals ignore anything before the midnight.
>>>>
>>>> How can I correct this behaviour?
>>>>
>>>> Na 2. listopada 2019. 18:21:48 CEST, mrzimgjugl asdf
>>>> > wrote:
>>>>>
>>>>> Graphs are fine. They show 7 or 30 day history correctly.
>>>>>
>>>>> But, below the graphs, it seems like max or total lines of text
>look 
>>>>> only into this month! And today is second day of the month. They
>do not 
>>>>> take into account 7 days or 30 days or whatever is in the graph
>above them.
>>>>>
>>>>> How to fix that? I am seeing this in Smartphone skin.
>>>>>
>>>>>
>>>> -- 
>>>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>mojoj 
>>>> sažetosti.
>>>>
>>>> -- 
>>>> 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...@googlegroups.com .
>>>> To view this discussion on the web visit 
>>>>
>https://groups.google.com/d/msgid/weewx-user/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com
>
>>>>
><https://groups.google.com/d/msgid/weewx-user/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>
>> -- 
>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>mojoj 
>> sažetosti.
>>

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/609C7106-047E-4616-9805-7FB1B7D8C81F%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-05 Thread Pila
Actually, I can not believe we are the only ones wanting aggregate data for a 
month to show 30 days instead of just one day or aggregate for 27 hours to show 
data for 27 hours instead of nothing at 4 minutes after midnight.

Na 4. listopada 2019. 14:42:07 CEST, Thomas Keffer  wrote:
>This is the correct behavior. As the title says, the aggregate values
>are
>the aggregate *for today*, that is, *since midnight,* not for 24 hours.
>
>If you want 24 hours, you will have to use a search list extension.
>There
>is an example of how to write one in the section *Extending the list
><http://www.weewx.com/docs/customizing.htm#extending_the_list>* in the
>Customizing Guide.
>
>Same for other time periods (month, year, etc.)
>
>-tk
>
>On Fri, Oct 4, 2019 at 4:49 AM Pila  wrote:
>
>> Does the same wrong thing for a day, too. Graph shows rain in last 24
>(27)
>> hours but all totals ignore anything before the midnight.
>>
>> How can I correct this behaviour?
>>
>> Na 2. listopada 2019. 18:21:48 CEST, mrzimgjugl asdf
>
>> wrote:
>>>
>>> Graphs are fine. They show 7 or 30 day history correctly.
>>>
>>> But, below the graphs, it seems like max or total lines of text look
>only
>>> into this month! And today is second day of the month. They do not
>take
>>> into account 7 days or 30 days or whatever is in the graph above
>them.
>>>
>>> How to fix that? I am seeing this in Smartphone skin.
>>>
>>>
>> --
>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>mojoj
>> sažetosti.
>>
>> --
>> 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/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com
>>
><https://groups.google.com/d/msgid/weewx-user/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>-- 
>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/CAPq0zEAwoJrZ0MRr284HKhc-Vajf4skv%3D-ef0%2B%3Dwgp2Gh%3DEwoA%40mail.gmail.com.

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/75139F78-36F9-46CE-BE1B-FCD04685F5E3%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-05 Thread Pila
Terrible choice in a great program. Sort of like writing close over the switch 
that opens.

Say there is a thunderstorm. As soon as midnight strikes, stat says it is a 
drizzle out or even no rain at all! While the graph above it shows flood! Same 
for week and month. I want stats for the entire period, not a Cinderella 
version.

I will look into your link how to rectify the problem.

Na 4. listopada 2019. 14:42:07 CEST, Thomas Keffer  wrote:
>This is the correct behavior. As the title says, the aggregate values
>are
>the aggregate *for today*, that is, *since midnight,* not for 24 hours.
>
>If you want 24 hours, you will have to use a search list extension.
>There
>is an example of how to write one in the section *Extending the list
><http://www.weewx.com/docs/customizing.htm#extending_the_list>* in the
>Customizing Guide.
>
>Same for other time periods (month, year, etc.)
>
>-tk
>
>On Fri, Oct 4, 2019 at 4:49 AM Pila  wrote:
>
>> Does the same wrong thing for a day, too. Graph shows rain in last 24
>(27)
>> hours but all totals ignore anything before the midnight.
>>
>> How can I correct this behaviour?
>>
>> Na 2. listopada 2019. 18:21:48 CEST, mrzimgjugl asdf
>
>> wrote:
>>>
>>> Graphs are fine. They show 7 or 30 day history correctly.
>>>
>>> But, below the graphs, it seems like max or total lines of text look
>only
>>> into this month! And today is second day of the month. They do not
>take
>>> into account 7 days or 30 days or whatever is in the graph above
>them.
>>>
>>> How to fix that? I am seeing this in Smartphone skin.
>>>
>>>
>> --
>> Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na
>mojoj
>> sažetosti.
>>
>> --
>> 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/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com
>>
><https://groups.google.com/d/msgid/weewx-user/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>-- 
>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/CAPq0zEAwoJrZ0MRr284HKhc-Vajf4skv%3D-ef0%2B%3Dwgp2Gh%3DEwoA%40mail.gmail.com.

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/55853F96-5831-490A-B51C-21D665CC21FE%40gmail.com.


Re: [weewx-user] Bash: get current weather data

2019-10-04 Thread Pila
If you really want notification, it can generate email.

I use data to close shutters if it rains from the west half. I simply parse 
generated page and extract data I need. All from shell script. 5 lines of code 
to extract 8 variables. My Zero jest closed shutters since it was sunset. 

Na 3. listopada 2019. 16:01:58 CEST, Ramesh Rasappan  wrote:
>
>
>My current setup pulls weather data from Offset console using
>weewx-wh23xx 
>driver. I want to run a bash script that can get the current weather
>and 
>send me a notification if it meets the criteria.
>
>
>I could probably get the weather data directly from PWS console 
>using weewx-wh23xx driver but I can't figure out this!! Of course one
>could 
>use sqlite3 to pull the data from either weewx database 
>(/var/lib/weewx/weewx.sdb) but it looks complicated for me that I have
>to 
>run some complex script to retrieve the current data!
>
>
>Can you share some script that can pull the current data from either
>weewx 
>database or from the console? thank you
>
>
>
>-- 
>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/47ab7379-e50b-4309-a2ce-ba1857a6cbd6%40googlegroups.com.

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/95C7E126-4F9F-475E-96E1-DEAE1E7FAC94%40gmail.com.


Re: [weewx-user] History begins yesterday?!?

2019-10-04 Thread Pila
Does the same wrong thing for a day, too. Graph shows rain in last 24 (27) 
hours but all totals ignore anything before the midnight.

How can I correct this behaviour?

Na 2. listopada 2019. 18:21:48 CEST, mrzimgjugl asdf  
wrote:
>Graphs are fine. They show 7 or 30 day history correctly.
>
>But, below the graphs, it seems like max or total lines of text look
>only 
>into this month! And today is second day of the month. They do not take
>
>into account 7 days or 30 days or whatever is in the graph above them.
>
>How to fix that? I am seeing this in Smartphone skin.
>
>-- 
>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/c653a6e4-6ae0-4cb0-be84-b43a523e6601%40googlegroups.com.

-- 
Poslano sa mog Android uređaja sa K-9 Mail. Molim vas oprostite na mojoj 
sažetosti.

-- 
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/C119C813-E33A-488A-8D3B-ECCA434E7F28%40gmail.com.


[weewx-user] Re: Display local wind names

2019-09-23 Thread Pila
I had to make quite complex meal in the meantime, so, now I can post the 
solution.

If someone wants to have name of the wind shown instead or in addition to 
Cardinal and numeric, here it is. This example will serve people at 
Croatian coast of Adriatic see without modification. It is easy to modify 
it for any other winds.

I modified Smartphone skin. Here are the steps. 

edit file (I installed by using setup.py): 
/home/weewx/skins/Smartphone/index.html.tmpl

Locate the line starting with:
...

Just in front of it, goes the new code:

#if $current.windDir.raw >= 22.5 and $current.windDir.raw <= 67.5
   #set label = "Bura"
#elif $current.windDir.raw > 67.5 and $current.windDir.raw <= 112.5
   #set label = "Levanat"
#elif $current.windDir.raw > 112.5 and $current.windDir.raw <= 157.5
   #set label = "Jugo"
#elif $current.windDir.raw > 157.5 and $current.windDir.raw <= 202.5
   #set label = "Otro"
#elif $current.windDir.raw > 202.5 and $current.windDir.raw <= 247.5
   #set label = "Lebi"
#elif $current.windDir.raw > 247.5 and $current.windDir.raw <= 292.5
   #set label = "Pulenat"
#elif $current.windDir.raw > 292.5 and $current.windDir.raw <= 315
   #set label = "Maestral"
#elif $current.windDir.raw > 315 and $current.windDir.raw <= 360
   #set label = "Tramontana"
#else
   #set label = "Vjetar"
#end if

This last else is for anything not covered with the wind names. Since now I 
have proper wind names for all winds, I modified my basic printout into:

$label: $current.windSpeed 
($current.windDir.ordinal_compass $current.windDir)

so now my Wind ... line will look like:



*Bura: 3 km/h (ENE 63)*Bura (from $label) is the name of the correspondiing 
wind. The word "Wind" seems superfluos to me in this configuration. Now it 
tells me that the wind is Bura! But, should the wind name be empty, it will 
be filled with "Vjetar" (Croatian word for Wind).

Unrelated to the above code, note that I have changed display unit of the 
wind speed to km/h and that I added cardinal to the numeric directions. 

I hope this may be of use to others.

-- 
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/052f20e0-f79a-49d3-b197-7e3bb35336b0%40googlegroups.com.


[weewx-user] Re: Display local wind names

2019-09-23 Thread Pila
Works! Just need tweaking to look good! Thanks. My code was decently close 
:)

As for the second issue, yes, I would like to overlay names over 
corresponding points of the graphs if possible.

-- 
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/4345e063-2935-4eb3-9cec-7416b5bd2537%40googlegroups.com.


[weewx-user] Re: graphs: Unicode and Cardinal Wind directions

2019-09-23 Thread Pila
OK, I see, not HTML chars but the plain ones are needed for graphs.

And as for the Cardinal points - I was afraid that may be the answer seeing 
the strucutre of data usage.

-- 
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/35e2820c-3767-4fef-bb64-22b2019f63c7%40googlegroups.com.


[weewx-user] Weewx as home for SmartHome switches

2019-09-23 Thread Pila
I would like to use the WeeWx Smartphone skin as my SmartHome page, too. No 
automation, just manual switches. Whoever is using Tasmota firmware may 
actually get their SmartHome this way both quicker and simpler. I plan to 
avoid additional home automation programs and OS-es. What I need, I will 
program myself, it is both easy and simple.

My problem is: I do not work with HTML programming and I am unable to solve 
likely very basic stuff on my own. So, I am wondering: is there an existing 
template with Tasmota http link "buttons" I can use? It is impossible 
nobody else wanted to do the same as I do. But, I can not find anything. 
Usability of Google groups is quite terrible and it did not help me.

Alternativelly, if someone is willing to help me with some basic html 
stuff, we can make this new template very quickly. Just excuse my "hybrid" 
code formatting.

Currenly, I have added links to the Smartphone page:

# open balcony shutter completely
http://192.168.1.30/cm?cmnd=ShutterPosition%20100;>Open balcony

# set it to 35% open so cats can get in and out if the door is open
http://192.168.1.30/cm?cmnd=ShutterPosition%2035;>Close to cats


Works, but is not elegant - I do not need it to open page with reply, just 
to execute that link! So, if someone with HTML knowledge could help, I 
would be gratefull. How to NOT open the new page when I execute above links!

I need to open the link only when I am asking a status of a switch. 

Now for the real deal. Ideally, three functions should be done. My link 
method does only #3. and not elegantly.

1. Read data on startup and assign to variable(s). Say: read balcony 
shutter and keep info how much percent it is open. In case of a switch: it 
would say if a switch is On or Off.

2. Present read data on the button: the description of the function 
(switch) and the current state (from 1). This should look like current 
buttons in Smartskin to keep the apperance. Say: "Balcony shutter open - 
35%". Or Lamp Switch 1 - On.

3. When this "button" is pressed, execute html link under that "button" 
without opening a new window (just leave the screen as it was). As per #2. 
- it would open shutter fully (to 100%). Or toggle lamp to Off. Page can be 
reread at that time (when the answer arrives), and due to steps 1. and 2. 
new data will be presented.

Tasmota communicates simply by http requests: IP address of the switch and 
a command after =

# execute command "Power1 1" - or turn the switch 1 On
http://192.168.1.31/cm?cmnd=Power1%201

# execute command "Power1 0" - or turn the switch 1 Off
http://192.168.1.31/cm?cmnd=Power1%200

# get current status of the switch 1
http://192.168.1.31/cm?cmnd=Power1

#To each command, reply shows current state
{"POWER1":"ON"}
# or
{"POWER1":"Off"}

For shutters, it is best to use modified Tasmota.
# in case of Shutters: open Shutters 100% - command "ShutterPosition 100"
http://192.168.1.30/cm?cmnd=ShutterPosition%20100

# in case of Shutters: open Shutters to 35% - command "ShutterPosition 35"
http://192.168.1.30/cm?cmnd=ShutterPosition%2035

# ask how much % shutters are open: command "ShutterPosition"
http://192.168.1.30/cm?cmnd=ShutterPosition



will return, depending on the current state:
{"shutterposition1":100}
{"shutterposition1":35}
# and if fully closed, answer is 0
{"shutterposition1":0}



So, the system is always the same. Commands may change. But, once we have 
HTML template for just one Tasmota command, it can be modified in seconds 
for any other command. All 3 things from the above list should be done for 
a complete system.

-- 
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/bf14cc5a-1e6d-4cff-b107-2d73d64d588b%40googlegroups.com.


[weewx-user] Display local wind names

2019-09-23 Thread Pila
I would like to use and display our local wind names. I understand this may 
be impossible, but it is not my fault WeeWX impresses me so much that I 
expect it to do anything I wish :) Not my fault!

We have 8 distinct winds governing not only weather but also the mood of 
most people. Just ask the police during Jugo :) Unless I am sailing and 
watching the compass or the map, I really do not use degrees. Plus, not the 
same watching the map or a graph. We normally use local wind names. Only if 
unsure, we may use Cardinal directions for wind. But degrees - never. We do 
it this way for thousands of years :) We comment winds many times each day.

So, when the wind is NNE-NE-ENE - I would like to label it Bura. For 
ENE-E-ESE wind I would like to label it Levanat. For ESE-SE-SSE I would 
like to see Jugo and so on. If I could somehow define wind lables with 
custom resolution, it would be perfect. This wish applies to both graphs 
and the main page.

1. At main SmartPhone page, now I get (currently) Wind: 5 km/h E (98). I 
guess it shold be possible to put somewhere something like:

if $current.windDir >= 22.5 and $current.windDir <= 67.5 then label is Bura
else if $current.windDir > 67.5 and $current.windDir <= 112.5 then label is 
Levanat
else if $current.windDir > 112.5 and $current.windDir <= 157.5 then label is 
Jugo



And based on that, print cardinal leter and the wind name on the main page. 
If this is possible, I would appreciate a hint and a little help.

2. In addition to dispalying 8 or 16 cardinal points of the compass as 
Letters in the Wind graphs, I would also like to add above labels over the 
graphs indicating Wind names. Bura would go over NE - 45 deg, Levanat over 
E -90 deg, and Jugo over SE - 135 deg and so on.

I do not care if it is complicated.

-- 
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/91695557-c6d8-45d8-b2ec-4f4fbc7b140f%40googlegroups.com.


[weewx-user] graphs: Unicode and Cardinal Wind directions

2019-09-23 Thread Pila
How to get unicode letters in graph title: Kia should look like 
this: Kiša

Wind directions in graphs: how to change scale of graphs from deg to 
letters to display Cardinal points instead of numbers?

I am reading docs, and have modified many items, but these I can not get on 
my own for now.

-- 
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/5a3c3288-4cc8-4858-8a5f-e9021d4bb6eb%40googlegroups.com.