[weewx-user] Re: degree symbol not showing?

2016-11-22 Thread Robin
Hi Jim,

I had the same problem. I solved it by creating a template with a single 
line
 

$current.outTemp.string


Then adding

   [[[Temperature]]]
  encoding = utf8
  template = temperature.txt.tmpl

to the standard skin.conf file.

I can now read the text file and add it to my webcam capture as seen here 
*Molyvos 
Weather Camera *



On Wednesday, 23 November 2016 00:30:08 UTC+2, Jim W. wrote:
>
> At the risk of inciting the fury of AM...  I have a question regarding the 
> degree symbol. I'm using the tag $current.outTemp and 
> $current.outTemp.format("%.1f")  and both produce the expected result 
> EXCEPT without the little degree symbol? I have read, re-read... and 
> re-re-read the Customization guide but can't figure it out?
> Thanks for any insight!
>
> Ps... If this question causes an apoplectic reaction please hit the delete 
> key... take a deep breath and think of butterflies! 
>

-- 
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] FTP to remote host in Simulator mode

2016-11-22 Thread Andrew Milner

Oh well, we can't win them all!!  Thanks for trying though - and am just 
glad that at least you solved the problem even if we can't get to the 
actual cause.

Glad to have helped in a small way.


On Wednesday, 23 November 2016 04:49:00 UTC+2, Dan'l B wrote:

> I have tried to re-create the setup that appeared to cause this problem 
> but am unable to do so
>
> However, here is part of the syslog from when the issue happened; I hope 
> this is useful:
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Running report FTP
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Found configuration 
>>> file /etc/weewx/skins/Ftp/skin.conf for report FTP
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: ftpupload: Attempting connection 
>>> to ftp.suiattle.net
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Caught 
>>> unrecoverable exception in generator weewx.reportengine.FtpGenerator
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   cannot concatenate 
>>> 'str' and 'list' objects
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   Traceback (most 
>>> recent call last):
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>>> "/usr/share/weewx/weewx/reportengine.py", line 238, in run
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   obj.start()
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>>> "/usr/share/weewx/weewx/reportengine.py", line 271, in start
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   self.run()
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>>> "/usr/share/weewx/weewx/reportengine.py", line 322, in run
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   n = 
>>> ftp_data.run()
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>>> "/usr/share/weewx/weeutil/ftpupload.py", line 100, in run
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:  
>>>  ftp_server.login(self.user, self.password)
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>>> "/usr/lib/python2.7/ftplib.py", line 393, in login
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   if resp[0] == 
>>> '3': resp = self.sendcmd('PASS ' + passwd)
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   TypeError: cannot 
>>> concatenate 'str' and 'list' objects
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]:   Generator terminated
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Running report RSYNC
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Found configuration 
>>> file /etc/weewx/skins/Rsync/skin.conf for report RSYNC
>>
>> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: rsync upload not 
>>> requested. Skipped.
>>
>>
>>
>
> On Sunday, November 13, 2016 at 10:12:57 AM UTC-5, Tom Keffer wrote:
>>
>> Kudos, Andrew. You called it.
>>
>> And, I share your curiosity on how this could cause a password problem. 
>> I'd also like to find an engineering solution so it doesn't happen again.
>>
>> So, again, please post the log.
>>
>> -tk
>>
>> On Sun, Nov 13, 2016 at 7:03 AM, Andrew Milner  
>> wrote:
>>
>>> Now that you have got it working - can you satisfy my curiosity - and 
>>> put the keyboard back to swiss French and possibly try and identify exactly 
>>> what the problem is/was?  Is it the keyboard selection itself or is it a 
>>> specific character which you have to type?  Just curious to know precisely 
>>> how keyboard selection can cause a password issue which is not resolved by 
>>> enclosing the password in quotes!!
>>>
>>>
>>>
>>> On Sunday, 13 November 2016 16:57:35 UTC+2, Dan'l B wrote:
>>>
 Bingo! You spotted it.

 The language on both machines was set to English US, and the keyboard 
 on both set to Swiss French, which is the keyboard I use. Once I set the 
 keyboard to US Standard Dvorak, and re-typed the FTP entries, it worked 
 immediately!

 Great call, Many thanks!

 On Sunday, November 13, 2016 at 9:06:47 AM UTC-5, Andrew Milner wrote:
>
> Are the locales on the two machines set the same?  Looks like an 
> os/locale/encoding schema issue of some sort.  Have you edited the .conf 
> on 
> another machine at any time?  Run it through dos2unix just in case.
>
> On Sunday, 13 November 2016 15:54:39 UTC+2, Dan'l B wrote:
>>
>> Will do. But as a footnote, when I set up the FTP service in the 
>> WeeWx install on the Mac (which sits right next to the RPi3) the FTP 
>> works 
>> flawlessly, using the exact same settings as on the Rpi, which is the 
>> unit 
>> having this issue.
>>
>> On Sunday, November 13, 2016 at 7:54:32 AM UTC-5, Tom Keffer wrote:
>>>
>>> Very mysterious.
>>>
>>> Please set debug=1, restart weewx, then send the log through the 
>>> first FTP attempt.
>>>
>>> -tk
>>>
>>> On Sat, Nov 12, 2016 at 8:31 PM, Dan'l B  
>>> wrote:

Re: [weewx-user] degree symbol not showing?

2016-11-22 Thread Andrew Milner
What a SUPER paper Tom - just what I could have done with when when in my 
prime and making international systems for use from USA to Russia and all 
points inbetween . now it's a case of proving the old dog is capable of 
learning new tricks that is a beautifully crafted paper though with 
just the right levels of seriousness and light-heartedness.

Not had such an informed read for a long time.

Thanks for the link - now bookmarked for posterity!!


On Wednesday, 23 November 2016 03:55:16 UTC+2, Tom Keffer wrote:

> About a decade ago, I read this paper *The Absolute Minimum Every 
> Software Developer Absolutely, Positively Must Know About Unicode and 
> Character Sets .* It 
> does a great job of explaining code sets. Even if you're not a developer, 
> it explains why some email comes out as gobbledygook. Highly recommended.
>
> -tk
>
> On Tue, Nov 22, 2016 at 5:39 PM, Jim W. 
> > wrote:
>
>> Thanks Tom. I appreciate all the help you have given me!
>>
>> On Tuesday, November 22, 2016 at 6:58:20 PM UTC-5, Tom Keffer wrote:
>>>
>>> The directive "strict_ascii" means just that: only characters that can 
>>> be represented in the 7 bits, or 127 characters, of the ascii code set will 
>>> be printed. This does not include the degree sign.
>>>
>>> If you truly want a degree symbol, you will have to choose an encoding. 
>>> While there are dozens out there, weewx offers only two: 'html_entities', 
>>> or 'utf8'. 
>>>
>>> The former, html_entities, will cause weewx to emit
>>>
>>> °
>>>
>>>
>>> which all browsers will recognize as a degree sign. Most text editors 
>>> will not.
>>>
>>> The latter, utf8, will use multibyte encoding and weewx will emit two 
>>> bytes
>>>
>>> 0xC2 0xB0
>>>
>>>
>>> which most browsers and text editors will print as a degree sign. But, 
>>> not all. 
>>>
>>> I would suggest using utf8 and see if that works for you.
>>>
>>> I know code sets can seem terribly confusing and that's because they 
>>> are. There are countless different ways of jamming all the characters we 
>>> commonly use in a handful of bytes. Fortunately, these days, the world has 
>>> pretty much settled on UTF8.
>>>
>>> -tk
>>>
>>>
>>>
>>> On Tue, Nov 22, 2016 at 3:44 PM, Jim W.  wrote:
>>>
 Sorry.. Rpi3b running latest Raspbian. Installed from DEB package. I 
 have modified the Standard skin.conf file with:


 [[[temp.txt]]]
 # Report that makes current outTemp available to other 
 program
 encoding = strict_ascii
 template = temp.txt.tmpl

 and the temp.txt.tmpl file looks like:

 $current.dateTime
 $current.outTemp.format("%.1f")
 $trend.outTemp
  
 and the txt file generated looks like:


 11/22/2016 06:30:00 PM
 37.6F
 -4.2F

 Thanks for any insight!

  




 On Tuesday, November 22, 2016 at 5:40:47 PM UTC-5, Tom Keffer wrote:
>
> We're going to need a little more information. Is this a stock weewx 
> installation? Or, have you made modifications to the skins or to 
> skin.conf?
>
> What is the platform?
>
> -tk
>
>
>
>
>
> On Tue, Nov 22, 2016 at 2:30 PM, Jim W.  wrote:
>
>> At the risk of inciting the fury of AM...  I have a question 
>> regarding the degree symbol. I'm using the tag $current.outTemp and 
>> $current.outTemp.format("%.1f")  and both produce the expected 
>> result EXCEPT without the little degree symbol? I have read, re-read... 
>> and 
>> re-re-read the Customization guide but can't figure it out?
>> Thanks for any insight!
>>
>> Ps... If this question causes an apoplectic reaction please hit the 
>> delete key... take a deep breath and think of butterflies! 
>>
>> -- 
>> 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+...@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 

Re: [weewx-user] FTP to remote host in Simulator mode

2016-11-22 Thread Dan'l B
I have tried to re-create the setup that appeared to cause this problem but 
am unable to do so

However, here is part of the syslog from when the issue happened; I hope 
this is useful:

Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Running report FTP
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Found configuration 
>> file /etc/weewx/skins/Ftp/skin.conf for report FTP
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: ftpupload: Attempting connection 
>> to ftp.suiattle.net
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Caught unrecoverable 
>> exception in generator weewx.reportengine.FtpGenerator
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   cannot concatenate 
>> 'str' and 'list' objects
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   Traceback (most 
>> recent call last):
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>> "/usr/share/weewx/weewx/reportengine.py", line 238, in run
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   obj.start()
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>> "/usr/share/weewx/weewx/reportengine.py", line 271, in start
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   self.run()
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>> "/usr/share/weewx/weewx/reportengine.py", line 322, in run
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   n = 
>> ftp_data.run()
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>> "/usr/share/weewx/weeutil/ftpupload.py", line 100, in run
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:  
>>  ftp_server.login(self.user, self.password)
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: File 
>> "/usr/lib/python2.7/ftplib.py", line 393, in login
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   if resp[0] == 
>> '3': resp = self.sendcmd('PASS ' + passwd)
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   TypeError: cannot 
>> concatenate 'str' and 'list' objects
>
> Nov 12 06:20:19 WeatherPi weewx[11707]:   Generator terminated
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Running report RSYNC
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: Found configuration 
>> file /etc/weewx/skins/Rsync/skin.conf for report RSYNC
>
> Nov 12 06:20:19 WeatherPi weewx[11707]: reportengine: rsync upload not 
>> requested. Skipped.
>
>
>

On Sunday, November 13, 2016 at 10:12:57 AM UTC-5, Tom Keffer wrote:
>
> Kudos, Andrew. You called it.
>
> And, I share your curiosity on how this could cause a password problem. 
> I'd also like to find an engineering solution so it doesn't happen again.
>
> So, again, please post the log.
>
> -tk
>
> On Sun, Nov 13, 2016 at 7:03 AM, Andrew Milner  > wrote:
>
>> Now that you have got it working - can you satisfy my curiosity - and put 
>> the keyboard back to swiss French and possibly try and identify exactly 
>> what the problem is/was?  Is it the keyboard selection itself or is it a 
>> specific character which you have to type?  Just curious to know precisely 
>> how keyboard selection can cause a password issue which is not resolved by 
>> enclosing the password in quotes!!
>>
>>
>>
>> On Sunday, 13 November 2016 16:57:35 UTC+2, Dan'l B wrote:
>>
>>> Bingo! You spotted it.
>>>
>>> The language on both machines was set to English US, and the keyboard on 
>>> both set to Swiss French, which is the keyboard I use. Once I set the 
>>> keyboard to US Standard Dvorak, and re-typed the FTP entries, it worked 
>>> immediately!
>>>
>>> Great call, Many thanks!
>>>
>>> On Sunday, November 13, 2016 at 9:06:47 AM UTC-5, Andrew Milner wrote:

 Are the locales on the two machines set the same?  Looks like an 
 os/locale/encoding schema issue of some sort.  Have you edited the .conf 
 on 
 another machine at any time?  Run it through dos2unix just in case.

 On Sunday, 13 November 2016 15:54:39 UTC+2, Dan'l B wrote:
>
> Will do. But as a footnote, when I set up the FTP service in the WeeWx 
> install on the Mac (which sits right next to the RPi3) the FTP works 
> flawlessly, using the exact same settings as on the Rpi, which is the 
> unit 
> having this issue.
>
> On Sunday, November 13, 2016 at 7:54:32 AM UTC-5, Tom Keffer wrote:
>>
>> Very mysterious.
>>
>> Please set debug=1, restart weewx, then send the log through the 
>> first FTP attempt.
>>
>> -tk
>>
>> On Sat, Nov 12, 2016 at 8:31 PM, Dan'l B  wrote:
>>
>>> Thanks for the wee_debug, which shows I am editing the correct file, 
>>> in /etc/weewx
>>>
>>> I can email or pm you the actual login details if you wish to 
>>> double-check.
>>>
>>>
>>> On Saturday, November 12, 2016 at 7:15:04 PM UTC-5, gjr80 wrote:

 As an aside, wee_debug 
  can be 

Re: [weewx-user] degree symbol not showing?

2016-11-22 Thread Thomas Keffer
About a decade ago, I read this paper *The Absolute Minimum Every Software
Developer Absolutely, Positively Must Know About Unicode and Character Sets
.* It does a great job
of explaining code sets. Even if you're not a developer, it explains why
some email comes out as gobbledygook. Highly recommended.

-tk

On Tue, Nov 22, 2016 at 5:39 PM, Jim W.  wrote:

> Thanks Tom. I appreciate all the help you have given me!
>
> On Tuesday, November 22, 2016 at 6:58:20 PM UTC-5, Tom Keffer wrote:
>>
>> The directive "strict_ascii" means just that: only characters that can
>> be represented in the 7 bits, or 127 characters, of the ascii code set will
>> be printed. This does not include the degree sign.
>>
>> If you truly want a degree symbol, you will have to choose an encoding.
>> While there are dozens out there, weewx offers only two: 'html_entities',
>> or 'utf8'.
>>
>> The former, html_entities, will cause weewx to emit
>>
>> °
>>
>>
>> which all browsers will recognize as a degree sign. Most text editors
>> will not.
>>
>> The latter, utf8, will use multibyte encoding and weewx will emit two
>> bytes
>>
>> 0xC2 0xB0
>>
>>
>> which most browsers and text editors will print as a degree sign. But,
>> not all.
>>
>> I would suggest using utf8 and see if that works for you.
>>
>> I know code sets can seem terribly confusing and that's because they are.
>> There are countless different ways of jamming all the characters we
>> commonly use in a handful of bytes. Fortunately, these days, the world has
>> pretty much settled on UTF8.
>>
>> -tk
>>
>>
>>
>> On Tue, Nov 22, 2016 at 3:44 PM, Jim W.  wrote:
>>
>>> Sorry.. Rpi3b running latest Raspbian. Installed from DEB package. I
>>> have modified the Standard skin.conf file with:
>>>
>>>
>>> [[[temp.txt]]]
>>> # Report that makes current outTemp available to other
>>> program
>>> encoding = strict_ascii
>>> template = temp.txt.tmpl
>>>
>>> and the temp.txt.tmpl file looks like:
>>>
>>> $current.dateTime
>>> $current.outTemp.format("%.1f")
>>> $trend.outTemp
>>>
>>> and the txt file generated looks like:
>>>
>>>
>>> 11/22/2016 06:30:00 PM
>>> 37.6F
>>> -4.2F
>>>
>>> Thanks for any insight!
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tuesday, November 22, 2016 at 5:40:47 PM UTC-5, Tom Keffer wrote:

 We're going to need a little more information. Is this a stock weewx
 installation? Or, have you made modifications to the skins or to skin.conf?

 What is the platform?

 -tk





 On Tue, Nov 22, 2016 at 2:30 PM, Jim W.  wrote:

> At the risk of inciting the fury of AM...  I have a question regarding
> the degree symbol. I'm using the tag $current.outTemp and
> $current.outTemp.format("%.1f")  and both produce the expected result
> EXCEPT without the little degree symbol? I have read, re-read... and
> re-re-read the Customization guide but can't figure it out?
> Thanks for any insight!
>
> Ps... If this question causes an apoplectic reaction please hit the
> delete key... take a deep breath and think of butterflies!
>
> --
> 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.
>

-- 
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] degree symbol not showing?

2016-11-22 Thread Jim W.
Thanks Tom. I appreciate all the help you have given me!

On Tuesday, November 22, 2016 at 6:58:20 PM UTC-5, Tom Keffer wrote:
>
> The directive "strict_ascii" means just that: only characters that can be 
> represented in the 7 bits, or 127 characters, of the ascii code set will be 
> printed. This does not include the degree sign.
>
> If you truly want a degree symbol, you will have to choose an encoding. 
> While there are dozens out there, weewx offers only two: 'html_entities', 
> or 'utf8'. 
>
> The former, html_entities, will cause weewx to emit
>
> °
>
>
> which all browsers will recognize as a degree sign. Most text editors will 
> not.
>
> The latter, utf8, will use multibyte encoding and weewx will emit two 
> bytes
>
> 0xC2 0xB0
>
>
> which most browsers and text editors will print as a degree sign. But, not 
> all. 
>
> I would suggest using utf8 and see if that works for you.
>
> I know code sets can seem terribly confusing and that's because they are. 
> There are countless different ways of jamming all the characters we 
> commonly use in a handful of bytes. Fortunately, these days, the world has 
> pretty much settled on UTF8.
>
> -tk
>
>
>
> On Tue, Nov 22, 2016 at 3:44 PM, Jim W. 
> > wrote:
>
>> Sorry.. Rpi3b running latest Raspbian. Installed from DEB package. I have 
>> modified the Standard skin.conf file with:
>>
>>
>> [[[temp.txt]]]
>> # Report that makes current outTemp available to other program
>> encoding = strict_ascii
>> template = temp.txt.tmpl
>>
>> and the temp.txt.tmpl file looks like:
>>
>> $current.dateTime
>> $current.outTemp.format("%.1f")
>> $trend.outTemp
>>  
>> and the txt file generated looks like:
>>
>>
>> 11/22/2016 06:30:00 PM
>> 37.6F
>> -4.2F
>>
>> Thanks for any insight!
>>
>>  
>>
>>
>>
>>
>> On Tuesday, November 22, 2016 at 5:40:47 PM UTC-5, Tom Keffer wrote:
>>>
>>> We're going to need a little more information. Is this a stock weewx 
>>> installation? Or, have you made modifications to the skins or to skin.conf?
>>>
>>> What is the platform?
>>>
>>> -tk
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Nov 22, 2016 at 2:30 PM, Jim W.  wrote:
>>>
 At the risk of inciting the fury of AM...  I have a question regarding 
 the degree symbol. I'm using the tag $current.outTemp and 
 $current.outTemp.format("%.1f")  and both produce the expected result 
 EXCEPT without the little degree symbol? I have read, re-read... and 
 re-re-read the Customization guide but can't figure it out?
 Thanks for any insight!

 Ps... If this question causes an apoplectic reaction please hit the 
 delete key... take a deep breath and think of butterflies! 

 -- 
 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.


Re: [weewx-user] degree symbol not showing?

2016-11-22 Thread Thomas Keffer
The directive "strict_ascii" means just that: only characters that can be
represented in the 7 bits, or 127 characters, of the ascii code set will be
printed. This does not include the degree sign.

If you truly want a degree symbol, you will have to choose an encoding.
While there are dozens out there, weewx offers only two: 'html_entities',
or 'utf8'.

The former, html_entities, will cause weewx to emit

°


which all browsers will recognize as a degree sign. Most text editors will
not.

The latter, utf8, will use multibyte encoding and weewx will emit two bytes

0xC2 0xB0


which most browsers and text editors will print as a degree sign. But, not
all.

I would suggest using utf8 and see if that works for you.

I know code sets can seem terribly confusing and that's because they are.
There are countless different ways of jamming all the characters we
commonly use in a handful of bytes. Fortunately, these days, the world has
pretty much settled on UTF8.

-tk



On Tue, Nov 22, 2016 at 3:44 PM, Jim W.  wrote:

> Sorry.. Rpi3b running latest Raspbian. Installed from DEB package. I have
> modified the Standard skin.conf file with:
>
>
> [[[temp.txt]]]
> # Report that makes current outTemp available to other program
> encoding = strict_ascii
> template = temp.txt.tmpl
>
> and the temp.txt.tmpl file looks like:
>
> $current.dateTime
> $current.outTemp.format("%.1f")
> $trend.outTemp
>
> and the txt file generated looks like:
>
>
> 11/22/2016 06:30:00 PM
> 37.6F
> -4.2F
>
> Thanks for any insight!
>
>
>
>
>
>
> On Tuesday, November 22, 2016 at 5:40:47 PM UTC-5, Tom Keffer wrote:
>>
>> We're going to need a little more information. Is this a stock weewx
>> installation? Or, have you made modifications to the skins or to skin.conf?
>>
>> What is the platform?
>>
>> -tk
>>
>>
>>
>>
>>
>> On Tue, Nov 22, 2016 at 2:30 PM, Jim W.  wrote:
>>
>>> At the risk of inciting the fury of AM...  I have a question regarding
>>> the degree symbol. I'm using the tag $current.outTemp and
>>> $current.outTemp.format("%.1f")  and both produce the expected result
>>> EXCEPT without the little degree symbol? I have read, re-read... and
>>> re-re-read the Customization guide but can't figure it out?
>>> Thanks for any insight!
>>>
>>> Ps... If this question causes an apoplectic reaction please hit the
>>> delete key... take a deep breath and think of butterflies!
>>>
>>> --
>>> 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.
>

-- 
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] degree symbol not showing?

2016-11-22 Thread Jim W.
Oh... and weewx version = 3.5.0

On Tuesday, November 22, 2016 at 6:44:27 PM UTC-5, Jim W. wrote:
>
> Sorry.. Rpi3b running latest Raspbian. Installed from DEB package. I have 
> modified the Standard skin.conf file with:
>
>
> [[[temp.txt]]]
> # Report that makes current outTemp available to other program
> encoding = strict_ascii
> template = temp.txt.tmpl
>
> and the temp.txt.tmpl file looks like:
>
> $current.dateTime
> $current.outTemp.format("%.1f")
> $trend.outTemp
>  
> and the txt file generated looks like:
>
>
> 11/22/2016 06:30:00 PM
> 37.6F
> -4.2F
>
> Thanks for any insight!
>
>  
>
>
>
>
> On Tuesday, November 22, 2016 at 5:40:47 PM UTC-5, Tom Keffer wrote:
>>
>> We're going to need a little more information. Is this a stock weewx 
>> installation? Or, have you made modifications to the skins or to skin.conf?
>>
>> What is the platform?
>>
>> -tk
>>
>>
>>
>>
>>
>> On Tue, Nov 22, 2016 at 2:30 PM, Jim W.  wrote:
>>
>>> At the risk of inciting the fury of AM...  I have a question regarding 
>>> the degree symbol. I'm using the tag $current.outTemp and 
>>> $current.outTemp.format("%.1f")  and both produce the expected result 
>>> EXCEPT without the little degree symbol? I have read, re-read... and 
>>> re-re-read the Customization guide but can't figure it out?
>>> Thanks for any insight!
>>>
>>> Ps... If this question causes an apoplectic reaction please hit the 
>>> delete key... take a deep breath and think of butterflies! 
>>>
>>> -- 
>>> 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] degree symbol not showing?

2016-11-22 Thread Jim W.
Sorry.. Rpi3b running latest Raspbian. Installed from DEB package. I have 
modified the Standard skin.conf file with:


[[[temp.txt]]]
# Report that makes current outTemp available to other program
encoding = strict_ascii
template = temp.txt.tmpl

and the temp.txt.tmpl file looks like:

$current.dateTime
$current.outTemp.format("%.1f")
$trend.outTemp
 
and the txt file generated looks like:


11/22/2016 06:30:00 PM
37.6F
-4.2F

Thanks for any insight!

 




On Tuesday, November 22, 2016 at 5:40:47 PM UTC-5, Tom Keffer wrote:
>
> We're going to need a little more information. Is this a stock weewx 
> installation? Or, have you made modifications to the skins or to skin.conf?
>
> What is the platform?
>
> -tk
>
>
>
>
>
> On Tue, Nov 22, 2016 at 2:30 PM, Jim W. 
> > wrote:
>
>> At the risk of inciting the fury of AM...  I have a question regarding 
>> the degree symbol. I'm using the tag $current.outTemp and 
>> $current.outTemp.format("%.1f")  and both produce the expected result 
>> EXCEPT without the little degree symbol? I have read, re-read... and 
>> re-re-read the Customization guide but can't figure it out?
>> Thanks for any insight!
>>
>> Ps... If this question causes an apoplectic reaction please hit the 
>> delete key... take a deep breath and think of butterflies! 
>>
>> -- 
>> 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: Weewx to weatherdisplay

2016-11-22 Thread Topher Webb
Hi Michael,

Have you managed to get WeeWX picking up SDL weather data? I have the SDL 
stuff up and running,but want to be able to export data to my own 'dot com' 
as I used to with Weather-Display when I was using a Davis Vantage.

I cant seem to get WeeWx picking up the SDL data, any help would be 
appreciated



On Saturday, 29 October 2016 02:54:35 UTC+10:30, Mike Whimick wrote:
>
>
> Thankyou Gary for your reply.
>
> I lke Weewx sinse its runs on a Raspberry Pi, something that the full 
> version of WeatherDisplay does not.
>
> For the past 10 years I have been using a Oregon Scientific WMR200 weather 
> station connected to my PC, which has verved me well.   Sadly many of its 
> sensors are coming the the end of their of lfe, so I had a needed to decide 
> whether to replace it with another shop bought station or try and make one.
>
> I chose the latter, and have almost finished writing a python weewx driver 
> which is being used with a GrovePI+ board , Switchdoc labs weatherboard and 
> Raspberry Pi3 and various sensors.   
>
> Since both the station are Weewx are worthing well, I would now like Weewx 
> to send data from my Raspberry Pi to the PC that has WeatherDisplay running 
> on it.  At this moment in time I have not been able to workout a method 
> that works.  I have tried weewxwd-1.0.0 extention, sadly it does not seem 
> to work with WD, so I need and alternative method.
>
> I would be interested hearing form anyone who may have mannaged to get 
> Weewx to export data to WD.
>
> Michael
>

-- 
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: Error running cmon on OS X

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 5:50:02 PM UTC-5, Dan'l B wrote:
>
>
> 22/11/2016 17:40:14.628 weewx[91421]: File 
>> "/Users/Shared/weewx/bin/user/cmon.py", line 581, in get_data
>
> 22/11/2016 17:40:14.628 weewx[91421]:   record['cpu_' + k] = v 
>> - self.last_cpu[k]
>
> 22/11/2016 17:40:14.628 weewx[91421]:   TypeError: unsupported 
>> operand type(s) for -: 'NoneType' and 'NoneType'
>
> 22/11/2016 17:40:14.629 weewx[91421]:   Exiting.
>
>
>>
interesting.  which version of macos are you running?

the attached v0.15rc3 makes fewer assumptions about cpu and net stats, so 
it should avoid this problem.

m 

-- 
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.
# $Id: cmon.py 1574 2016-11-22 22:03:36Z mwall $
# Copyright 2013 Matthew Wall
"""weewx module that records cpu, memory, disk, and network usage.

This file contains both a weewx driver and a weewx service.

Installation

Put this file in the bin/user directory.


Service Configuration

Add the following to weewx.conf:

[ComputerMonitor]
data_binding = cmon_binding
max_age = 2592000 # 30 days; None to store indefinitely

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
schema = user.cmon.schema

[Databases]
[[cmon_sqlite]]
root = %(WEEWX_ROOT)s
database_name = archive/cmon.sdb
driver = weedb.sqlite

[Engine]
[[Services]]
archive_services = ..., user.cmon.ComputerMonitor


Driver Configuration

Add the following to weewx.conf:

[Station]
station_type = ComputerMonitor

[ComputerMonitor]
polling_interval = 30
driver = user.cmon


Schema

The default schema is defined in this file.  If you prefer to maintain a schema
different than the default, specify the desired schema in the configuration.
For example, this would be a schema that stores only memory and network data,
and uses eth1 instead of the default eth0:

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
[[[schema]]]
dateTime = INTEGER NOT NULL PRIMARY KEY
usUnits = INTEGER NOT NULL
interval = INTEGER NOT NULL
mem_total = INTEGER
mem_free = INTEGER
mem_used = INTEGER
swap_total = INTEGER
swap_free = INTEGER
swap_used = INTEGER
net_eth1_rbytes = INTEGER
net_eth1_rpackets = INTEGER
net_eth1_rerrs = INTEGER
net_eth1_rdrop = INTEGER
net_eth1_tbytes = INTEGER
net_eth1_tpackets = INTEGER
net_eth1_terrs = INTEGER
net_eth1_tdrop = INTEGER

Another approach to maintaining a custom schema is to define the schema in the
file user/extensions.py as cmonSchema:

cmonSchema = [
('dateTime', 'INTEGER NOT NULL PRIMARY KEY'),
('usUnits', 'INTEGER NOT NULL'),
('interval', 'INTEGER NOT NULL'),
('mem_total','INTEGER'),
('mem_free','INTEGER'),
('mem_used','INTEGER'),
('net_eth1_rbytes','INTEGER'),
('net_eth1_rpackets','INTEGER'),
('net_eth1_rerrs','INTEGER'),
('net_eth1_rdrop','INTEGER'),
('net_eth1_tbytes','INTEGER'),
('net_eth1_tpackets','INTEGER'),
('net_eth1_terrs','INTEGER'),
('net_eth1_tdrop','INTEGER'),
]

then load it using this configuration:

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
schema = user.extensions.cmonSchema
"""

# FIXME: make these methods platform-independent instead of linux-specific
# FIXME: deal with MB/GB in memory sizes
# FIXME: save the total counts instead of the deltas
# FIXME: refactor ups and rpi specialties


from __future__ import with_statement
import os
import platform
import re
import syslog
import time
from subprocess import Popen, PIPE

import weewx
import weeutil.weeutil
from weewx.drivers import AbstractDevice
from weewx.engine import StdService

DRIVER_NAME = "ComputerMonitor"
DRIVER_VERSION = "0.15rc3"

if weewx.__version__ < "3":
raise weewx.UnsupportedFeature("weewx 3 is required, found %s" %
   weewx.__version__)

schema = [
('dateTime', 'INTEGER NOT NULL PRIMARY KEY'),
('usUnits', 'INTEGER NOT NULL'),
('interval', 'INTEGER NOT NULL'),
('mem_total', 'INTEGER'),
('mem_free', 'INTEGER'),
('mem_used', 'INTEGER'),
('swap_total', 'INTEGER'),
('swap_free', 'INTEGER'),
('swap_used', 'INTEGER'),
('cpu_user', 'INTEGER'),
('cpu_nice', 'INTEGER'),
('cpu_system', 'INTEGER'),
('cpu_idle', 'INTEGER'),

[weewx-user] Re: Error running cmon on OS X

2016-11-22 Thread Dan'l B
On Tuesday, November 22, 2016 at 5:23:48 PM UTC-5, mwall wrote:
>
> sorry about that.  fixed in the attached v0.15rc2
>
> 22/11/2016 17:40:14.625 weewx[91421]: engine: Caught unrecoverable 
> exception in engine:

22/11/2016 17:40:14.625 weewx[91421]:   unsupported operand type(s) 
> for -: 'NoneType' and 'NoneType'

22/11/2016 17:40:14.627 weewx[91421]:   Traceback (most recent call 
> last):

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/weewx/engine.py", line 844, in main

22/11/2016 17:40:14.628 weewx[91421]:   engine.run()

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/weewx/engine.py", line 200, in run

22/11/2016 17:40:14.628 weewx[91421]:  
>  self.dispatchEvent(weewx.Event(weewx.POST_LOOP))

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/weewx/engine.py", line 222, in dispatchEvent

22/11/2016 17:40:14.628 weewx[91421]:   callback(event)

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/weewx/engine.py", line 563, in post_loop

22/11/2016 17:40:14.628 weewx[91421]:   self._software_catchup()

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/weewx/engine.py", line 614, in _software_catchup

22/11/2016 17:40:14.628 weewx[91421]:  
>  self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, 
> record=record, origin='software'))

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/weewx/engine.py", line 222, in dispatchEvent

22/11/2016 17:40:14.628 weewx[91421]:   callback(event)

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/user/cmon.py", line 699, in new_archive_record

22/11/2016 17:40:14.628 weewx[91421]:  
>  self.save_data(self.get_data(now, self.last_ts))

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/user/cmon.py", line 719, in get_data

22/11/2016 17:40:14.628 weewx[91421]:   record = 
> self.collector.get_data(now_ts)

22/11/2016 17:40:14.628 weewx[91421]: File 
> "/Users/Shared/weewx/bin/user/cmon.py", line 581, in get_data

22/11/2016 17:40:14.628 weewx[91421]:   record['cpu_' + k] = v 
> - self.last_cpu[k]

22/11/2016 17:40:14.628 weewx[91421]:   TypeError: unsupported 
> operand type(s) for -: 'NoneType' and 'NoneType'

22/11/2016 17:40:14.629 weewx[91421]:   Exiting.

 

-- 
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: No data from station

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 7:33:31 AM UTC-5, Dafydd P wrote:
>
> Have been following this thread with interest as I am having the same 
> issues. Current setup is a WMR300 connected to a RPi 3 running Rasbian 
> Jessie. Installed 3.6.2 and had the same usb issue. Tried installing the 
> 0.15RC2 driver but had a different error. As it was a new setup I 
> downgraded to 3.5.0 to ensure that all was working ok. This was successful 
> so I'm happy the hardware is ok.
>
> I will try and put 3.6.2 back on and retry the updated driver. If anybody 
> has any further info about this it would be much appreciated,
>
>
daff,

could you post both of the errors you saw (weewx 3.6.2 and weewx 3.6.2 with 
0.15rc2 driver)

then try weewx 3.6.2, but with the attached 0.15rc3.  i would like to be 
sure that the problem is just in the driver, not in the weewx version.

if that fails, post the exception stack then try weewx 3.6.2 with the 0.9 
driver from weewx 3.5.0

there are bugs in rain calculation and barometer in 0.9, these are fixed by 
0.15

whereas 0.15rc2 used the 'repr' approach, 0.15rc3 reverts to the 'args' 
approach for inspecting a USBError type.  the args approach is known to 
fail on some versions of libusb/pyusb.

cameron, i know your pain...

m  

-- 
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.
#!/usr/bin/env python
# Copyright 2015 Matthew Wall
# See the file LICENSE.txt for your rights.
#
# Credits:
# Thanks to Benji for the identification and decoding of 7 packet types
#
# Thanks to Eric G for posting USB captures and providing hardware for testing
#   https://groups.google.com/forum/#!topic/weewx-development/5R1ahy2NFsk
#
# Thanks to Zahlii
#   https://bsweather.myworkbook.de/category/weather-software/
#
# No thanks to oregon scientific - repeated requests for hardware and/or
# specifications resulted in no response at all.

# TODO: battery level for each sensor
# TODO: signal strength for each sensor
# TODO: altitude
# TODO: archive interval

# FIXME: warn if altitude in pressure packet does not match weewx altitude

# FIXME: figure out unknown bytes in history packet

# FIXME: decode the 0xdb packets

# FIXME: figure out how to automatically reset the rain counter, otherwise
# rain count is not recorded once the counter hits maximum value.

# FIXME: the read/write logic is rather brittle.  it appears that communication
# must be initiated with an interrupt write.  after that, the station will
# spew data.  this implementation starts with a read, which will fail with
# a 'No data available' usb error.  that results in an empty buffer (instead
# of an exception popping up the stack) so that a heartbeat write is sent.
# the genLoopPacket and genStartupRecords logic should be refactored to make
# this behiavor explicit.

# FIXME: if the operating system is localized, the check for the string
# 'No data available' will probably fail.  we should check for a code instead,
# but it is not clear whether such an element is available in a usb.USBError
# object, or whether it is available across different pyusb versions.

"""Driver for Oregon Scientific WMR300 weather stations.

Sensor data transmission frequencies:
  wind: 2.5 to 3 seconds
TH: 10 to 12 seconds
  rain: 20 to 24 seconds

The station supports 1 wind, 1 rain, 1 UV, and up to 8 temperature/humidity
sensors.

Sniffing USB traffic shows all communication is interrupt.  The endpoint
descriptors for the device show this as well.  Response timing is 1.

The station ships with "Weather OS PRO" software for windows.  This was used
for the USB sniffing.

Internal observation names use the convention name_with_specifier.  These are
mapped to the wview or other schema as needed with a configuration setting.
For example, for the wview schema, wind_speed maps to windSpeed, temperature_0
maps to inTemp, and humidity_1 maps to outHumidity.

Maximum value for rain counter is 4 mm (10160 in) (0x9c 0x40).  The counter
does not wrap; it must be reset when it hits maximum value otherwise rain data
will not be recorded.


Message types -

packet types from station:
57 - station type/model; history count
41 - ACK
D2 - history; 128 bytes
D3 - temperature/humidity/dewpoint; 61 bytes
D4 - wind; 54 bytes
D5 - rain; 40 bytes
D6 - pressure; 46 bytes
DB - forecast; 32 bytes
DC - temperature/humidity ranges; 62 bytes

packet types from host:
A6 - heartbeat
41 - ACK
65 - ? each of these is ack-ed by the station
cd - ? start history request? last two bytes are one after most recent read
35 - ? finish history request? last two bytes are latest record count
72 - ?
73 - ?

notes:
WOP sends A6 message every 20 seconds
WOP requests history at startup, then again every 120 minute

[weewx-user] Re: No data from station

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 7:33:31 AM UTC-5, Dafydd P wrote:
>
> Hi Guys
>
> Have been following this thread with interest as I am having the same 
> issues. Current setup is a WMR300 connected to a RPi 3 running Rasbian 
> Jessie. Installed 3.6.2 and had the same usb issue. Tried installing the 
> 0.15RC2 driver but had a different error. As it was a new setup I 
> downgraded to 3.5.0 to ensure that all was working ok. This was successful 
> so I'm happy the hardware is ok.
>
> I will try and put 3.6.2 back on and retry the updated driver. If anybody 
> has any further info about this it would be much appreciated,
>

daff,

could you post both of the errors you saw (weewx 3.6.2 and weewx 3.6.2 with 
0.15rc2 driver)

then try weewx 3.6.2, but with the attached 0.15rc3.  i would like to be 
sure that the problem is just in the driver, not in the weewx version.

if that fails, post the exception stack then try weewx 3.6.2 with the 0.9 
driver from weewx 3.5.0

there are bugs in rain calculation and barometer in 0.9, these are fixed by 
0.15

whereas 0.15rc2 used the 'repr' approach, 0.15rc3 reverts to the 'args' 
approach for inspecting a USBError type.  the args approach is known to 
fail on some versions of libusb/pyusb.

cameron, i know your pain...

m 

-- 
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] degree symbol not showing?

2016-11-22 Thread Thomas Keffer
We're going to need a little more information. Is this a stock weewx
installation? Or, have you made modifications to the skins or to skin.conf?

What is the platform?

-tk





On Tue, Nov 22, 2016 at 2:30 PM, Jim W.  wrote:

> At the risk of inciting the fury of AM...  I have a question regarding the
> degree symbol. I'm using the tag $current.outTemp and
> $current.outTemp.format("%.1f")  and both produce the expected result
> EXCEPT without the little degree symbol? I have read, re-read... and
> re-re-read the Customization guide but can't figure it out?
> Thanks for any insight!
>
> Ps... If this question causes an apoplectic reaction please hit the delete
> key... take a deep breath and think of butterflies!
>
> --
> 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] degree symbol not showing?

2016-11-22 Thread Jim W.
At the risk of inciting the fury of AM...  I have a question regarding the 
degree symbol. I'm using the tag $current.outTemp and 
$current.outTemp.format("%.1f")  and both produce the expected result 
EXCEPT without the little degree symbol? I have read, re-read... and 
re-re-read the Customization guide but can't figure it out?
Thanks for any insight!

Ps... If this question causes an apoplectic reaction please hit the delete 
key... take a deep breath and think of butterflies! 

-- 
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: Error running cmon on OS X

2016-11-22 Thread Dan'l B
On Tuesday, November 22, 2016 at 5:23:48 PM UTC-5, mwall wrote:
>
> sorry about that.  fixed in the attached v0.15rc2
>
> No problem, glad to debug! 

-- 
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: Error running cmon on OS X

2016-11-22 Thread mwall
sorry about that.  fixed in the attached v0.15rc2


-- 
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.
# $Id: cmon.py 1574 2016-11-22 22:03:36Z mwall $
# Copyright 2013 Matthew Wall
"""weewx module that records cpu, memory, disk, and network usage.

This file contains both a weewx driver and a weewx service.

Installation

Put this file in the bin/user directory.


Service Configuration

Add the following to weewx.conf:

[ComputerMonitor]
data_binding = cmon_binding
max_age = 2592000 # 30 days; None to store indefinitely

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
schema = user.cmon.schema

[Databases]
[[cmon_sqlite]]
root = %(WEEWX_ROOT)s
database_name = archive/cmon.sdb
driver = weedb.sqlite

[Engine]
[[Services]]
archive_services = ..., user.cmon.ComputerMonitor


Driver Configuration

Add the following to weewx.conf:

[Station]
station_type = ComputerMonitor

[ComputerMonitor]
polling_interval = 30
driver = user.cmon


Schema

The default schema is defined in this file.  If you prefer to maintain a schema
different than the default, specify the desired schema in the configuration.
For example, this would be a schema that stores only memory and network data,
and uses eth1 instead of the default eth0:

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
[[[schema]]]
dateTime = INTEGER NOT NULL PRIMARY KEY
usUnits = INTEGER NOT NULL
interval = INTEGER NOT NULL
mem_total = INTEGER
mem_free = INTEGER
mem_used = INTEGER
swap_total = INTEGER
swap_free = INTEGER
swap_used = INTEGER
net_eth1_rbytes = INTEGER
net_eth1_rpackets = INTEGER
net_eth1_rerrs = INTEGER
net_eth1_rdrop = INTEGER
net_eth1_tbytes = INTEGER
net_eth1_tpackets = INTEGER
net_eth1_terrs = INTEGER
net_eth1_tdrop = INTEGER

Another approach to maintaining a custom schema is to define the schema in the
file user/extensions.py as cmonSchema:

cmonSchema = [
('dateTime', 'INTEGER NOT NULL PRIMARY KEY'),
('usUnits', 'INTEGER NOT NULL'),
('interval', 'INTEGER NOT NULL'),
('mem_total','INTEGER'),
('mem_free','INTEGER'),
('mem_used','INTEGER'),
('net_eth1_rbytes','INTEGER'),
('net_eth1_rpackets','INTEGER'),
('net_eth1_rerrs','INTEGER'),
('net_eth1_rdrop','INTEGER'),
('net_eth1_tbytes','INTEGER'),
('net_eth1_tpackets','INTEGER'),
('net_eth1_terrs','INTEGER'),
('net_eth1_tdrop','INTEGER'),
]

then load it using this configuration:

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
schema = user.extensions.cmonSchema
"""

# FIXME: make these methods platform-independent instead of linux-specific
# FIXME: deal with MB/GB in memory sizes
# FIXME: save the total counts instead of the deltas
# FIXME: refactor ups and rpi specialties


from __future__ import with_statement
import os
import platform
import re
import syslog
import time
from subprocess import Popen, PIPE

import weewx
import weeutil.weeutil
from weewx.drivers import AbstractDevice
from weewx.engine import StdService

DRIVER_NAME = "ComputerMonitor"
DRIVER_VERSION = "0.15rc2"

if weewx.__version__ < "3":
raise weewx.UnsupportedFeature("weewx 3 is required, found %s" %
   weewx.__version__)

schema = [
('dateTime', 'INTEGER NOT NULL PRIMARY KEY'),
('usUnits', 'INTEGER NOT NULL'),
('interval', 'INTEGER NOT NULL'),
('mem_total', 'INTEGER'),
('mem_free', 'INTEGER'),
('mem_used', 'INTEGER'),
('swap_total', 'INTEGER'),
('swap_free', 'INTEGER'),
('swap_used', 'INTEGER'),
('cpu_user', 'INTEGER'),
('cpu_nice', 'INTEGER'),
('cpu_system', 'INTEGER'),
('cpu_idle', 'INTEGER'),
('cpu_iowait', 'INTEGER'),
('cpu_irq', 'INTEGER'),
('cpu_softirq', 'INTEGER'),
('load1', 'REAL'),
('load5', 'REAL'),
('load15', 'REAL'),
('proc_active', 'INTEGER'),
('proc_total', 'INTEGER'),

# measure cpu temperature (not all platforms support this)
('cpu_temp', 'REAL'),  # degree C
('cpu_temp1', 'REAL'), # degree C
('cpu_temp2', 'REAL'), # degree C
('cpu_temp3', 'REAL'), # degree C
('cpu_temp4', 'REAL'), # degree C

# measure rpi attributes (not all platforms support this)
#('core_temp','REAL'), # degree C
#('core_volt', 'REAL'),
#   

[weewx-user] Re: No data from station

2016-11-22 Thread Cameron D
Hi Daff,
I would suggest don't bother with new drivers yet.- the changes in the 
driver I posted are only to avoid the language issue. I have tried to 
address a few other issues but I am just making it worse.
I think I should go back to look at the driver in 3.5.0

Cameron.

On Tuesday, 22 November 2016 22:33:31 UTC+10, Dafydd P wrote:
>
> Hi Guys
>
> Have been following this thread with interest as I am having the same 
> issues. Current setup is a WMR300 connected to a RPi 3 running Rasbian 
> Jessie. Installed 3.6.2 and had the same usb issue. Tried installing the 
> 0.15RC2 driver but had a different error. As it was a new setup I 
> downgraded to 3.5.0 to ensure that all was working ok. This was successful 
> so I'm happy the hardware is ok.
>
> I will try and put 3.6.2 back on and retry the updated driver. If anybody 
> has any further info about this it would be much appreciated,
>
> Cheers
>
> Daff
>
> Perth, Western Australia
>
>

-- 
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] Transferring database from weewx v2.6.4 to v3.6.2

2016-11-22 Thread David Watts
Thank you all.

The fault was indeed the issue with the 'null' values, and using the config 
utility solved it.

One extra thing I noticed was that when using the latest version of weewx, 
I had to use 'wee_database' rather than 'wee_config_database'.

On Monday, 21 November 2016 23:12:50 UTC, mwall wrote:
>
> On Monday, November 21, 2016 at 5:49:50 PM UTC-5, David Watts wrote:
>>
>> I had a look back at my user guide, but it's actually the user guide for 
>> v2.4 and it doesn't have the section about Strings in the database. I don't 
>> suppose you have a user guide relevant to v2.6.4 that you could send me, 
>> please?
>>
>
> all of the weewx releases are available at weewx.com:
>
> http://weewx.com/downloads/previous_versions/
>
> you do not have to install weewx to read its docs - just download the 
> tarball, expand it, then browse the docs directory.
>
> m 
>

-- 
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: Error running cmon on OS X

2016-11-22 Thread Dan'l B
On Tuesday, November 22, 2016 at 11:39:43 AM UTC-5, mwall wrote:
>
> On Tuesday, November 22, 2016 at 11:33:52 AM UTC-5, Dan'l B wrote:
>>
>> Should that be installed with the usual wee_extension? if so, it throws 
>> this:
>>
>>>
>>>
> nope.  install this manually by moving aside the existing cmon.py and 
> copying the new one into place:
>
> mv /Users/Shared/weewx/bin/user/cmon.py /Users/Shared/weewx/bin/user/
> cmon-0.14.py
>
> cp /Users/house/Documents/Software/Weather/WeeWX/weewx-master/extensions/
> cmon-0.15rc1.py /Users/shared/weewx/bin/user/cmon.py
>
> preface with sudo if you do not have write permission on bin/user
>
> then restart weewx
>
> m
>
>  Looks as if cmon is still throwing an error:

22/11/2016 13:25:14.768 weewx[86953]: engine: Caught unrecoverable 
>> exception in engine:
>
> 22/11/2016 13:25:14.768 weewx[86953]:   global name 'meminfo' is 
>> not defined
>
> 22/11/2016 13:25:14.770 weewx[86953]:   Traceback (most recent 
>> call last):
>
> 22/11/2016 13:25:14.770 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/weewx/engine.py", line 844, in main
>
> 22/11/2016 13:25:14.770 weewx[86953]:   engine.run()
>
> 22/11/2016 13:25:14.770 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/weewx/engine.py", line 200, in run
>
> 22/11/2016 13:25:14.770 weewx[86953]:  
>>  self.dispatchEvent(weewx.Event(weewx.POST_LOOP))
>
> 22/11/2016 13:25:14.770 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/weewx/engine.py", line 222, in dispatchEvent
>
> 22/11/2016 13:25:14.770 weewx[86953]:   callback(event)
>
> 22/11/2016 13:25:14.770 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/weewx/engine.py", line 563, in post_loop
>
> 22/11/2016 13:25:14.770 weewx[86953]:  
>>  self._software_catchup()
>
> 22/11/2016 13:25:14.770 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/weewx/engine.py", line 614, in _software_catchup
>
> 22/11/2016 13:25:14.770 weewx[86953]:  
>>  self.engine.dispatchEvent(weewx.Event(weewx.NEW_ARCHIVE_RECORD, 
>> record=record, origin='software'))
>
> 22/11/2016 13:25:14.771 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/weewx/engine.py", line 222, in dispatchEvent
>
> 22/11/2016 13:25:14.771 weewx[86953]:   callback(event)
>
> 22/11/2016 13:25:14.771 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/user/cmon.py", line 699, in new_archive_record
>
> 22/11/2016 13:25:14.771 weewx[86953]:  
>>  self.save_data(self.get_data(now, self.last_ts))
>
> 22/11/2016 13:25:14.771 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/user/cmon.py", line 719, in get_data
>
> 22/11/2016 13:25:14.771 weewx[86953]:   record = 
>> self.collector.get_data(now_ts)
>
> 22/11/2016 13:25:14.771 weewx[86953]: File 
>> "/Users/Shared/weewx/bin/user/cmon.py", line 563, in get_data
>
> 22/11/2016 13:25:14.771 weewx[86953]:  
>>  record['mem_available'] = meminfo.available
>
> 22/11/2016 13:25:14.771 weewx[86953]:   NameError: global name 
>> 'meminfo' is not defined
>
> 22/11/2016 13:25:14.771 weewx[86953]:   Exiting.
>
>
>

-- 
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] NWS Alerts

2016-11-22 Thread Dave Webb KB1PVH
At the top of my website there's a forecast frame and it will also display
any NWS warnings when issued. Not sure if you can grab the code if you view
page source, but if not I can post it later tonight for you.

http://qsl.net/kb1pvh/weather

Dave-KB1PVH

Sent from my Galaxy S7

-- 
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: NWS Alerts

2016-11-22 Thread vince
On Tuesday, November 22, 2016 at 10:26:58 AM UTC-8, Monachus wrote:
>
> Does anyone know of an existing way to import the NWS 
> advisories/alerts/warnings which can be found here:
>
>
The Saratoga templates (not part of weewx) have this ability, but they're 
php and they can be a little tricky to install as a weewx 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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: NWS Alerts

2016-11-22 Thread Monachus
I am basically looking for a good way to show NWS warnings within the Weewx 
interface.

-- 
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] NWS Alerts

2016-11-22 Thread Monachus
Does anyone know of an existing way to import the NWS 
advisories/alerts/warnings which can be found here:

https://alerts.weather.gov/

It would seem worthwhile to be able to add this data.  Perhaps the 
forecasting module has this already and I am missing it?

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


[weewx-user] Re: Error running cmon on OS X

2016-11-22 Thread Dan'l B
On Tuesday, November 22, 2016 at 11:46:43 AM UTC-5, mwall wrote:
>
> On Tuesday, November 22, 2016 at 11:35:36 AM UTC-5, Dan'l B wrote:
>>
>> The psutil install was interesting:
>>
>> ERROR: unknown command "easy_install" - maybe you meant "install"
>>
>
> well, at least it installed.
>
> i've seen many different ways to manage python components on macosx, but i 
> do not know what the 'right' way is.  for example:
>
> easy_install psutil
> pip install psutil
>
> plus the homebrew and macports approaches if you want to keep your python 
> adjustments separate from the apple-supplied python.
>
> I use MacPorts often, including for Xtide on the Mac. 

-- 
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: Error running cmon on OS X

2016-11-22 Thread Dan'l B
On Tuesday, November 22, 2016 at 11:39:43 AM UTC-5, mwall wrote:
>
> On Tuesday, November 22, 2016 at 11:33:52 AM UTC-5, Dan'l B wrote:
>>
>> Should that be installed with the usual wee_extension? if so, it throws 
>> this:
>>
>>>
>>>
> nope.  install this manually by moving aside the existing cmon.py and 
> copying the new one into place:
>
> mv /Users/Shared/weewx/bin/user/cmon.py /Users/Shared/weewx/bin/user/
> cmon-0.14.py
>
> cp /Users/house/Documents/Software/Weather/WeeWX/weewx-master/extensions/
> cmon-0.15rc1.py /Users/shared/weewx/bin/user/cmon.py
>
> preface with sudo if you do not have write permission on bin/user
>
> then restart weewx
>
> m
>
>
Installed and re-started with no sign of error, 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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Error running cmon on OS X

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 11:35:36 AM UTC-5, Dan'l B wrote:
>
> The psutil install was interesting:
>
> ERROR: unknown command "easy_install" - maybe you meant "install"
>

well, at least it installed.

i've seen many different ways to manage python components on macosx, but i 
do not know what the 'right' way is.  for example:

easy_install psutil
pip install psutil

plus the homebrew and macports approaches if you want to keep your python 
adjustments separate from the apple-supplied python.

m

-- 
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: Error running cmon on OS X

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 11:33:52 AM UTC-5, Dan'l B wrote:
>
> Should that be installed with the usual wee_extension? if so, it throws 
> this:
>
>>
>>
nope.  install this manually by moving aside the existing cmon.py and 
copying the new one into place:

mv /Users/Shared/weewx/bin/user/cmon.py 
/Users/Shared/weewx/bin/user/cmon-0.14.py

cp 
/Users/house/Documents/Software/Weather/WeeWX/weewx-master/extensions/cmon-0.15rc1.py
 
/Users/shared/weewx/bin/user/cmon.py

preface with sudo if you do not have write permission on bin/user

then restart weewx

m

-- 
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: Error running cmon on OS X

2016-11-22 Thread Dan'l B
On Tuesday, November 22, 2016 at 11:23:49 AM UTC-5, mwall wrote:

> dan'l,
>
> please try the attach cmon v0.15rc1
>
> it uses psutil, so you'll have to install that:
>
> easy_install psutil
>
> or use pip or whatever python package management you are using on macos.
>
>
> m
>

The psutil install was interesting:

ERROR: unknown command "easy_install" - maybe you meant "install"


 
11:25:27

house@Houses-Macmini:/Users/Shared/weewx$* sudo pip install psutil*

The directory '/Users/house/Library/Caches/pip/http' or its parent 
directory is not owned by the current user and the cache has been disabled. 
Please check the permissions and owner of that directory. If executing pip 
with sudo, you may want sudo's -H flag.

The directory '/Users/house/Library/Caches/pip' or its parent directory is 
not owned by the current user and caching wheels has been disabled. check 
the permissions and owner of that directory. If executing pip with sudo, 
you may want sudo's -H flag.

Collecting psutil

  Downloading psutil-5.0.0.zip (374kB)

100% || 378kB 891kB/s 

Installing collected packages: psutil

  Running setup.py install for psutil ... done

Successfully installed psutil-5.0.0

You are using pip version 8.1.2, however version 9.0.1 is available.

> You should consider upgrading via the 'pip install --upgrade pip' command.
>  

-- 
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: Error running cmon on OS X

2016-11-22 Thread Dan'l B
Should that be installed with the usual wee_extension? if so, it throws 
this:

*sudo ./bin/wee_extension --install 
> /Users/house/Documents/Software/Weather/WeeWX/weewx-master/extens*
>
> *ions/cmon-0.15rc1.py*
>
> Request to install 
> '/Users/house/Documents/Software/Weather/WeeWX/weewx-master/extensions/cmon-0.15rc1.py'
>
> Extracting from tar archive 
> /Users/house/Documents/Software/Weather/WeeWX/weewx-master/extensions/cmon-0.15rc1.py
>
> Traceback (most recent call last):
>
>   File "./bin/wee_extension", line 83, in 
>
> main()
>
>   File "./bin/wee_extension", line 75, in main
>
> ext.install_extension(options.install)
>
>   File "/Users/Shared/weewx/bin/weecfg/extension.py", line 110, in 
> install_extension
>
> self.tmpdir, self.logger)
>
>   File "/Users/Shared/weewx/bin/weecfg/__init__.py", line 1236, in 
> extract_tar
>
> tar_archive = tarfile.open(filename, mode='r')
>
>   File 
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py",
>  
> line 1672, in open
>
> raise ReadError("file could not be opened successfully")
>
> tarfile.ReadError: file could not be opened successfully
>
>
On Tuesday, November 22, 2016 at 11:23:49 AM UTC-5, mwall wrote:
>
> dan'l,
>
> you have not missed anything - i neglected to put the macosx support in 
> cmon.
>
> please try the attach cmon v0.15rc1
>
> it uses psutil, so you'll have to install that:
>
> easy_install psutil
>
> or use pip or whatever python package management you are using on macos.
>
> i have only tested this on an ancient version of macosx (10.6), so please 
> let me know how it works for you.
>
> m
>

-- 
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: Error running cmon on OS X

2016-11-22 Thread mwall
dan'l,

you have not missed anything - i neglected to put the macosx support in 
cmon.

please try the attach cmon v0.15rc1

it uses psutil, so you'll have to install that:

easy_install psutil

or use pip or whatever python package management you are using on macos.

i have only tested this on an ancient version of macosx (10.6), so please 
let me know how it works for you.

m

-- 
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.
# $Id: cmon.py 1573 2016-11-22 16:01:49Z mwall $
# Copyright 2013 Matthew Wall
"""weewx module that records cpu, memory, disk, and network usage.

This file contains both a weewx driver and a weewx service.

Installation

Put this file in the bin/user directory.


Service Configuration

Add the following to weewx.conf:

[ComputerMonitor]
data_binding = cmon_binding
max_age = 2592000 # 30 days; None to store indefinitely

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
schema = user.cmon.schema

[Databases]
[[cmon_sqlite]]
root = %(WEEWX_ROOT)s
database_name = archive/cmon.sdb
driver = weedb.sqlite

[Engine]
[[Services]]
archive_services = ..., user.cmon.ComputerMonitor


Driver Configuration

Add the following to weewx.conf:

[Station]
station_type = ComputerMonitor

[ComputerMonitor]
polling_interval = 30
driver = user.cmon


Schema

The default schema is defined in this file.  If you prefer to maintain a schema
different than the default, specify the desired schema in the configuration.
For example, this would be a schema that stores only memory and network data,
and uses eth1 instead of the default eth0:

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
[[[schema]]]
dateTime = INTEGER NOT NULL PRIMARY KEY
usUnits = INTEGER NOT NULL
interval = INTEGER NOT NULL
mem_total = INTEGER
mem_free = INTEGER
mem_used = INTEGER
swap_total = INTEGER
swap_free = INTEGER
swap_used = INTEGER
net_eth1_rbytes = INTEGER
net_eth1_rpackets = INTEGER
net_eth1_rerrs = INTEGER
net_eth1_rdrop = INTEGER
net_eth1_tbytes = INTEGER
net_eth1_tpackets = INTEGER
net_eth1_terrs = INTEGER
net_eth1_tdrop = INTEGER

Another approach to maintaining a custom schema is to define the schema in the
file user/extensions.py as cmonSchema:

cmonSchema = [
('dateTime', 'INTEGER NOT NULL PRIMARY KEY'),
('usUnits', 'INTEGER NOT NULL'),
('interval', 'INTEGER NOT NULL'),
('mem_total','INTEGER'),
('mem_free','INTEGER'),
('mem_used','INTEGER'),
('net_eth1_rbytes','INTEGER'),
('net_eth1_rpackets','INTEGER'),
('net_eth1_rerrs','INTEGER'),
('net_eth1_rdrop','INTEGER'),
('net_eth1_tbytes','INTEGER'),
('net_eth1_tpackets','INTEGER'),
('net_eth1_terrs','INTEGER'),
('net_eth1_tdrop','INTEGER'),
]

then load it using this configuration:

[DataBindings]
[[cmon_binding]]
database = cmon_sqlite
manager = weewx.manager.DaySummaryManager
table_name = archive
schema = user.extensions.cmonSchema
"""

# FIXME: make these methods platform-independent instead of linux-specific
# FIXME: deal with MB/GB in memory sizes
# FIXME: save the total counts instead of the deltas
# FIXME: refactor ups and rpi specialties


from __future__ import with_statement
import os
import platform
import re
import syslog
import time
from subprocess import Popen, PIPE

import weewx
import weeutil.weeutil
from weewx.drivers import AbstractDevice
from weewx.engine import StdService

DRIVER_NAME = "ComputerMonitor"
DRIVER_VERSION = "0.15rc1"

if weewx.__version__ < "3":
raise weewx.UnsupportedFeature("weewx 3 is required, found %s" %
   weewx.__version__)

schema = [
('dateTime', 'INTEGER NOT NULL PRIMARY KEY'),
('usUnits', 'INTEGER NOT NULL'),
('interval', 'INTEGER NOT NULL'),
('mem_total', 'INTEGER'),
('mem_free', 'INTEGER'),
('mem_used', 'INTEGER'),
('swap_total', 'INTEGER'),
('swap_free', 'INTEGER'),
('swap_used', 'INTEGER'),
('cpu_user', 'INTEGER'),
('cpu_nice', 'INTEGER'),
('cpu_system', 'INTEGER'),
('cpu_idle', 'INTEGER'),
('cpu_iowait', 'INTEGER'),
('cpu_irq', 'INTEGER'),
('cpu_softirq', 'INTEGER'),
('load1', 'REAL'),
('load5', 'REAL'),
('load15', 'REAL'),
('proc_active', 'INTEGER'),
('proc_total', 'INTEGER'),

# measure cpu temperature (not all platforms sup

[weewx-user] Re: Installing skins in OSX

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 10:06:02 AM UTC-5, Dan'l B wrote:
>
> Well your question told me my mistake: I was not in the home location of 
> whew. All done, with thanks, 
>

good!  fyi, there is a verbosity option to wee_extension that will let you 
know what it is doing:

wee_extension --verbosity=3

use 1 for some feedback, 3 for lots of feedback

-- 
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] Error running cmon on OS X

2016-11-22 Thread Dan'l B
At re-start after installing cmon on OS X the terminal throws this:

Traceback (most recent call last):
>
>   File "./bin/weewxd", line 64, in 
>
> weewx.engine.main(options, args)
>
>   File "/Users/Shared/weewx/bin/weewx/engine.py", line 838, in main
>
> engine = engine_class(config_dict)
>
>   File "/Users/Shared/weewx/bin/weewx/engine.py", line 76, in __init__
>
> self.loadServices(config_dict)
>
>   File "/Users/Shared/weewx/bin/weewx/engine.py", line 140, in loadServices
>
> self.service_obj.append(weeutil.weeutil._get_object(svc)(self, 
> config_dict))
>
>   File "/Users/Shared/weewx/bin/user/cmon.py", line 564, in __init__
>
> self.collector = get_collector(self.hardware, self.ignored_mounts)
>
>   File "/Users/Shared/weewx/bin/user/cmon.py", line 263, in get_collector
>
> return MacOSXCollector(hardware, ignored_mounts)
>
> NameError: global name 'MacOSXCollector' is not defined
>

Can someone point me to what I have missed here? 

-- 
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: Installing skins in OSX

2016-11-22 Thread Dan'l B


On Tuesday, November 22, 2016 at 9:51:17 AM UTC-5, mwall wrote:
>
> On Tuesday, November 22, 2016 at 9:25:47 AM UTC-5, Dan'l B wrote:
>>
>> When running the wee_extension --install to add for example, the forecast 
>> skin,
>>
>> *sudo ./wee_extension --install weewx-forecast-3**.0.8.tgz*
>>>
>>
>>  the installer fails trying to find the home directory on OS X, which is 
>> /Users/Share/weewx, with this error:
>>
>> IOError: [Errno 2] No such file or directory: 
>>> '/home/weewx/skins/forecast/skin.conf'
>>>
>>
> hi dan'l,
>
> in which directory did you run the wee_extension command?
>
> m 
>

Well your question told me my mistake: I was not in the home location of 
whew. All done, with 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.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: Installing skins in OSX

2016-11-22 Thread mwall
On Tuesday, November 22, 2016 at 9:25:47 AM UTC-5, Dan'l B wrote:
>
> When running the wee_extension --install to add for example, the forecast 
> skin,
>
> *sudo ./wee_extension --install weewx-forecast-3**.0.8.tgz*
>>
>
>  the installer fails trying to find the home directory on OS X, which is 
> /Users/Share/weewx, with this error:
>
> IOError: [Errno 2] No such file or directory: 
>> '/home/weewx/skins/forecast/skin.conf'
>>
>
hi dan'l,

in which directory did you run the wee_extension command?

m 

-- 
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] Installing skins in OSX

2016-11-22 Thread Dan'l B
When running the wee_extension --install to add for example, the forecast 
skin,

*sudo ./wee_extension --install weewx-forecast-3**.0.8.tgz*
>

 the installer fails trying to find the home directory on OS X, which is 
/Users/Share/weewx, with this error:

IOError: [Errno 2] No such file or directory: 
> '/home/weewx/skins/forecast/skin.conf'
>

If I knew where to modify that parameter in the install setup I could 
correct this I imagine but I couldn't find that spot.

 

-- 
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] Low battery

2016-11-22 Thread Thomas Keffer
On Tue, Nov 22, 2016 at 5:15 AM, Dave Webb KB1PVH  wrote:

> If it's a 3rd party application sending from Gmail, you need to lower your
> Gmail account security settings to allow it.
>

Could be the problem. In particular, if you're using two-step
authentication, gmail will not work. However, the low battery utility
should have said something.

Try the following attached program. It will test your email host. Fill out
the top four lines of the program with your host information:

smtp_host = "smtp.gmail.com"   # Your email host
smtp_user = "your_username"# The user name on the email host
smtp_password = "your_password"# The user's password
mailto = "my_acco...@gmail.com"# Email destination


Then run it using

python email_tester.py


Let us know what it says.

-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.
For more options, visit https://groups.google.com/d/optout.
# Fill out the following four lines:
smtp_host = "smtp.gmail.com"   # Your email host
smtp_user = "your_username"# The user name on the email host
smtp_password = "your_password"# The user's password
mailto = "my_acco...@gmail.com"# Email destination

# For testing purposes, these lines should be fine:
from_   = "weewx_t...@weewx.com"
subject = "Testing mailer"

import smtplib
from email.mime.text import MIMEText

# Form the message text:
msg_text = """This is a test of sending email via Python"""

# Convert to MIME:
msg = MIMEText(msg_text)

# Fill in MIME headers:
msg['Subject'] = subject
msg['From']= from_
msg['To']  = mailto

# Create an instance of class SMTP for the given SMTP host:
s = smtplib.SMTP(smtp_host)
try:
# Some servers (eg, gmail) require encrypted transport.
# Be prepared to catch an exception if the server
# doesn't support it.
s.ehlo()
s.starttls()
s.ehlo()
print "using encrypted transport"
except smtplib.SMTPException:
print "using unencrypted transport"

try:
# If a username has been given, assume that login is required for this host:
if smtp_user:
s.login(smtp_user, smtp_password)
print "logged in with user name %s" % (smtp_user,)

# Send the email:
s.sendmail(msg['From'], mailto,  msg.as_string())
# Log out of the server:
s.quit()
except Exception, e:
print "SMTP mailer refused message with error %s" % (e,)
raise

print "email sent to: %s" % mailto

Re: [weewx-user] Low battery

2016-11-22 Thread Dave Webb KB1PVH
If it's a 3rd party application sending from Gmail, you need to lower your
Gmail account security settings to allow it.

Dave-KB1PVH

Sent from my Galaxy S7

On Nov 22, 2016 7:51 AM, "Andrew Milner" 
wrote:

> Thanks gary - which probably means the mail service on the rpi has not
> been set up or not set up correctly.  I seem to recall googling for
> instructions for setting up the mail service to send via gmail from the rpi.
>
>
>
> On Tuesday, 22 November 2016 14:43:02 UTC+2, gjr80 wrote:
>
>> According to the log the alarm was triggered at 17:34:24. The issue is
>> not one of triggering the alarm but rather what happened to the email.
>>
>> 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.
>

-- 
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] Low battery

2016-11-22 Thread Andrew Milner
Thanks gary - which probably means the mail service on the rpi has not been 
set up or not set up correctly.  I seem to recall googling for instructions 
for setting up the mail service to send via gmail from the rpi.



On Tuesday, 22 November 2016 14:43:02 UTC+2, gjr80 wrote:

> According to the log the alarm was triggered at 17:34:24. The issue is not 
> one of triggering the alarm but rather what happened to the email.
>
> 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] Low battery

2016-11-22 Thread gjr80
According to the log the alarm was triggered at 17:34:24. The issue is not one 
of triggering the alarm but rather what happened to the email.

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] Low battery

2016-11-22 Thread Andrew Milner
Is the txbatterystatus actually being put into the loop and/or rec records?



On Tuesday, 22 November 2016 14:30:45 UTC+2, zkab wrote:

> I changed count_threshold = 10 but nothing happens ... no mails telling me 
> that battery is low ...
> Whats next ?
>
> Den måndag 21 november 2016 kl. 17:23:30 UTC+1 skrev Tom Keffer:
>>
>> You have a short archive interval (60) seconds, which means there will 
>> only be about 25 LOOP packets per archive record.
>>
>> The alarm extension requires that it see a low battery value at least 50 
>> times in an archive interval before sounding the alarm. This is to prevent 
>> false positives. Change it to something smaller, say 10:
>>
>> [Alarm]
>> time_wait = 3600
>> count_threshold = 10
>> smtp_host = xxx
>> smtp_user = yyy
>> smtp_password = zzz
>> from = xyxyx
>> mailto = zxzxzxz
>> subject = Väderstation - Dags att byta batteriet !!!
>>
>> -tk
>>
>>
>> On Mon, Nov 21, 2016 at 8:03 AM, zkab  wrote:
>>
>>> OK - here they come ...
>>>
>>> Den måndag 21 november 2016 kl. 16:31:02 UTC+1 skrev Tom Keffer:

 I guess I should have been more explicit. For the sake of completeness:

1. Set debug=1, stop weewx, restart it, post the log from the 
startup through the first archive record
2. Post the output of the command wee_debug --info

 -tk

 On Mon, Nov 21, 2016 at 7:08 AM, zkab  wrote:

> I have followed the guidelines in 'lowBattery.py' and installed only 
> that ... not 'alarm.py'
> What more should I do ?
>
>
> Den måndag 21 november 2016 kl. 15:47:51 UTC+1 skrev Andrew Milner:
>>
>> Can you give us more information as to what exactly you have changed 
>> and implemented, and what is happening/not happening.  The log seems to 
>> show a system ticking along with no issues - unless I did not look at 
>> the 
>> correct time of a significant event.
>>
>>
>>
>> On Monday, 21 November 2016 16:37:04 UTC+2, zkab wrote:
>>
>>> OK - here comes the log ...
>>>
>>> Den måndag 21 november 2016 kl. 15:35:36 UTC+1 skrev Andrew Milner:

 What did you mean by "I have implemented low battery according to 
 the documentation"?  If you have implemented the alarm extension what 
 expression are you using to trigger the alarm?  Which battery 
 status/value 
 are you checking/testing?  What is in the database?  You really need 
 to 
 give us more information to work with - as well as the log and the 
 output 
 from a wee_debug report.
  

 On Monday, 21 November 2016 15:50:20 UTC+2, Tom Keffer wrote:

> ​You're not giving much information. How about at least the log??
>
> -tk​
>
> On Mon, Nov 21, 2016 at 5:25 AM, zkab  wrote:
>
>> OK - I added 'txBatteryStatus = 1' couple of days ago but 
>> nothing has happened ...
>>
>> Den fredag 18 november 2016 kl. 16:06:42 UTC+1 skrev Tom Keffer:
>>>
>>> Try adding this to your [StdCalibrate] section:
>>>
>>> [StdCalibrate]
>>>   [[Corrections]]
>>> txBatteryStatus = 1
>>>
>>>
>>> -tk
>>>
>>> On Fri, Nov 18, 2016 at 4:45 AM, zkab  
>>> wrote:
>>>
 Remove battery ? The weather station is located on a roof top 
 with 25 cm snow ... impossible.
 What I had in mind was if there is away to test/simulate low 
 battery with weewx software.

 -- 
>> 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+...@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 fr

[weewx-user] Re: No data from station

2016-11-22 Thread Dafydd P
Hi Guys

Have been following this thread with interest as I am having the same 
issues. Current setup is a WMR300 connected to a RPi 3 running Rasbian 
Jessie. Installed 3.6.2 and had the same usb issue. Tried installing the 
0.15RC2 driver but had a different error. As it was a new setup I 
downgraded to 3.5.0 to ensure that all was working ok. This was successful 
so I'm happy the hardware is ok.

I will try and put 3.6.2 back on and retry the updated driver. If anybody 
has any further info about this it would be much appreciated,

Cheers

Daff

Perth, Western Australia

-- 
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.