Re: [weewx-user] Installation issue on macOS Mojave with FineOffsetUSB

2018-12-22 Thread Greg from Oz
Put the user that is running the weewx into the dialout group?

On Wednesday, 19 December 2018 14:03:05 UTC+11, Sean Timm wrote:
>
> Matthew Wall,
>
> I installed your "usb" branch of WeeWX. I'm still getting insufficient 
> permissions. Are there code or configuration changes that I need to make to 
> get it to work?
>
> Thanks,
> Sean
>
> default 21:57:10.315482 -0500 kernel 080745.640834 Python@(null): 
> IOUSBUserClientLegacy::start: missing entitlement com.apple.ibridge.control
> default 21:57:10.319241 -0500 Python fousb: Unable to claim USB interface 
> 0: [Errno 13] Access denied (insufficient permissions)
> default 21:57:10.319311 -0500 Python import of driver failed: [Errno 13] 
> Access denied (insufficient permissions) ()
> default 21:57:10.319481 -0500 Python engine: Unable to load driver: 
> [Errno 13] Access denied (insufficient permissions)
> default 21:57:10.319504 -0500 Python   Exiting...
>
>
> On Tue, Dec 18, 2018 at 12:39 AM Sean Timm  > wrote:
>
>> Ah, I found another thread that is useful... 
>> https://groups.google.com/forum/#!topic/weewx-user/tFGnDKSXgfo
>>
>> Too late to play with it tonight, but I'll try the usb branch tomorrow. 
>> Anything that I need to be aware of?
>>
>> Thanks,
>> Sean
>>
>> On Tue, Dec 18, 2018 at 12:25 AM Sean Timm > > wrote:
>>
>>> I have a WS-2080 connected via USB (FineOffsetUSB) to a Mac Mini running 
>>> Mojave 10.14.2.
>>>
>>> I am receiving a driver error:
>>>
>>> default 23:55:14.233775 -0500 Python import of driver failed: No 
>>> backend available ()
>>> default 23:55:14.233817 -0500 Python engine: Unable to load driver: No 
>>> backend available
>>> default 23:55:14.233836 -0500 Python   Exiting...
>>>
>>> I installed WeeWX following the directions for MacOS. Two deviations 
>>> were made from the installation instructions: I installed Pillow instead of 
>>> PIL, and I ran pip with --user instead of sudo.
>>>
>>> Next I installed libusb from homebrew to see if I could fix the above 
>>> error. Now I get the following:
>>>
>>> default 00:12:21.154045 -0500 kernel 002458.086826 Python@(null): 
>>> IOUSBUserClientLegacy::start: missing entitlement com.apple.ibridge.control
>>> default 00:12:21.157183 -0500 Python fousb: Unable to claim USB 
>>> interface 0: [Errno 13] Access denied (insufficient permissions)
>>> default 00:12:21.157250 -0500 Python import of driver failed: [Errno 
>>> 13] Access denied (insufficient permissions) ()
>>> default 00:12:21.157438 -0500 Python engine: Unable to load driver: 
>>> [Errno 13] Access denied (insufficient permissions)
>>> default 00:12:21.157465 -0500 Python   Exiting...
>>>
>>> Running as 'sudo bin/weewxd weewx.conf' does not change the error 
>>> messages.
>>>
>>> It looks like Monte had a similar problem in this thread: 'version 3.3.1 
>>> on Mac OS X Yosemite "No backend available".', but I do not see that he got 
>>> it working.
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Sean
>>>
>>> -- 
>>> 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 .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Belchertown DarkSky Alerts

2018-12-22 Thread Colin Larsen
Those alerts come as a part of the NZ Metservice widget that I use - it
isn't a Darksky widget

On Sun, Dec 23, 2018 at 2:46 PM Pat  wrote:

> I don't see their alerts in the API doc. Only what Colin is doing on his
> site to have their widget embedded. Do you see something I'm missing for
> API alerting?
>
> On Thursday, December 20, 2018 at 10:13:16 PM UTC-5, rich T wrote:
>>
>> Pat
>>
>> Wondering if there was a way to pull/display the Alerts for the area from
>> Darksky using your coding?
>>
>> Rich
>>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: LW301 Support

2018-12-22 Thread Andrew Milner
have you run the driver directly?

How to run the driver directly

The driver can be run directly for diagnostic purposes.  This can be useful
when setting up the capture pipeline or for determining the sensor 
identifiers.

For example, to run in sniff mode, looking for acurite bridge sensor data:

PYTHONPATH=bin python bin/user/interceptor.py --device=acurite-bridge 
--mode=sniff --iface=eth0 --filter="src 192.168.0.4 and dst port 80"

To run in listen mode, looking for LW302 sensor data on port 9000:

PYTHONPATH=bin python bin/user/interceptor.py --device=lw30x --mode=listen 
--port=9000

Specify help for a full list of options:

PYTHONPATH=bin python bin/user/interceptor.py --help




On Sunday, 23 December 2018 00:12:14 UTC+2, julz wrote:
>
> Can any one help with this..
>
>
> Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: driver 
> version is 0.42rc2
> Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: device 
> type: lw30x
> Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: sensor 
> map: {'inTemp': 'ot.2:*.*', 'outTemp': 'ot.1:*.*'}
> Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: mode is 
> sniff
> Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: sniff 
> iface=eno1 promiscuous=0
> Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: sniff 
> filter 'src 192.168.1.158 and dst port 80'
> Dec 22 22:01:49 localhost weewx[12802]: import of driver failed: 
> Activateing packet capture failed. Error returned by packet capture library 
> was SIOCGIFHWADDR: No such device ()
> Dec 22 22:01:49 localhost weewx[12802]: engine: Unable to load driver: 
> Activateing packet capture failed. Error returned by packet capture library 
> was SIOCGIFHWADDR: No such device
> Dec 22 22:01:49 localhost weewx[12802]:  Exiting...
> Dec 22 22:05:31 localhost chronyd[2545]: Selected source 193.150.34.2
>
> cannot solve this error any body got any ideas?
> Kind regards
> Julz
>
>
>
> On Thursday, 20 December 2018 20:27:48 UTC, julz wrote:
>>
>> The compatibility chart suggests that oregon scientific LW301 & LW302 are 
>> compatible with this software but I cannot find any details on how to setup 
>> as LW301 is network connected.
>> Has anyone got the LW301 working?
>> Guess there will be more questions from other interested users as oregon 
>> has now killed the server for good!
>> Thanks in advance 
>>
>> Julz
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Belchertown DarkSky Alerts

2018-12-22 Thread Pat
I don't see their alerts in the API doc. Only what Colin is doing on his 
site to have their widget embedded. Do you see something I'm missing for 
API alerting?

On Thursday, December 20, 2018 at 10:13:16 PM UTC-5, rich T wrote:
>
> Pat
>
> Wondering if there was a way to pull/display the Alerts for the area from 
> Darksky using your coding?
>
> Rich
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Belchertown Skin 0.8.1 released

2018-12-22 Thread Pat
Haven't seen this before, my initial guess is that this is something to do 
with Cheetah I think, and not my skin necessarily. 

Does your configuration or database have some sort of ascii character in it 
like the degrees symbol or something like that?

Seems to be something with your setup. Check your configs and database?

On Friday, December 21, 2018 at 6:53:47 PM UTC-5, da...@friscoweather.com 
wrote:
>
> Hi Pat,
>
> I've installed the latest version and have followed all of your 
> instructions, however, I keep getting the following errors when weeex tries 
> to generate the actual index.html files:
>
> Dec 21 16:40:22 debian weewx[6732]: reportengine: Running report 
> Belchertown
> Dec 21 16:40:22 debian weewx[6732]: reportengine: Found configuration file 
> /etc/weewx/skins/Belchertown/skin.conf for report Belchertown
> Dec 21 16:40:22 debian weewx[6732]: cheetahgenerator: using search list 
> ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 
> 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 
> 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 
> 'user.belchertown.getData']
> Dec 21 16:40:22 debian weewx[6732]: manager: Daily summary version is 2.0
> Dec 21 16:40:22 debian weewx[6732]: Belchertown Extension: version 0.8
> Dec 21 16:40:26 debian weewx[6732]: cheetahgenerator: Generate failed with 
> exception ''
> Dec 21 16:40:26 debian weewx[6732]: cheetahgenerator:  Ignoring 
> template /etc/weewx/skins/Belchertown/about/index.html.tmpl
> Dec 21 16:40:26 debian weewx[6732]: cheetahgenerator:  Reason: 'ascii' 
> codec can't decode byte 0xef in position 0: ordinal not in range(128)
> Dec 21 16:40:26 debian weewx[6732]:   Traceback (most recent call 
> last):
> Dec 21 16:40:26 debian weewx[6732]: File 
> "/usr/share/weewx/weewx/cheetahgenerator.py", line 328, in generate
> Dec 21 16:40:26 debian weewx[6732]:   
> filtersLib=weewx.cheetahgenerator)
> Dec 21 16:40:26 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in 
> __init__
> Dec 21 16:40:26 debian weewx[6732]:   self._compile(source, file, 
> compilerSettings=compilerSettings)
> Dec 21 16:40:26 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in 
> _compile
> Dec 21 16:40:26 debian weewx[6732]:   keepRefToGeneratedCode=True)
> Dec 21 16:40:26 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
> Dec 21 16:40:26 debian weewx[6732]:   settings=(compilerSettings 
> or {}))
> Dec 21 16:40:26 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in 
> __init__
> Dec 21 16:40:26 debian weewx[6732]:   source = unicode(source)
> Dec 21 16:40:26 debian weewx[6732]:   UnicodeDecodeError: 'ascii' 
> codec can't decode byte 0xef in position 0: ordinal not in range(128)
> Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: Generate failed with 
> exception ''
> Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator:  Ignoring 
> template /etc/weewx/skins/Belchertown/index.html.tmpl
> Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator:  Reason: 'ascii' 
> codec can't decode byte 0xef in position 0: ordinal not in range(128)
> Dec 21 16:40:27 debian weewx[6732]:   Traceback (most recent call 
> last):
> Dec 21 16:40:27 debian weewx[6732]: File 
> "/usr/share/weewx/weewx/cheetahgenerator.py", line 328, in generate
> Dec 21 16:40:27 debian weewx[6732]:   
> filtersLib=weewx.cheetahgenerator)
> Dec 21 16:40:27 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1259, in 
> __init__
> Dec 21 16:40:27 debian weewx[6732]:   self._compile(source, file, 
> compilerSettings=compilerSettings)
> Dec 21 16:40:27 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1553, in 
> _compile
> Dec 21 16:40:27 debian weewx[6732]:   keepRefToGeneratedCode=True)
> Dec 21 16:40:27 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 740, in compile
> Dec 21 16:40:27 debian weewx[6732]:   settings=(compilerSettings 
> or {}))
> Dec 21 16:40:27 debian weewx[6732]: File 
> "/usr/lib/python2.7/dist-packages/Cheetah/Compiler.py", line 1579, in 
> __init__
> Dec 21 16:40:27 debian weewx[6732]:   source = unicode(source)
> Dec 21 16:40:27 debian weewx[6732]:   UnicodeDecodeError: 'ascii' 
> codec can't decode byte 0xef in position 0: ordinal not in range(128)
> Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator: Generate failed with 
> exception ''
> Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator:  Ignoring 
> template /etc/weewx/skins/Belchertown/pi/index.html.tmpl
> Dec 21 16:40:27 debian weewx[6732]: cheetahgenerator:  Reason: 'ascii' 

Re: [weewx-user] Re: Belchertown "inc" pages with Weewx tags?

2018-12-22 Thread Pat
Got it - I'd like to keep it as simple as possible. I guess I thought that 
if the .inc file was missing, then weewx would throw an exception. So by 
doing it in the SLE, if file doesn't exist it can handle that. 

I'll do some testing and simplify it if possible!

On Saturday, December 22, 2018 at 8:15:56 PM UTC-5, Thomas Keffer wrote:
>
> It's entirely up to you, but it sure is simpler than your dynamic loading 
> in the SLE's!
>
> BTW, there's nothing special about the ".inc" extension (nor the ".tmpl" 
> extension). They're just a WeeWX convention.
>
> -tk
>
> On Sat, Dec 22, 2018 at 5:10 PM Pat > 
> wrote:
>
>> Oh, I'm using the #inc directive already 
>> .
>>  
>> But not with *.inc files. Your suggestion is to #inc the .inc's?
>>
>> On Saturday, December 22, 2018 at 7:46:40 PM UTC-5, Thomas Keffer wrote:
>>>
>>> See the #include 
>>>  
>>> directive in the Cheetah manual for details.
>>>
>>> If you're going to be working much with skins, it's worth looking 
>>> through the Cheetah manual. There's lots of cool stuff in there!
>>>
>>> -tk
>>>
>>> On Sat, Dec 22, 2018 at 7:21 AM Pat  wrote:
>>>
 This is an interesting question because I didn't know Cheetah could 
 handle .inc files natively. So I've been processing them as part of 
 the SLE seen here 
 
 . 

 Which is why I said I don't think the Belchertown skin can do tags 
 within the inc because I'm doing it differently. With that said maybe what 
 I'm doing is overkill?


 On Thursday, December 20, 2018 at 7:34:10 PM UTC-5, Colin Larsen wrote:
>
> That makes a lot of sense, I'll have a play with changing it around.
>
> Cheers
> Colin
>
> On Friday, 21 December 2018 13:15:39 UTC+13, Thomas Keffer wrote:
>>
>> Yes, there is more than one way to do it.
>>
>> However, it's important to note that the end result is not the same. 
>> If you do a Cheetah #include directive (my suggestion, and what the 
>> Seasons 
>> skin does), the page is included *at template processing time*. 
>> You'll end up with a single HTML page with all the content.
>>
>> By contrast, your approach includes the file *at runtime* in the 
>> client. It will involve an extra HTTP fetch to get the second HTML file.
>>
>> -tk
>>
>> On Thu, Dec 20, 2018 at 3:42 PM Colin Larsen  
>> wrote:
>>
>>> Ok found it solution - sorry Pat, answering my own question but 
>>> other may be interested :)
>>>
>>> First I created a tmpl file with the tags I wanted (I called it 
>>> stationinfo.html.tmpl) and saved that in the skins/Belchertown directory
>>>
>>> I then edited skin.conf to include the new tmpl file, just below the 
>>> [[[about]]] I added
>>>
>>> [[[stationinfo]]]
>>>
>>> template = stationinfo.html.tmpl
>>>
>>> This generated my html file in the web root directory
>>>
>>> I then used this script that I found in my inc file
>>>
>>>  
>>>
>>>  
>>>  
>>> $(function(){
>>>   
>>> $("#includedContent").load("http://41south.net.nz/stationinfo.html";); 
>>> });
>>>  
>>>
>>>
>>>
>>>  
>>>
>>>
>>>
>>> Voila - I have the information in the inc section . :)
>>>
>>> I'm sure there are some grammatical errors here so far as html goes, 
>>> but it works
>>>
>>> Cheers
>>> Colin
>>>
>>> On Friday, 21 December 2018 12:27:14 UTC+13, Pat wrote:

 Hmm. I don't think so, but let me look into it. 

 On Thursday, December 20, 2018 at 5:50:54 PM UTC-5, Colin Larsen 
 wrote:
>
> Hi all
>
> Quick group question as my html skills are not fantastic;
>
> Pat has made available some 'inc' pages to put custom code 
> sections in various places on his skin. Full html code works fine and 
> I've 
> put together an alternative 3 day forecast section already to replace 
> Darksky, which is for some reason inaccurate down here.
>
> My question is, how would I put Weewx tags into one of these 
> pages? I assume it would require a tmpl file with the tags which is 
> then 
> included in Pats inc file - sort of nested html?
>
> Any pointers appreciated
>
> Cheers
> Colin 
>
 -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop 

Re: [weewx-user] Re: Belchertown "inc" pages with Weewx tags?

2018-12-22 Thread Thomas Keffer
It's entirely up to you, but it sure is simpler than your dynamic loading
in the SLE's!

BTW, there's nothing special about the ".inc" extension (nor the ".tmpl"
extension). They're just a WeeWX convention.

-tk

On Sat, Dec 22, 2018 at 5:10 PM Pat  wrote:

> Oh, I'm using the #inc directive already
> .
> But not with *.inc files. Your suggestion is to #inc the .inc's?
>
> On Saturday, December 22, 2018 at 7:46:40 PM UTC-5, Thomas Keffer wrote:
>>
>> See the #include
>> 
>> directive in the Cheetah manual for details.
>>
>> If you're going to be working much with skins, it's worth looking through
>> the Cheetah manual. There's lots of cool stuff in there!
>>
>> -tk
>>
>> On Sat, Dec 22, 2018 at 7:21 AM Pat  wrote:
>>
>>> This is an interesting question because I didn't know Cheetah could
>>> handle .inc files natively. So I've been processing them as part of the
>>> SLE seen here
>>> 
>>> .
>>>
>>> Which is why I said I don't think the Belchertown skin can do tags
>>> within the inc because I'm doing it differently. With that said maybe what
>>> I'm doing is overkill?
>>>
>>>
>>> On Thursday, December 20, 2018 at 7:34:10 PM UTC-5, Colin Larsen wrote:

 That makes a lot of sense, I'll have a play with changing it around.

 Cheers
 Colin

 On Friday, 21 December 2018 13:15:39 UTC+13, Thomas Keffer wrote:
>
> Yes, there is more than one way to do it.
>
> However, it's important to note that the end result is not the same.
> If you do a Cheetah #include directive (my suggestion, and what the 
> Seasons
> skin does), the page is included *at template processing time*.
> You'll end up with a single HTML page with all the content.
>
> By contrast, your approach includes the file *at runtime* in the
> client. It will involve an extra HTTP fetch to get the second HTML file.
>
> -tk
>
> On Thu, Dec 20, 2018 at 3:42 PM Colin Larsen 
> wrote:
>
>> Ok found it solution - sorry Pat, answering my own question but other
>> may be interested :)
>>
>> First I created a tmpl file with the tags I wanted (I called it
>> stationinfo.html.tmpl) and saved that in the skins/Belchertown directory
>>
>> I then edited skin.conf to include the new tmpl file, just below the
>> [[[about]]] I added
>>
>> [[[stationinfo]]]
>>
>> template = stationinfo.html.tmpl
>>
>> This generated my html file in the web root directory
>>
>> I then used this script that I found in my inc file
>>
>> 
>>   
>> 
>> 
>> $(function(){
>>   
>> $("#includedContent").load("http://41south.net.nz/stationinfo.html";);
>> });
>> 
>>   
>>
>>   
>>  
>>
>>
>>
>> Voila - I have the information in the inc section . :)
>>
>> I'm sure there are some grammatical errors here so far as html goes,
>> but it works
>>
>> Cheers
>> Colin
>>
>> On Friday, 21 December 2018 12:27:14 UTC+13, Pat wrote:
>>>
>>> Hmm. I don't think so, but let me look into it.
>>>
>>> On Thursday, December 20, 2018 at 5:50:54 PM UTC-5, Colin Larsen
>>> wrote:

 Hi all

 Quick group question as my html skills are not fantastic;

 Pat has made available some 'inc' pages to put custom code sections
 in various places on his skin. Full html code works fine and I've put
 together an alternative 3 day forecast section already to replace 
 Darksky,
 which is for some reason inaccurate down here.

 My question is, how would I put Weewx tags into one of these pages?
 I assume it would require a tmpl file with the tags which is then 
 included
 in Pats inc file - sort of nested html?

 Any pointers appreciated

 Cheers
 Colin

>>> --
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
>>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the 

Re: [weewx-user] access to archive_day_outTemp from a new service

2018-12-22 Thread Thomas Keffer
You need to import it before using it.

import weewx.tags

-tk

On Sat, Dec 22, 2018 at 10:19 AM Mic G77  wrote:

> Don't pay attention to my previous post. It was just a bracket missing.
> Now I get the following error :
> déc. 22 19:13:15 raspberry weewx[7261]: File
> "/usr/share/weewx/weewx/engine.py", line 570, in post_loop
> déc. 22 19:13:15 raspberry weewx[7261]:   self._software_catchup()
> déc. 22 19:13:15 raspberry weewx[7261]: File
> "/usr/share/weewx/weewx/engine.py", line 634, in _software_catchup
> déc. 22 19:13:15 raspberry weewx[7261]: 
>  self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, ...are'))
> déc. 22 19:13:15 raspberry weewx[7261]: File
> "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
> déc. 22 19:13:15 raspberry weewx[7261]:   callback(event)
> déc. 22 19:13:15 raspberry weewx[7261]: File
> "/usr/share/weewx/user/alarm.py", line 116, in newArchiveRecord
> déc. 22 19:13:15 raspberry weewx[7261]:   time_binder =
> weewx.tags.TimeBinder(db_lookup, event.record['dateTime'])
> déc. 22 19:13:15 raspberry weewx[7261]:   AttributeError: 'module'
> object has no attribute 'tags'
> déc. 22 19:13:15 raspberry weewx[7261]:   Exiting.
> Hint: Some lines were ellipsized, use -l to show in full.
>
>
>
>
> And this is my service (it s badly written, i know):
>
> import time
> import smtplib
> from email.mime.text import MIMEText
> import threading
> import syslog
>
> import weewx
> from weewx.engine import StdService
> from weeutil.weeutil import timestamp_to_string, option_as_list
>
> sumwater = "/var/tmp/SumWater"
>
>
> # Inherit from the base class StdService:
> class MyAlarm(StdService):
> """Service that sends email if an arbitrary expression evaluates
> true"""
>
> def __init__(self, engine, config_dict):
> # Pass the initialization information on to my superclass:
> super(MyAlarm, self).__init__(engine, config_dict)
>
> # This will hold the time when the last alarm message went out:
> self.last_msg_ts = 0
>
> #self.water_period = 1200 #20 minutes
> #self.water_alarm = 100 # seuil en litre d'envoi du mail
> self.water_events = []
> self.archive_water_events = []
> #self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
>
> try:
> # Dig the needed options out of the configuration dictionary.
> # If a critical option is missing, an exception will be raised
> and
> # the alarm will not be set.
> self.expression= config_dict['Alarm']['expression']
> self.water_period  =
> int(config_dict['Alarm'].get('water_period'))
> self.water_alarm   =
> int(config_dict['Alarm'].get('water_alarm'))
> self.time_wait = int(config_dict['Alarm'].get('time_wait',
> 3600))
> self.smtp_host = config_dict['Alarm']['smtp_host']
> self.smtp_user = config_dict['Alarm'].get('smtp_user')
> self.smtp_password = config_dict['Alarm'].get('smtp_password')
> self.SUBJECT   = config_dict['Alarm'].get('subject',
> "Alarm message from weewx")
> self.FROM  = config_dict['Alarm'].get('from', '
> al...@example.com')
> self.TO=
> option_as_list(config_dict['Alarm']['mailto'])
> syslog.syslog(syslog.LOG_INFO, "alarm: Alarm set for
> expression: '%s'" % self.expression)
>
> # If we got this far, it's ok to start intercepting events:
> self.bind(weewx.NEW_ARCHIVE_RECORD, self.newArchiveRecord)
>  # NOTE 1
> except KeyError, e:
> syslog.syslog(syslog.LOG_INFO, "alarm: No alarm set.  Missing
> parameter: %s" % e)
>
>
> def newArchiveRecord(self, event):
> """Gets called on a new archive record event."""
>
> db_lookup = self.engine.db_binder.bind_default()
> time_binder = weewx.tags.TimeBinder(db_lookup,
> event.record['dateTime'])
> todays_water = time_binder.day().water.sum
> with open(sumwater,'w') as new_file:
> # new_file.write(time_binder)
>  new_file.write(todays_water)
>
>
>
> # To avoid a flood of nearly identical emails, this will do
> # the check only if we have never sent an email, or if we haven't
> # sent one in the last self.time_wait seconds:
> if not self.last_msg_ts or abs(time.time() - self.last_msg_ts) >=
> self.time_wait :
> # Get the new archive record:
> record = event.record
>
> # Be prepared to catch an exception in the case that the
> expression contains
> # a variable that is not in the record:
>
> AlarmWater = MyAlarm.CheckAlarmWater(self, record)
>
> try:
># NOTE 2
> # Evaluate the expression in the context of the event
> archive record.
> # Sound the alarm if it 

Re: [weewx-user] Re: Belchertown "inc" pages with Weewx tags?

2018-12-22 Thread Pat
Oh, I'm using the #inc directive already 
.
 
But not with *.inc files. Your suggestion is to #inc the .inc's?

On Saturday, December 22, 2018 at 7:46:40 PM UTC-5, Thomas Keffer wrote:
>
> See the #include 
>  
> directive in the Cheetah manual for details.
>
> If you're going to be working much with skins, it's worth looking through 
> the Cheetah manual. There's lots of cool stuff in there!
>
> -tk
>
> On Sat, Dec 22, 2018 at 7:21 AM Pat > 
> wrote:
>
>> This is an interesting question because I didn't know Cheetah could 
>> handle .inc files natively. So I've been processing them as part of the 
>> SLE seen here 
>> 
>> . 
>>
>> Which is why I said I don't think the Belchertown skin can do tags within 
>> the inc because I'm doing it differently. With that said maybe what I'm 
>> doing is overkill?
>>
>>
>> On Thursday, December 20, 2018 at 7:34:10 PM UTC-5, Colin Larsen wrote:
>>>
>>> That makes a lot of sense, I'll have a play with changing it around.
>>>
>>> Cheers
>>> Colin
>>>
>>> On Friday, 21 December 2018 13:15:39 UTC+13, Thomas Keffer wrote:

 Yes, there is more than one way to do it.

 However, it's important to note that the end result is not the same. If 
 you do a Cheetah #include directive (my suggestion, and what the Seasons 
 skin does), the page is included *at template processing time*. You'll 
 end up with a single HTML page with all the content.

 By contrast, your approach includes the file *at runtime* in the 
 client. It will involve an extra HTTP fetch to get the second HTML file.

 -tk

 On Thu, Dec 20, 2018 at 3:42 PM Colin Larsen  
 wrote:

> Ok found it solution - sorry Pat, answering my own question but other 
> may be interested :)
>
> First I created a tmpl file with the tags I wanted (I called it 
> stationinfo.html.tmpl) and saved that in the skins/Belchertown directory
>
> I then edited skin.conf to include the new tmpl file, just below the 
> [[[about]]] I added
>
> [[[stationinfo]]]
>
> template = stationinfo.html.tmpl
>
> This generated my html file in the web root directory
>
> I then used this script that I found in my inc file
>
>  
>
>  
>  
> $(function(){
>   
> $("#includedContent").load("http://41south.net.nz/stationinfo.html";); 
> });
>  
>
>
>
>  
>
>
>
> Voila - I have the information in the inc section . :)
>
> I'm sure there are some grammatical errors here so far as html goes, 
> but it works
>
> Cheers
> Colin
>
> On Friday, 21 December 2018 12:27:14 UTC+13, Pat wrote:
>>
>> Hmm. I don't think so, but let me look into it. 
>>
>> On Thursday, December 20, 2018 at 5:50:54 PM UTC-5, Colin Larsen 
>> wrote:
>>>
>>> Hi all
>>>
>>> Quick group question as my html skills are not fantastic;
>>>
>>> Pat has made available some 'inc' pages to put custom code sections 
>>> in various places on his skin. Full html code works fine and I've put 
>>> together an alternative 3 day forecast section already to replace 
>>> Darksky, 
>>> which is for some reason inaccurate down here.
>>>
>>> My question is, how would I put Weewx tags into one of these pages? 
>>> I assume it would require a tmpl file with the tags which is then 
>>> included 
>>> in Pats inc file - sort of nested html?
>>>
>>> Any pointers appreciated
>>>
>>> Cheers
>>> Colin 
>>>
>> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.
>
 -- 
>> 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 .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: LW301 Support

2018-12-22 Thread julz
Can any one help with this..


Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: driver 
version is 0.42rc2
Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: device 
type: lw30x
Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: sensor 
map: {'inTemp': 'ot.2:*.*', 'outTemp': 'ot.1:*.*'}
Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: mode is 
sniff
Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: sniff 
iface=eno1 promiscuous=0
Dec 22 22:01:49 localhost weewx[12802]: interceptor: MainThread: sniff 
filter 'src 192.168.1.158 and dst port 80'
Dec 22 22:01:49 localhost weewx[12802]: import of driver failed: 
Activateing packet capture failed. Error returned by packet capture library 
was SIOCGIFHWADDR: No such device ()
Dec 22 22:01:49 localhost weewx[12802]: engine: Unable to load driver: 
Activateing packet capture failed. Error returned by packet capture library 
was SIOCGIFHWADDR: No such device
Dec 22 22:01:49 localhost weewx[12802]:  Exiting...
Dec 22 22:05:31 localhost chronyd[2545]: Selected source 193.150.34.2

cannot solve this error any body got any ideas?
Kind regards
Julz



On Thursday, 20 December 2018 20:27:48 UTC, julz wrote:
>
> The compatibility chart suggests that oregon scientific LW301 & LW302 are 
> compatible with this software but I cannot find any details on how to setup 
> as LW301 is network connected.
> Has anyone got the LW301 working?
> Guess there will be more questions from other interested users as oregon 
> has now killed the server for good!
> Thanks in advance 
>
> Julz
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] access to archive_day_outTemp from a new service

2018-12-22 Thread Mic G77
Don't pay attention to my previous post. It was just a bracket missing.
Now I get the following error :
déc. 22 19:13:15 raspberry weewx[7261]: File 
"/usr/share/weewx/weewx/engine.py", line 570, in post_loop
déc. 22 19:13:15 raspberry weewx[7261]:   self._software_catchup()
déc. 22 19:13:15 raspberry weewx[7261]: File 
"/usr/share/weewx/weewx/engine.py", line 634, in _software_catchup
déc. 22 19:13:15 raspberry weewx[7261]:  
 self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, ...are'))
déc. 22 19:13:15 raspberry weewx[7261]: File 
"/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
déc. 22 19:13:15 raspberry weewx[7261]:   callback(event)
déc. 22 19:13:15 raspberry weewx[7261]: File 
"/usr/share/weewx/user/alarm.py", line 116, in newArchiveRecord
déc. 22 19:13:15 raspberry weewx[7261]:   time_binder = 
weewx.tags.TimeBinder(db_lookup, event.record['dateTime'])
déc. 22 19:13:15 raspberry weewx[7261]:   AttributeError: 'module' 
object has no attribute 'tags'
déc. 22 19:13:15 raspberry weewx[7261]:   Exiting.
Hint: Some lines were ellipsized, use -l to show in full.




And this is my service (it s badly written, i know):

import time
import smtplib
from email.mime.text import MIMEText
import threading
import syslog

import weewx
from weewx.engine import StdService
from weeutil.weeutil import timestamp_to_string, option_as_list

sumwater = "/var/tmp/SumWater"


# Inherit from the base class StdService:
class MyAlarm(StdService):
"""Service that sends email if an arbitrary expression evaluates true"""

def __init__(self, engine, config_dict):
# Pass the initialization information on to my superclass:
super(MyAlarm, self).__init__(engine, config_dict)

# This will hold the time when the last alarm message went out:
self.last_msg_ts = 0

#self.water_period = 1200 #20 minutes
#self.water_alarm = 100 # seuil en litre d'envoi du mail
self.water_events = []
self.archive_water_events = []  
#self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)   
 
try:
# Dig the needed options out of the configuration dictionary.
# If a critical option is missing, an exception will be raised 
and
# the alarm will not be set.
self.expression= config_dict['Alarm']['expression']
self.water_period  = 
int(config_dict['Alarm'].get('water_period'))
self.water_alarm   = 
int(config_dict['Alarm'].get('water_alarm'))
self.time_wait = int(config_dict['Alarm'].get('time_wait', 
3600))
self.smtp_host = config_dict['Alarm']['smtp_host']
self.smtp_user = config_dict['Alarm'].get('smtp_user')
self.smtp_password = config_dict['Alarm'].get('smtp_password')
self.SUBJECT   = config_dict['Alarm'].get('subject', "Alarm 
message from weewx")
self.FROM  = config_dict['Alarm'].get('from', 
'al...@example.com')
self.TO= 
option_as_list(config_dict['Alarm']['mailto'])
syslog.syslog(syslog.LOG_INFO, "alarm: Alarm set for 
expression: '%s'" % self.expression)

# If we got this far, it's ok to start intercepting events:
self.bind(weewx.NEW_ARCHIVE_RECORD, self.newArchiveRecord)# 
NOTE 1
except KeyError, e:
syslog.syslog(syslog.LOG_INFO, "alarm: No alarm set.  Missing 
parameter: %s" % e)
   
  
def newArchiveRecord(self, event):
"""Gets called on a new archive record event."""

db_lookup = self.engine.db_binder.bind_default()
time_binder = weewx.tags.TimeBinder(db_lookup, 
event.record['dateTime'])
todays_water = time_binder.day().water.sum
with open(sumwater,'w') as new_file:
# new_file.write(time_binder)
 new_file.write(todays_water)



# To avoid a flood of nearly identical emails, this will do
# the check only if we have never sent an email, or if we haven't
# sent one in the last self.time_wait seconds:
if not self.last_msg_ts or abs(time.time() - self.last_msg_ts) >= 
self.time_wait :
# Get the new archive record:
record = event.record

# Be prepared to catch an exception in the case that the 
expression contains 
# a variable that is not in the record:

AlarmWater = MyAlarm.CheckAlarmWater(self, record)

try:   
   # NOTE 2
# Evaluate the expression in the context of the event 
archive record.
# Sound the alarm if it evaluates true:
if eval(self.expression, None, record) or AlarmWater : 
  # NOTE 3

[weewx-user] Re: LW301 Support

2018-12-22 Thread julz
Hi Andrew,
Have a new centos 7 install there are no errors in the log all functions 
well with simulator, 
but when i select the user.interceptor driver and change setting to lw30x 
there are still no errors in the log 
however the web page stops updating and all appears to freeze (No activity 
in the log) 
Is there a way to test that the driver is receiving lw301 data?
Have I missed something in the config?

Many Thanks

Julz




On Friday, 21 December 2018 18:13:58 UTC, Andrew Milner wrote:
>
> 1. is there anything in the log?
> 2. delete the old database which has simulator data in it and start afresh.
>
>
>
> On Friday, 21 December 2018 18:39:45 UTC+2, julz wrote:
>>
>> Thanks Garry,
>> have followed all setup to the letter, including successful install of 
>> interceptor, but cannot get any further webpage appears to have stopped 
>> after selecting the interceptor driver and data is only as from the 
>> simulator.  Has any one out there managed to get the lw301 working?
>> Any advice appreciated.
>>
>> On Thursday, 20 December 2018 20:51:22 UTC, gjr80 wrote:
>>>
>>> Hi,
>>>
>>> Looks like these stations are supported via the interceptor driver (
>>> https://github.com/matthewwall/weewx-interceptor). The interceptor 
>>> driver is still classed as experimental (though has been in use for some 
>>> time now) so there may still be some issues. The github readme has 
>>> instructions for installation but you may also find some useful info in the 
>>> comments at the top of the interceptor.py file. After installing the driver 
>>> interceptor.py will be in /home/weewx/bin/user or /usr/share/weewx/bin/user 
>>> depending on your install type.
>>>
>>> Gary
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] access to archive_day_outTemp from a new service

2018-12-22 Thread Mic G77
Hello,
I've tried and I get a the following error.
have you any idea?


Dec 22 18:26:44 raspberry weewx[5746]: engine: Finished loading service 
user.energie.AddEnergie
Dec 22 18:26:44 raspberry weewx[5746]: engine: Loading service 
user.alarm.MyAlarm
Dec 22 18:26:44 raspberry weewx[5746]: engine: Caught unrecoverable 
exception in engine:
Dec 22 18:26:44 raspberry weewx[5746]:   invalid syntax (alarm.py, 
line 114)
Dec 22 18:26:44 raspberry weewx[5746]:   Traceback (most recent 
call last):
Dec 22 18:26:44 raspberry weewx[5746]: File 
"/usr/share/weewx/weewx/engine.py", line 871, in main
Dec 22 18:26:44 raspberry weewx[5746]:   engine = 
engine_class(config_dict)
Dec 22 18:26:44 raspberry weewx[5746]: File 
"/usr/share/weewx/weewx/engine.py", line 78, in __init__
Dec 22 18:26:44 raspberry weewx[5746]:  
 self.loadServices(config_dict)
Dec 22 18:26:44 raspberry weewx[5746]: File 
"/usr/share/weewx/weewx/engine.py", line 142, in loadServices
Dec 22 18:26:44 raspberry weewx[5746]:  
 self.service_obj.append(weeutil.weeutil._get_object(svc)(self, 
config_dict))
Dec 22 18:26:44 raspberry weewx[5746]: File 
"/usr/share/weewx/weeutil/weeutil.py", line 1132, in _get_object
Dec 22 18:26:44 raspberry weewx[5746]:   mod = 
__import__(module)
Dec 22 18:26:44 raspberry weewx[5746]: File 
"/usr/share/weewx/user/alarm.py", line 114
Dec 22 18:26:44 raspberry weewx[5746]:   todays_water = 
time_binder.day().water.sum
Dec 22 18:26:44 raspberry weewx[5746]:  ^
Dec 22 18:26:44 raspberry weewx[5746]:   SyntaxError: invalid syntax
Dec 22 18:26:44 raspberry weewx[5746]:   Exiting.
Dec 22 18:26:44 raspberry systemd[1]: Started LSB: weewx weather system.
Dec 22 18:26:44 raspberry weewx[5732]: Starting weewx weather system: weewx.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: Belchertown "inc" pages with Weewx tags?

2018-12-22 Thread Pat
This is an interesting question because I didn't know Cheetah could handle 
.inc files natively. So I've been processing them as part of the SLE seen 
here 

. 

Which is why I said I don't think the Belchertown skin can do tags within 
the inc because I'm doing it differently. With that said maybe what I'm 
doing is overkill?


On Thursday, December 20, 2018 at 7:34:10 PM UTC-5, Colin Larsen wrote:
>
> That makes a lot of sense, I'll have a play with changing it around.
>
> Cheers
> Colin
>
> On Friday, 21 December 2018 13:15:39 UTC+13, Thomas Keffer wrote:
>>
>> Yes, there is more than one way to do it.
>>
>> However, it's important to note that the end result is not the same. If 
>> you do a Cheetah #include directive (my suggestion, and what the Seasons 
>> skin does), the page is included *at template processing time*. You'll 
>> end up with a single HTML page with all the content.
>>
>> By contrast, your approach includes the file *at runtime* in the client. 
>> It will involve an extra HTTP fetch to get the second HTML file.
>>
>> -tk
>>
>> On Thu, Dec 20, 2018 at 3:42 PM Colin Larsen  wrote:
>>
>>> Ok found it solution - sorry Pat, answering my own question but other 
>>> may be interested :)
>>>
>>> First I created a tmpl file with the tags I wanted (I called it 
>>> stationinfo.html.tmpl) and saved that in the skins/Belchertown directory
>>>
>>> I then edited skin.conf to include the new tmpl file, just below the 
>>> [[[about]]] I added
>>>
>>> [[[stationinfo]]]
>>>
>>> template = stationinfo.html.tmpl
>>>
>>> This generated my html file in the web root directory
>>>
>>> I then used this script that I found in my inc file
>>>
>>>  
>>>
>>>  
>>>  
>>> $(function(){
>>>   $("#includedContent").load("http://41south.net.nz/stationinfo.html";); 
>>> });
>>>  
>>>
>>>
>>>
>>>  
>>>
>>>
>>>
>>> Voila - I have the information in the inc section . :)
>>>
>>> I'm sure there are some grammatical errors here so far as html goes, but 
>>> it works
>>>
>>> Cheers
>>> Colin
>>>
>>> On Friday, 21 December 2018 12:27:14 UTC+13, Pat wrote:

 Hmm. I don't think so, but let me look into it. 

 On Thursday, December 20, 2018 at 5:50:54 PM UTC-5, Colin Larsen wrote:
>
> Hi all
>
> Quick group question as my html skills are not fantastic;
>
> Pat has made available some 'inc' pages to put custom code sections in 
> various places on his skin. Full html code works fine and I've put 
> together 
> an alternative 3 day forecast section already to replace Darksky, which 
> is 
> for some reason inaccurate down here.
>
> My question is, how would I put Weewx tags into one of these pages? I 
> assume it would require a tmpl file with the tags which is then included 
> in 
> Pats inc file - sort of nested html?
>
> Any pointers appreciated
>
> Cheers
> Colin 
>
 -- 
>>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Neowx

2018-12-22 Thread kutzenco
I believe he's asking how to download the latest version of the neowx skin, 
not the latest version of weeWX. He can download the skin by going to 
https://projects.neoground.com/neowx and selecting Free Download.
phil

On Friday, December 21, 2018 at 10:12:46 PM UTC-5, Andrew Milner wrote:
>
> does this help:
> http://weewx.com/docs/upgrading.htm
>
>
>
> On Friday, 21 December 2018 21:02:39 UTC+2, ve2se wrote:
>>
>> Neowx 
>> First download the latest version and put it on your linux machine where 
>> weewx is running.
>> There so many directories for weewx . witch one i have to download neowx ?
>> tnx 
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.