Re: [weewx-user] Problem with extension install (SyntaxError: Non-ASCII character)

2021-02-19 Thread Michael Schantl
As far as I can see, you are using Python 2 or this problem occurs only 
with this version.
However, the plugin is unfortunately only compatible with Python 3, as it 
also uses some other Py 3-only features.

regards,
Michael
grua...@gmail.com schrieb am Freitag, 19. Februar 2021 um 19:31:26 UTC+1:

> thank you, this solved the problem :)
>
> tke...@gmail.com schrieb am Freitag, 19. Februar 2021 um 14:09:18 UTC+1:
>
>> The problem is that the extension author used the copyright character 
>> ('©') in the first line of the code for install.py, which is a non-ascii 
>> character. In Python 2.x, the default encoding of source code is ascii. If 
>> non-ascii characters are going to be used, then the encoding must be 
>> declared, which the author did not do. In Python 3.x, the default encoding 
>> is utf-8, so the copyright character will work.
>>
>> The fix is to either remove the character, or switch to Python 3.x. Or, 
>> contact the author.
>>
>> On Fri, Feb 19, 2021 at 2:01 AM Christian Gruber  
>> wrote:
>>
>>> hello,
>>>
>>> i am trying to install this extension to use it with my weatherlink-live
>>> https://github.com/michael-slx/weewx-weatherlink-live
>>>
>>> it fails with the following error:
>>>
>>> ##
>>> Request to install 'release.zip'
>>> Extracting from zip archive release.zip
>>> Traceback (most recent call last):
>>>   File "/usr/share/weewx/wee_extension", line 88, in 
>>> main()
>>>   File "/usr/share/weewx/wee_extension", line 80, in main
>>> ext.install_extension(options.install)
>>>   File "/usr/share/weewx/weecfg/extension.py", line 125, in 
>>> install_extension
>>> self.install_from_dir(extension_dir)
>>>   File "/usr/share/weewx/weecfg/extension.py", line 147, in 
>>> install_from_dir
>>> extension_dir)
>>>   File "/usr/share/weewx/weecfg/__init__.py", line 1866, in 
>>> get_extension_installer
>>> __import__('install')
>>>   File "/var/tmp/weewx-weatherlink-live-release/install.py", line 1
>>> SyntaxError: Non-ASCII character '\xc2' in file 
>>> /var/tmp/weewx-weatherlink-live-release/install.py on line 1, but no 
>>> encoding declared; see http://python.oev/peps/pep-0263/ for details
>>> ##
>>>
>>> maybe someone can help me :)
>>>
>>> regards
>>> chris
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to weewx-user+...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/17172c68-ef7b-4d29-a23d-06caf60b4de9n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/546caa69-3d25-401c-8182-f39194fba6ddn%40googlegroups.com.


Re: [weewx-user] Problem with extension install (SyntaxError: Non-ASCII character)

2021-02-19 Thread Christian Gruber
thank you, this solved the problem :)

tke...@gmail.com schrieb am Freitag, 19. Februar 2021 um 14:09:18 UTC+1:

> The problem is that the extension author used the copyright character 
> ('©') in the first line of the code for install.py, which is a non-ascii 
> character. In Python 2.x, the default encoding of source code is ascii. If 
> non-ascii characters are going to be used, then the encoding must be 
> declared, which the author did not do. In Python 3.x, the default encoding 
> is utf-8, so the copyright character will work.
>
> The fix is to either remove the character, or switch to Python 3.x. Or, 
> contact the author.
>
> On Fri, Feb 19, 2021 at 2:01 AM Christian Gruber  
> wrote:
>
>> hello,
>>
>> i am trying to install this extension to use it with my weatherlink-live
>> https://github.com/michael-slx/weewx-weatherlink-live
>>
>> it fails with the following error:
>>
>> ##
>> Request to install 'release.zip'
>> Extracting from zip archive release.zip
>> Traceback (most recent call last):
>>   File "/usr/share/weewx/wee_extension", line 88, in 
>> main()
>>   File "/usr/share/weewx/wee_extension", line 80, in main
>> ext.install_extension(options.install)
>>   File "/usr/share/weewx/weecfg/extension.py", line 125, in 
>> install_extension
>> self.install_from_dir(extension_dir)
>>   File "/usr/share/weewx/weecfg/extension.py", line 147, in 
>> install_from_dir
>> extension_dir)
>>   File "/usr/share/weewx/weecfg/__init__.py", line 1866, in 
>> get_extension_installer
>> __import__('install')
>>   File "/var/tmp/weewx-weatherlink-live-release/install.py", line 1
>> SyntaxError: Non-ASCII character '\xc2' in file 
>> /var/tmp/weewx-weatherlink-live-release/install.py on line 1, but no 
>> encoding declared; see http://python.oev/peps/pep-0263/ for details
>> ##
>>
>> maybe someone can help me :)
>>
>> regards
>> chris
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/17172c68-ef7b-4d29-a23d-06caf60b4de9n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c6037437-fe02-40ca-931c-fc998041a872n%40googlegroups.com.


[weewx-user] Re: wee_import from WD logs fails

2021-02-19 Thread Peter Süß
Hi Gary,

I'm going to start it all over again this weekend, when having time. I 
organized all logdata from each year into a separate directory.
When importing it, I just edit the import path in the configfile and then 
start wee_import with --import-config=myimportconfig.con --verbose, and the 
let it run

Here is some 6 years of data, some newer and some older. You can play 
around with it, if you like.
https://drive.google.com/drive/folders/1zwvlJSlGc0gtypuBaFIYq0V-jCg1e776?usp=sharing

I can just upload the whole bunch of it, if you want.
Thank you for your help!!!

Peter

gjr80 schrieb am Montag, 15. Februar 2021 um 21:48:22 UTC+1:

> Hi Peter,
>
> Before you start it off again can you describe how you are doing the 
> import; ie time period per import,  one big import, multiple smaller 
> periods? How is you data organised on disc, one large directory with all 
> file, year by year directories etc.
>
> Gary
>
> On Tuesday, 16 February 2021 at 00:00:27 UTC+10 peter.su...@gmail.com 
> wrote:
>
>> Hi Gary,
>>
>> today my Raspberry 4 arrived, which will hopefully be my long-running 
>> weather computer.
>> I tried to import all my data on Pi3. It worked back for about 8 years, 
>> but then the performance crashed into hell.
>> The import of one year took about 1 week and was getting worse.
>>
>> Now I'm starting it all over on a fresh install and report, what will be 
>> the result.
>>
>> Peter
>> gjr80 schrieb am Montag, 1. Februar 2021 um 23:28:04 UTC+1:
>>
>>> Hi Peter,
>>>
>>> On Tuesday, 2 February 2021 at 06:03:36 UTC+10 peter.su...@gmail.com 
>>> wrote:
>>>
 Hey Gary,
 its looking perfect. I just separated the logs for each year and right 
 now I am testing the 6th year in a row, doing a quick dry-run.
 The script is finding some duplicates, but it looks like every complete 
 year from 01/01 to 12/31 should be imported into the database.

>>>
>>> That is interesting, the screen output you posted originally clearly 
>>> showed an error decoding a date-time, I am surprised that re-arranging the 
>>> log files fixed that. The first person that trialled the WD import module 
>>> was in a similar boat to you; they had many years of WD data and when they 
>>> first tried to import the data they did it in one run and not only did it 
>>> take many hours but wee_import eventually ground to a halt and crashed 
>>> (the exact details escape me). So importing/processing a year at a time may 
>>> be more manageable and safer.
>>>
>>> The duplicates issue is not uncommon, the few suites of WD logs I have 
>>> worked on all contained the odd duplicate date-time. wee_import will 
>>> simply ignore the duplicates, the  only issue is when the data for each 
>>> duplicate is different. Probably not going to make too much difference over 
>>> 15 years of data at one minute intervals.
>>>
>>> One more question from my side: Would you prefer a MySQL database with 
 all this mass of data?

>>>  
>>> I think the consensus is that unless you have good reason to use 
>>> MySQL/MariaDB stick with SQLite. SQLite is faster and simpler to 
>>> backup/restore. SQLite will easy handle all of your 15 years of data.
>>>  
>>> Gary
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6c84f279-cf8b-40df-a84f-7bb6032867bfn%40googlegroups.com.


[weewx-user] Re: how to upload to emoncms

2021-02-19 Thread bgra...@umw.edu
Hello,
This is an old thread but may be the best place to jump in. I have a weewx 
server on my local network which sends data to my remote web page 
(grattans.org/wx) and also sends data to my emoncms rpi on the local 
network using the weewx extension. All has been working well for the past 
couple of years. Recently, I noticed the following error message in the 
weewx.log file (debug=2):

Feb 19 10:15:26 n4mrv weewx[86166] DEBUG weewx.restx: EmonCMS: Failed 
upload attempt 3: Server returned '#012Notice: 
 Undefined variable: jsondataLC in 
/var/www/emoncms/Modules/input/input_methods.php on line 
60#012ok'
Feb 19 10:15:26 n4mrv weewx[86166] ERROR weewx.restx: EmonCMS: Failed to 
publish record 2021-02-19 10:15:00 EST (1613747700): Failed up
load after 3 tries

Not sure how long this has been going on because it *IS* uploading data to 
the emoncms rpi correctly and on time (15 minute archive time). The entry 
in weewx.conf is:

[[EmonCMS]]
url = http://192.168.1.103/emoncms/input/post.json
token = 3bff21c226b634

I probably should not complain as it's working but am just curious what is 
going on here. I'm not a programmer and don't understand what the cause of 
the error might be. I don't try to upload to emoncms.org, only to my local 
rpi.

Thanks in advance if anyone can explain where my config error might be.

Bob
On Tuesday, July 17, 2018 at 5:06:25 AM UTC-4 gjr80 wrote:

> Hi,
>
> Have a look at the comments up front in emoncms.py, included in the 
> commments are instructions/example settings for setting the upload units. 
> Depending on your install emoncms.py will be in /usr/share/weewx/user or 
> /home/weewx/bin/user.
>
> Gary
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/fb8eb73a-ccc6-4dbe-bf59-9cc8a2e419c0n%40googlegroups.com.


[weewx-user] I started to get NULL values in realtime.txt (using crt plugin)

2021-02-19 Thread G400
I started to get NULL values in realtime.txt (using crt plugin)
Davis Vantage Pro2 nad Davis Vue wireless
Raspberry Pi, USB - serial link
Weewx 4.4.0
Same config and setup have been working since end of January

Any idea what is cuasing this 

Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.engine: Loading 
service weewx.engine.StdReport
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.engine: Finished 
loading service weewx.engine.StdReport
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO __main__: Starting up 
weewx version 4.4.0
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Gentle wake up of console successful
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.engine: Clock 
error is -0.13 seconds (positive is fast)
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.engine: Using 
binding 'wx_binding' to database 'weewx.sdb'
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.manager: Starting 
backfill of daily summaries
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.manager: Daily 
summaries up to date
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Getting archive packets since 2021-02-19 16:32:00 CET (1613748720)
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Gentle wake up of console successful
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Retrieving 1 page(s); starting index= 3
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.manager: Added 
record 2021-02-19 16:33:00 CET (1613748780) to database 'weewx.sdb'
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.manager: Added 
record 2021-02-19 16:33:00 CET (1613748780) to daily summary in 'weewx.sdb'
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.manager: Added 
record 2021-02-19 16:34:00 CET (1613748840) to database 'weewx.sdb'
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.manager: Added 
record 2021-02-19 16:34:00 CET (1613748840) to daily summary in 'weewx.sdb'
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] INFO weewx.engine: Starting 
main packet loop.
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Gentle wake up of console successful
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Requesting 200 LOOP packets.
Feb 19 16:34:17 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Gentle wake up of console successful
Feb 19 16:34:22 aad-raspberry-01 weewx[21406] ERROR weewx.drivers.vantage: 
LOOP try #1; error: Expected to read 99 chars; got 0 instead
Feb 19 16:34:26 aad-raspberry-01 weewx[21406] ERROR weewx.drivers.vantage: 
LOOP try #2; error: Expected to read 99 chars; got 0 instead
Feb 19 16:34:30 aad-raspberry-01 weewx[21406] ERROR weewx.drivers.vantage: 
LOOP try #3; error: Expected to read 99 chars; got 0 instead
Feb 19 16:34:34 aad-raspberry-01 weewx[21406] ERROR weewx.drivers.vantage: 
LOOP try #4; error: Expected to read 99 chars; got 0 instead
Feb 19 16:34:34 aad-raspberry-01 weewx[21406] ERROR weewx.drivers.vantage: 
LOOP max tries (4) exceeded.
Feb 19 16:34:34 aad-raspberry-01 weewx[21406] INFO weewx.engine: Main loop 
exiting. Shutting engine down.
Feb 19 16:34:34 aad-raspberry-01 weewx[21406] CRITICAL __main__: Caught 
WeeWxIOError: Max tries exceeded while getting LOOP data.
Feb 19 16:34:34 aad-raspberry-01 weewx[21406] CRITICAL __main__:  
Waiting 60 seconds then retrying...
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] INFO __main__: retrying...
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] INFO __main__: Using 
configuration file /etc/weewx/weewx.conf
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] INFO __main__: Debug is 1
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG __main__: Initializing 
engine
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] INFO weewx.engine: Loading 
station type Vantage (weewx.drivers.vantage)
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Driver version is 3.2.1
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Option loop_request=1
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Opened up serial port /dev/ttyUSB0; baud 19200; timeout 4.00
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Gentle wake up of console successful
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Hardware type is 16
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
ISS ID is 1
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.drivers.vantage: 
Hardware name: Vantage Pro2
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.engine: Loading 
service weewx.engine.StdTimeSynch
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.engine: Finished 
loading service weewx.engine.StdTimeSynch
Feb 19 16:35:34 aad-raspberry-01 weewx[21406] DEBUG weewx.engine: Loading 
service weewx.engine.StdConver

[weewx-user] Belchertown Skin: Chart with Specific Time Range within the Actual Year

2021-02-19 Thread Karen K
I was not sure from documentation: Is it possible to have a chart that 
ranges from - say - Jan 1st to May 31st of the actual year? 

That means, as long as we have the year 2021, the chart shall range from 
Jan 1st, 2021 to May 31st, 2021. When the year 2022 starts, the chart shall 
range from Jan 1st, 2022 to May 31st, 2022. And so on.

Ist that someway possible by setting the options appropriately?

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f80a46e8-b9a5-4619-b251-50604c77e9fan%40googlegroups.com.


Re: [weewx-user] Re: One more option for Build Your Own enthusiasts

2021-02-19 Thread pred...@gmail.com
Hey Terry,

I will try them out and let you know.

Thank you very much for the help!

On Thursday, February 18, 2021 at 9:28:44 PM UTC+2 terry.s...@gmail.com 
wrote:

> Hi George,
>
> Yes I did manage to get it working!
> I ended up just editing the driver and configuration files where they are 
> located.
>
> I installed all of the following libraries:
> sudo pip3 install Adafruit-Blinka
> sudo pip3 install adafruit-circuitpython-bme280
> sudo pip3 install adafruit-circuitpython-ads1x15
> sudo apt-get install python3-w1thermsensor
>
> Change file located in  /usr/share/weewx/user/BCRobotics.py to what I have 
> attached
> Add the BCRobotics section to the weewx.conf file located in /etc/weewx
> Attached is my config file for reference but it has some location specific 
> information that you'll need to change.
>
> I reran config and it works!
>
>
> Let me know how you make out or if you have any questions.
>
> Note for any experts: I tried to run the install.py with the modified 
> driver file but got a "module setup not found"
> Thought it may be a Python version issue but couldn't determine the 
> Python3 equivalent. Appreciate any hints.
> Maybe later I will add my changes to Github but thats a whole other 
> learning session.  
>
> Terry
> On Thursday, 18 February 2021 at 06:21:04 UTC-8 pred...@gmail.com wrote:
>
>> Hi Terry,
>>
>> I'm trying to do exactly the same thing.
>>
>> Did you have any luck with the driver?
>>
>> Thanks in advance.
>>
>> George
>>
>> On Wednesday, February 17, 2021 at 5:19:02 PM UTC+2 terry.s...@gmail.com 
>> wrote:
>>
>>> Can I just modify the code of the already installed driver or would I 
>>> need to repackage and reinstall it. I may do that later but its another 
>>> piece I need to learn.
>>>
>>> Also how do I ensure its all running Python3?
>>>
>>> Thanks for all the help.
>>>
>>> Terry
>>>
>>> On Tuesday, 16 February 2021 at 18:45:15 UTC-8 peterq...@gmail.com 
>>> wrote:
>>>
 Driver looks like it's written for Python2 (the give away to me is the 
 print statement on the last line), so you might have a bit of fun fixing 
 python2/python3 issues. Not too terribly difficult. If you could get the 
 test program to work, you can probably get the driver to work too.

 On Tue, Feb 16, 2021 at 5:46 PM Terry Steneker  
 wrote:

> I am using the driver located here: 
> https://github.com/David-Enst/WeeWX-BCRobotics
>
> I am also attaching the file
>
>
>
> On Tuesday, 16 February 2021 at 16:53:24 UTC-8 peterq...@gmail.com 
> wrote:
>
>> What driver are you using?
>> It's going to be really tough to help with this because you have 
>> unique hardware and aren't asking a very answerable question. 
>>
>> On Tue, Feb 16, 2021 at 3:26 PM Terry Steneker  
>> wrote:
>>
>>>
>>> I just purchased the BCRobotics board and tried to install the 
>>> required software for it. I ran into problems when I tried to test the 
>>> BME280 using the Adafruit ADS1x15 library. Kept getting errors and the 
>>> python Adafruit_BME280 library is deprecated. 
>>>
>>> Instead of trying to fix the errors I went the hard way and upgraded 
>>> to the adafruit-circuitpython libraries so I can also run Python3
>>>
>>> sudo pip3 install adafruit-circuitpython-bme280
>>>
>>> sudo pip3 install adafruit-circuitpython-ads1x15
>>>
>>> I then modified the BCRobotics-test-app.py to run under Python3 and 
>>> the upgraded Adafruit libraries.
>>> Tested the program and it works!
>>>
>>> I have attached the modified program.
>>>
>>> I need to modify the driver to work the same as the updated code but 
>>> not sure how to do that. Can I just substitute the same modifications 
>>> that 
>>> I made to the test program? 
>>>
>>> Thanks
>>> Terry
>>>
>>> On Sunday, 24 November 2019 at 10:25:09 UTC-8 pred...@gmail.com 
>>> wrote:
>>>
 Louis,

 thank you very much for your reply.

 I didn't realize they first did it with Python 2.7. I though you 
 used it in order for it to work with the interceptor driver.

 I'll keep using python 2.7 and your code but it seems that I'm 
 missing some libraries.

 (I think I had them all but I keep getting a " BME280_OSAMPLE_8' 
 is not defined " etc. errors) 

 I'll try and find the original code and libraries for Python 2.7 
 and do the necessary adjustments.

 Thanks again!

 On Sun, Nov 24, 2019 at 7:15 PM Louis De Lange  
 wrote:

> George,
>
> At the time when I completed that project the tutorial on the 
> BC-Robotics website was written in Python 2.7 so I used all the 2.7 
> libraries in my code.  With some research you should be able to 
> convert the 
>>

Re: [weewx-user] Problem with extension install (SyntaxError: Non-ASCII character)

2021-02-19 Thread Tom Keffer
The problem is that the extension author used the copyright character ('©')
in the first line of the code for install.py, which is a non-ascii
character. In Python 2.x, the default encoding of source code is ascii. If
non-ascii characters are going to be used, then the encoding must be
declared, which the author did not do. In Python 3.x, the default encoding
is utf-8, so the copyright character will work.

The fix is to either remove the character, or switch to Python 3.x. Or,
contact the author.

On Fri, Feb 19, 2021 at 2:01 AM Christian Gruber 
wrote:

> hello,
>
> i am trying to install this extension to use it with my weatherlink-live
> https://github.com/michael-slx/weewx-weatherlink-live
>
> it fails with the following error:
>
> ##
> Request to install 'release.zip'
> Extracting from zip archive release.zip
> Traceback (most recent call last):
>   File "/usr/share/weewx/wee_extension", line 88, in 
> main()
>   File "/usr/share/weewx/wee_extension", line 80, in main
> ext.install_extension(options.install)
>   File "/usr/share/weewx/weecfg/extension.py", line 125, in
> install_extension
> self.install_from_dir(extension_dir)
>   File "/usr/share/weewx/weecfg/extension.py", line 147, in
> install_from_dir
> extension_dir)
>   File "/usr/share/weewx/weecfg/__init__.py", line 1866, in
> get_extension_installer
> __import__('install')
>   File "/var/tmp/weewx-weatherlink-live-release/install.py", line 1
> SyntaxError: Non-ASCII character '\xc2' in file
> /var/tmp/weewx-weatherlink-live-release/install.py on line 1, but no
> encoding declared; see http://python.oev/peps/pep-0263/ for details
> ##
>
> maybe someone can help me :)
>
> regards
> chris
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/17172c68-ef7b-4d29-a23d-06caf60b4de9n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zECOGNVX-arQvLBXHiEeLFPx%3DSPw-BqJPxcu9vm6HBeTsw%40mail.gmail.com.


[weewx-user] Re: Belchertown added ssl - mqtt stuck "connecting"

2021-02-19 Thread DaveStLou
That makes sense but I'm such a novice on certs, I'll have to do some 
research on how to get the cert to be valid on both servers. 
For the time being, I've disabled the mqtt portion of my website.

On Tuesday, February 16, 2021 at 10:37:43 AM UTC-6 vince wrote:

> We'd have to see the Belchertown portion of weewx.conf (with 
> usernames/passwords obfuscated), but the documentation 
> 
>  seems 
> to show that you need to add a [[[tls]]] section to tell the skin which 
> version and cert to use and I'd "guess" that the cert has to be valid on 
> both computers. 
>
> On Tuesday, February 16, 2021 at 5:27:49 AM UTC-8 DaveStLou wrote:
>
>> To explain further, I added a certificate on the host to oakvillewx.com 
>> so it's showing https now without a security warning.
>>
>> I am *not* getting the "Failed to connect to weather station" error 
>> message. It just perpetually shows the "Connecting to weather station real 
>> time data". So I wonder, could it be connected to the mqtt stream but just 
>> not displaying the data?
>>
>> BTW, I tried changing "mqtt_websockets_ssl" to 1 in the skin.conf but 
>> that DOES cause it to display the failed to connect error so that's a no go.
>>
>> If this is covered elsewhere, please point me to the thread. Thanks in 
>> advance!
>>
>>
>>
>> On Monday, February 15, 2021 at 7:43:57 AM UTC-6 DaveStLou wrote:
>>
>>>
>>> I recently added ssl to my website oakvillewx.com. Now my mqtt data 
>>> feed is stuck saying "Connecting to weather station real time data" in all 
>>> browser types. 
>>>
>>> I found references on the forum to using debugger in the browser. I can 
>>> get that but I don't know how to use it to figure out what's happening. 
>>>
>>> Appreciate help on troubleshooting this. Thanks!
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/fb706879-4d67-4a70-8c5a-eb4a45ce1c43n%40googlegroups.com.


[weewx-user] Problem with extension install (SyntaxError: Non-ASCII character)

2021-02-19 Thread Christian Gruber
hello,

i am trying to install this extension to use it with my weatherlink-live
https://github.com/michael-slx/weewx-weatherlink-live

it fails with the following error:

##
Request to install 'release.zip'
Extracting from zip archive release.zip
Traceback (most recent call last):
  File "/usr/share/weewx/wee_extension", line 88, in 
main()
  File "/usr/share/weewx/wee_extension", line 80, in main
ext.install_extension(options.install)
  File "/usr/share/weewx/weecfg/extension.py", line 125, in 
install_extension
self.install_from_dir(extension_dir)
  File "/usr/share/weewx/weecfg/extension.py", line 147, in install_from_dir
extension_dir)
  File "/usr/share/weewx/weecfg/__init__.py", line 1866, in 
get_extension_installer
__import__('install')
  File "/var/tmp/weewx-weatherlink-live-release/install.py", line 1
SyntaxError: Non-ASCII character '\xc2' in file 
/var/tmp/weewx-weatherlink-live-release/install.py on line 1, but no 
encoding declared; see http://python.oev/peps/pep-0263/ for details
##

maybe someone can help me :)

regards
chris

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/17172c68-ef7b-4d29-a23d-06caf60b4de9n%40googlegroups.com.


[weewx-user] Re: New Units and Unit Groups for MQTT

2021-02-19 Thread Karen K
The last version of the file is attached.

There is something added to use the data within a binding.

Karen K schrieb am Sonntag, 7. Februar 2021 um 12:05:57 UTC+1:

> I extended the file by trend values. Look at the new file attached, please.
>
> bell...@gmail.com schrieb am Donnerstag, 28. Januar 2021 um 23:45:17 
> UTC+1:
>
>> Thanks, that is exactly what I was looking for. I know it is too late for 
>> you, but I thought other people might need to add units, unit groups, and 
>> observations. So, I was looking for a real world example. I’ve opened issue 
>> 118  to 
>> work on this in MQTTSubscribe.
>>
>> On Thursday, 28 January 2021 at 15:03:22 UTC-5 kk44...@gmail.com wrote:
>>
>>> I am not sure that I understood what I am expected to post. The units 
>>> and unit group definition file I created is this:
>>>
>>> bell...@gmail.com schrieb am Montag, 25. Januar 2021 um 01:09:55 UTC+1:
>>>
 Karen, 
 If you pst what you have done, I’d be willing to look at updating 
 MQTTSubscribe to have a configuration option. If we get something working, 
 perhaps a pull request to WeeWX might result.
 rich

 On Sunday, 24 January 2021 at 05:57:47 UTC-5 kk44...@gmail.com wrote:

> @Rich: Yes, I was afraid that that is the only way to do it. So I 
> guess, I will do it the same way
>
> @Weatherl: Oh, I did not install devices of my own. Instead I got 
> permission to read the readings of the official level and flow meters 
> from 
> the government. They provide an API in the Internet here. If you register 
> with them you can get the data live.
>
> bell...@gmail.com schrieb am Samstag, 23. Januar 2021 um 22:48:32 
> UTC+1:
>
>> I'll be interested in hearing if there is a better way, but here is 
>> what I did to add a new observation.
>> 1. Wrote this service.
>>
>> import weewx
>>
>> import weewx.units
>> weewx.units.obs_group_dict['honeywell01'] = 'group_temperature'
>> weewx.units.obs_group_dict['honeywell02'] = 'group_temperature'
>> weewx.units.obs_group_dict['honeywell03'] = 'group_temperature'
>>
>> class Noop(weewx.engine.StdService):
>> pass
>>
>> 2. Updated weewx.conf
>> prep_services = weewx.engine.StdTimeSynch , 
>> user.bellrichm.Noop
>>
>> rich
>>
>> On Saturday, 23 January 2021 at 16:18:28 UTC-5 kk44...@gmail.com 
>> wrote:
>>
>>> I installed MQTTSubscribe service. In this case it provides data 
>>> about water level (unit cm) and water flow (unit cubic meter per 
>>> second) of 
>>> the near river.
>>>
>>> As those units and unit group are not included in the standard weewx 
>>> I have to assign them elsewhere.
>>>
>>> Because I use the MQTTSubscribe service, there is no need to write 
>>> an extension. On the other hand, no extension file means no place to 
>>> put 
>>> the assignment of the additional units and unit groups.
>>>
>>> Could I declare those units and unit groups somewhere in weewx.conf?
>>>
>>> Is there any other possibility?
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/db5629a9-85e5-473c-93a9-6f1d83eccd19n%40googlegroups.com.
# water level and water flow units and unit groups
# Copyright (c) 2021 Johanna Roedenbeck

"""

value  US METRIC & METRICWX
---
water level W  ftcm
water level trend  ft/h  cm/h
water flow  Q  ft^3/sm^3/s
water flow trend   ft^3/s/h  m^3/s/h

"""

# import units module to extend group, units, and conversion tables
import weewx.units

# for extend() function
import weeutil.weeutil 

# if MQTT export extension is installed, include unit label reduction
try:
import user.mqtt
hasMQTT=True
except ImportError:
hasMQTT=False

# add groups for water level and water flow
weewx.units.USUnits.extend(
  {'group_flow':'ft3ps', # cubic foot per second
   'group_flow_trend':'ft3psph',
   'group_level':'foot',
   'group_level_trend':'foot_per_hour'})

# add groups for water level and water flow
weewx.units.MetricUnits.extend(
  {'group_flow':'m3ps', # cubic meter per second
   'group_flow_trend':'m3psph',
   'group_level':'cm',
   'group_level_trend':'cm_per_hour'})
   
# add groups for water level and water flow
weewx.units.MetricWXUnits.extend(
  {'group_flow':'m3ps', # cubic meter per second
   'group_flow_trend':'m3psph',
   'group_level':'cm',
   'group_level_trend':'cm_per_hour'})

# default format for flow units   
weewx.units.de