Re: [weewx-user] Looking for guidance on how to modify the Current Conditions section of the 'main page' of WeeWx

2021-02-17 Thread D R
Thank you for the replies on my question.  I think I have figured it out 
and now have a better understanding of how things work.



It is not always as one thinks it is!

Again, thank you for the replies and guidance.

Dale


--
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/52650a13-e557-b321-67d9-ab4e8150bf77%40gmail.com.


RE: [weewx-user] Looking for guidance on how to modify the Current Conditions section of the 'main page' of WeeWx

2021-02-16 Thread terry.steneker
Sorry – my post was supposed to be connected to an earlier post. Wasn’t 
supposed to be related to this.

 

From: weewx-user@googlegroups.com  On Behalf Of 
Tom Keffer
Sent: February 16, 2021 3:19 PM
To: weewx-user 
Subject: Re: [weewx-user] Looking for guidance on how to modify the Current 
Conditions section of the 'main page' of WeeWx

 

I'm sorry, but I'm not seeing the connection to adding new types to HTML pages. 
Am I missing something? Is a new type involved?

 

On Tue, Feb 16, 2021 at 3:15 PM Terry Steneker mailto:terry.stene...@gmail.com> > wrote:

I just purchased the BCRobotics board and tried to install the required 
software for it. I ran into problems when I tried to test the BME280 using the 
Adafruit ADS1x15 library. Kept getting errors and the python Adafruit_BME280 
library is deprecated. 

 

Instead of trying to fix the errors I went the hard way and upgraded to the 
adafruit-circuitpython libraries so I can also run Python3

 

sudo pip3 install adafruit-circuitpython-bme280

 

sudo pip3 install adafruit-circuitpython-ads1x15

 

I then modified the BCRobotics-test-app.py to run under Python3 and the 
upgraded Adafruit libraries.

Tested the program and it works!

 

I have attached the modified program.

 

I need to modify the driver to work the same as the updated code but not sure 
how to do that. Can I just substitute the same modifications that I made to the 
test program? 

 

Thanks

Terry

 

On Sunday, 14 February 2021 at 04:59:48 UTC-8 tke...@gmail.com 
  wrote:

The Cheetah template for "Current Conditions" is the file 
/etc/weewx/skins/Seasons.current.inc. When the processing of templates occurs, 
it will get "included" into index.html.tmpl.

 

So, if you wanted to add the current conditions for a new type, say something 
named 'myobs', to the bottom of the list of observations, you would add the 
highlighted lines

 

...

#if $day.extraTemp3.has_data
  
$obs.label.extraTemp3
$current.extraTemp3
  
#end if

  

My new observation

$current.myobs

  

  

 

 

This assumes, of course, that the type 'myobs' exists in the database and/or 
the archive record.

 

-tk

 

On Sat, Feb 13, 2021 at 6:29 PM D R mailto:daleea...@gmail.com> > wrote:

I apologize for not having come up with the answer on my own.  I have 
gone through the User and Customization guides and am just not finding 
clear guidance as to what to do, despite there being a lot of info in 
those documents.


What I want to do is add a line to the collection of items in the left 
hand "Current Condtions" list.  This section preceeds the "Celestial" 
and "High Low" portions of that column, and lies to the left of the 
graphs for the day.

 From my reading, I assumed that the area I was looking for would be in 
the /etc/weewx/skins/Seasons directory, in the 'skins.conf' file.  Yet 
as I scan through there I cannot find a series of entries that matches 
the fixed output that would then have the data to display and formatting 
info right after it.

I've looked at the Standard report, and the skins.conf there, and 
haven't found what I'm looking for.

Despite fiddling with this for a couple weeks trying to figure it out on 
my own, I'm just not making the connection or am really looking in the 
wrong spot.


Where does this section of the home page get formatted and while I think 
I know what I want to add so it shows up as the temperature change from 
24 hours ago, don't just want to start changing things which would no 
doubt give an error if not done carefully.

Can someone give me a hint as to what I'm missing to find the correct file?

Dale



-- 

You received this message because you are subscribed to the Google Groups 
"weewx-user" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+...@googlegroups.com  .
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0aad41a8-e703-6a30-df85-e13811cd48fa%40gmail.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/f8dfa80a-d3e3-46cd-88a2-6de2600df59dn%40googlegroups.com
 

 .

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "weewx-user" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/weewx-user/udZCCCJlNE8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
weewx-user+unsubscr...@googlegroups.com 

Re: [weewx-user] Looking for guidance on how to modify the Current Conditions section of the 'main page' of WeeWx

2021-02-16 Thread Tom Keffer
I'm sorry, but I'm not seeing the connection to adding new types to HTML
pages. Am I missing something? Is a new type involved?

On Tue, Feb 16, 2021 at 3:15 PM Terry Steneker 
wrote:

> I just purchased the BCRobotics board and tried to install the required
> software for it. I ran into problems when I tried to test the BME280 using
> the Adafruit ADS1x15 library. Kept getting errors and the python
> Adafruit_BME280 library is deprecated.
>
> Instead of trying to fix the errors I went the hard way and upgraded to
> the adafruit-circuitpython libraries so I can also run Python3
>
> sudo pip3 install adafruit-circuitpython-bme280
>
> sudo pip3 install adafruit-circuitpython-ads1x15
>
> I then modified the BCRobotics-test-app.py to run under Python3 and the
> upgraded Adafruit libraries.
> Tested the program and it works!
>
> I have attached the modified program.
>
> I need to modify the driver to work the same as the updated code but not
> sure how to do that. Can I just substitute the same modifications that I
> made to the test program?
>
> Thanks
> Terry
>
>
> On Sunday, 14 February 2021 at 04:59:48 UTC-8 tke...@gmail.com wrote:
>
>> The Cheetah template for "Current Conditions" is the file
>> /etc/weewx/skins/Seasons.current.inc. When the processing of templates
>> occurs, it will get "included" into index.html.tmpl.
>>
>> So, if you wanted to add the current conditions for a new type, say
>> something named 'myobs', to the bottom of the list of observations, you
>> would add the highlighted lines
>>
>> ...
>> #if $day.extraTemp3.has_data
>>   
>> $obs.label.extraTemp3
>> $current.extraTemp3
>>   
>> #end if
>>   
>> My new observation
>> $current.myobs
>>   
>> 
>>   
>>
>>
>> This assumes, of course, that the type 'myobs' exists in the database
>> and/or the archive record.
>>
>> -tk
>>
>> On Sat, Feb 13, 2021 at 6:29 PM D R  wrote:
>>
>>> I apologize for not having come up with the answer on my own.  I have
>>> gone through the User and Customization guides and am just not finding
>>> clear guidance as to what to do, despite there being a lot of info in
>>> those documents.
>>>
>>>
>>> What I want to do is add a line to the collection of items in the left
>>> hand "Current Condtions" list.  This section preceeds the "Celestial"
>>> and "High Low" portions of that column, and lies to the left of the
>>> graphs for the day.
>>>
>>>  From my reading, I assumed that the area I was looking for would be in
>>> the /etc/weewx/skins/Seasons directory, in the 'skins.conf' file.  Yet
>>> as I scan through there I cannot find a series of entries that matches
>>> the fixed output that would then have the data to display and formatting
>>> info right after it.
>>>
>>> I've looked at the Standard report, and the skins.conf there, and
>>> haven't found what I'm looking for.
>>>
>>> Despite fiddling with this for a couple weeks trying to figure it out on
>>> my own, I'm just not making the connection or am really looking in the
>>> wrong spot.
>>>
>>>
>>> Where does this section of the home page get formatted and while I think
>>> I know what I want to add so it shows up as the temperature change from
>>> 24 hours ago, don't just want to start changing things which would no
>>> doubt give an error if not done carefully.
>>>
>>> Can someone give me a hint as to what I'm missing to find the correct
>>> file?
>>>
>>> Dale
>>>
>>>
>>> --
>>>
>> You received this message because you are subscribed to the Google Groups
>>> "weewx-user" group.
>>>
>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/0aad41a8-e703-6a30-df85-e13811cd48fa%40gmail.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/f8dfa80a-d3e3-46cd-88a2-6de2600df59dn%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/CAPq0zEDo9naPZDR_hktak9y3pehDYztUgkXMfM3uvK%2BD-x%3DfsA%40mail.gmail.com.


Re: [weewx-user] Looking for guidance on how to modify the Current Conditions section of the 'main page' of WeeWx

2021-02-16 Thread Terry Steneker
I just purchased the BCRobotics board and tried to install the required 
software for it. I ran into problems when I tried to test the BME280 using 
the Adafruit ADS1x15 library. Kept getting errors and the python 
Adafruit_BME280 library is deprecated. 

Instead of trying to fix the errors I went the hard way and upgraded to the 
adafruit-circuitpython libraries so I can also run Python3

sudo pip3 install adafruit-circuitpython-bme280

sudo pip3 install adafruit-circuitpython-ads1x15

I then modified the BCRobotics-test-app.py to run under Python3 and the 
upgraded Adafruit libraries.
Tested the program and it works!

I have attached the modified program.

I need to modify the driver to work the same as the updated code but not 
sure how to do that. Can I just substitute the same modifications that I 
made to the test program? 

Thanks
Terry


On Sunday, 14 February 2021 at 04:59:48 UTC-8 tke...@gmail.com wrote:

> The Cheetah template for "Current Conditions" is the file 
> /etc/weewx/skins/Seasons.current.inc. When the processing of templates 
> occurs, it will get "included" into index.html.tmpl.
>
> So, if you wanted to add the current conditions for a new type, say 
> something named 'myobs', to the bottom of the list of observations, you 
> would add the highlighted lines
>
> ...
> #if $day.extraTemp3.has_data
>   
> $obs.label.extraTemp3
> $current.extraTemp3
>   
> #end if
>   
> My new observation
> $current.myobs
>   
> 
>   
>
>
> This assumes, of course, that the type 'myobs' exists in the database 
> and/or the archive record.
>
> -tk
>
> On Sat, Feb 13, 2021 at 6:29 PM D R  wrote:
>
>> I apologize for not having come up with the answer on my own.  I have 
>> gone through the User and Customization guides and am just not finding 
>> clear guidance as to what to do, despite there being a lot of info in 
>> those documents.
>>
>>
>> What I want to do is add a line to the collection of items in the left 
>> hand "Current Condtions" list.  This section preceeds the "Celestial" 
>> and "High Low" portions of that column, and lies to the left of the 
>> graphs for the day.
>>
>>  From my reading, I assumed that the area I was looking for would be in 
>> the /etc/weewx/skins/Seasons directory, in the 'skins.conf' file.  Yet 
>> as I scan through there I cannot find a series of entries that matches 
>> the fixed output that would then have the data to display and formatting 
>> info right after it.
>>
>> I've looked at the Standard report, and the skins.conf there, and 
>> haven't found what I'm looking for.
>>
>> Despite fiddling with this for a couple weeks trying to figure it out on 
>> my own, I'm just not making the connection or am really looking in the 
>> wrong spot.
>>
>>
>> Where does this section of the home page get formatted and while I think 
>> I know what I want to add so it shows up as the temperature change from 
>> 24 hours ago, don't just want to start changing things which would no 
>> doubt give an error if not done carefully.
>>
>> Can someone give me a hint as to what I'm missing to find the correct 
>> file?
>>
>> Dale
>>
>>
>> -- 
>>
> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>>
> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/0aad41a8-e703-6a30-df85-e13811cd48fa%40gmail.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/f8dfa80a-d3e3-46cd-88a2-6de2600df59dn%40googlegroups.com.
import time
import board
import busio
import adafruit_bme280
import adafruit_ads1x15.ads1115 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
from w1thermsensor import W1ThermSensor
import RPi.GPIO as GPIO

try:
 ds18b20 = W1ThermSensor()
except Exception as err:
print ('Error:', err)
noTemp = True
else:
print ('carry on')
noTemp = False

i2c = busio.I2C(board.SCL, board.SDA)
bme = adafruit_bme280.Adafruit_BME280_I2C(i2c)
ads = ADS.ADS1115(i2c, gain=1)
chan = AnalogIn(ads, ADS.P0)

interval = 2   # Time between loops (seconds)
windTick = 0   # Count of the wind speed input trigger
rainTick = 0   # Count of the rain input trigger

# Set GPIO pins to use BCM pin numbers
GPIO.setmode(GPIO.BCM)

# Set digital pin 17 to an input and enable the pullup (wind speed)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Set digital pin 23 to an input and enable the pullup (rain)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Event to detect wind (4 ticks per revolution)
GPIO.add_event_detect(17, GPIO.BOTH)
def windtrig(self):
global 

Re: [weewx-user] Looking for guidance on how to modify the Current Conditions section of the 'main page' of WeeWx

2021-02-14 Thread Tom Keffer
The Cheetah template for "Current Conditions" is the file
/etc/weewx/skins/Seasons.current.inc. When the processing of templates
occurs, it will get "included" into index.html.tmpl.

So, if you wanted to add the current conditions for a new type, say
something named 'myobs', to the bottom of the list of observations, you
would add the highlighted lines

...
#if $day.extraTemp3.has_data
  
$obs.label.extraTemp3
$current.extraTemp3
  
#end if
  
My new observation
$current.myobs
  

  


This assumes, of course, that the type 'myobs' exists in the database
and/or the archive record.

-tk

On Sat, Feb 13, 2021 at 6:29 PM D R  wrote:

> I apologize for not having come up with the answer on my own.  I have
> gone through the User and Customization guides and am just not finding
> clear guidance as to what to do, despite there being a lot of info in
> those documents.
>
>
> What I want to do is add a line to the collection of items in the left
> hand "Current Condtions" list.  This section preceeds the "Celestial"
> and "High Low" portions of that column, and lies to the left of the
> graphs for the day.
>
>  From my reading, I assumed that the area I was looking for would be in
> the /etc/weewx/skins/Seasons directory, in the 'skins.conf' file.  Yet
> as I scan through there I cannot find a series of entries that matches
> the fixed output that would then have the data to display and formatting
> info right after it.
>
> I've looked at the Standard report, and the skins.conf there, and
> haven't found what I'm looking for.
>
> Despite fiddling with this for a couple weeks trying to figure it out on
> my own, I'm just not making the connection or am really looking in the
> wrong spot.
>
>
> Where does this section of the home page get formatted and while I think
> I know what I want to add so it shows up as the temperature change from
> 24 hours ago, don't just want to start changing things which would no
> doubt give an error if not done carefully.
>
> Can someone give me a hint as to what I'm missing to find the correct file?
>
> Dale
>
>
> --
> 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/0aad41a8-e703-6a30-df85-e13811cd48fa%40gmail.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/CAPq0zEBqEjScP-G1X2-QeF99AmnFzOMxDjcSkEsRpBAk0Lcf-Q%40mail.gmail.com.