Jump to content

Polyglot weather station node servers


bpwwer

Recommended Posts

On 10/11/2019 at 10:28 AM, Whitehambone said:

I will try one of your suggestions, thanks!  Do you know if either of them have Dew Point, Heat Index and Wind Chill?

Darksky has dewpoint and apparent temperature, Open Weather Map doesn't have any of them.

Although I believe those can all be calculated from the data available.  That sounds like a good enhancement request for the node servers, so I've added it to my todo lists.

  • Thanks 1
Link to comment
Share on other sites

I noticed that Darksky polyglot is not displaying chance of rain or rain rate for me. It also did not update climate conditions to indicate rain when it started to rain tonight.  These variables were on the darksky web site, and appeared populated in the api call.

Also I was wondering if there is any indicators for chance of snow and snow rate? Up here in the North we get that stuff too! 

 

Link to comment
Share on other sites

17 hours ago, Rootdet said:

I noticed that Darksky polyglot is not displaying chance of rain or rain rate for me. It also did not update climate conditions to indicate rain when it started to rain tonight.  These variables were on the darksky web site, and appeared populated in the api call.

Also I was wondering if there is any indicators for chance of snow and snow rate? Up here in the North we get that stuff too! 

 

Oops, looks like I never hooked up rain rate or chance of rain.  I never noticed since we don't really get any rain until November.  

I'm not sure why climate conditions didn't update, it should reflect what DarkSky is reporting.  

I'll add snow data to the TODO list.

Link to comment
Share on other sites

17 minutes ago, bpwwer said:

Oops, looks like I never hooked up rain rate or chance of rain.  I never noticed since we don't really get any rain until November.  

I'm not sure why climate conditions didn't update, it should reflect what DarkSky is reporting.  

I'll add snow data to the TODO list.

Just pushed version 1.1.6 that fixes the rain rate and chance of rain  (which are actually precipitation rate and chance of precipitation, so should reflect snow as well).  What's missing is the type of precipitation so that's what's on the TODO list.

  • Like 1
Link to comment
Share on other sites

Apparently I'm extremely challenged when it comes to Polygot node servers.  Skipping details, I've never been successful with the pi version, set out to conquor that at one point but discovered Polisy had been announced, decided to just order Polisy and wait so that I wouldn't need to worry about maintaining a pi for that purpose.

Then I recently noticed Polygot Cloud and decided to give that a try but really only on store offering was of interest to me.  https://github.com/bpaauwe/AmbientWeatherNS  looked like it was documented with instructions (unlike https://github.com/simplextech/udi-poly-ambientweather  which has a blank template for install instructions). 

I figured this should be easy!  I easily generated an Ambient API key, and found the MAC address of my station.  So far so good.  Until I get to Step 3 of the install instructions.  The ISY never rebooted (I have an ISY program that notifies me of reboots and a counter variable with hours since last reboot), however another day I noticed that under the NS menu in the admin console there is a configuration popoluated for node server #1.

So I moved on to Step 4 of the install instructions but can't figure out HOW to configure the NS.  On the cloud instance there is no place to paste the API key or the MAC address.  (i tried guessing some ways but nothing worked).  I finally destroyed that instance and started fresh... still haven't figured it out. 

Current status always shows Disconnected.  If I click Details it says

AmbientPoly(1)

Current Status: Disconnected
Current Version: 0.1.2
Time Started: Not Running
Uptime: None
Current Worker: ambientpoly-0021b90234d8-1

If I click start, it says it's already started, even tho the status above says it's not. 

If I click configuration it lets me change shortPoll and longPoll but doesn't have a place to paste an API key or MAC address.  I've tried guessing with custom Key names and values but that didn't work.

If I click Nodes (0) nothing happens.

 

So I'm stuck... I've tried everything I can guess to try.   I'd just wait for Polisy but it seems like this should work and be easy... and it's not.  WHAT THE HELL AM I DOING WRONG?

 

 

Link to comment
Share on other sites

On 10/18/2019 at 9:34 AM, MrBill said:

Until I get to Step 3 of the install instructions.  The ISY never rebooted (I have an ISY program that notifies me of reboots and a counter variable with hours since last reboot), however another day I noticed that under the NS menu in the admin console there is a configuration popoluated for node server #1.

I believe that the reboot is no longer needed. The instructions need to be updated to remove that step.

On 10/18/2019 at 9:34 AM, MrBill said:

So I moved on to Step 4 of the install instructions but can't figure out HOW to configure the NS.  On the cloud instance there is no place to paste the API key or the MAC address.  (i tried guessing some ways but nothing worked).  I finally destroyed that instance and started fresh... still haven't figured it out. 

So I'm stuck... I've tried everything I can guess to try.   I'd just wait for Polisy but it seems like this should work and be easy... and it's not.  WHAT THE HELL AM I DOING WRONG?

This is a long standing issue with the cloud based polyglot. The PI based version will pre-populate the custom configuration values with defaults so that they show up on the configuration screen.  The cloud based polygot does not so you have to guess.  The other long standing issue with the cloud based polyglot is that it won't display the configuration help instructions so there's no way for the node server to help you out with what needs to be configured.

You have to add both the 'key' and the 'value' for the following custom configuration parameters:

key = macAddress      value = <your station mac address>

key = APIKey  value = <your api key>

The keys need to be entered exactly as above, including the case.  Once you enter these and save them, the node server should connect to the Ambient servers and start sending data to the ISY.  What may be missing in the instructions is that you do need to restart the admin console after the node server is installed so that it will pick up the new nodes created by the node server.

Link to comment
Share on other sites

1 hour ago, bpwwer said:

I believe that the reboot is no longer needed. The instructions need to be updated to remove that step.

This is a long standing issue with the cloud based polyglot. The PI based version will pre-populate the custom configuration values with defaults so that they show up on the configuration screen.  The cloud based polygot does not so you have to guess.  The other long standing issue with the cloud based polyglot is that it won't display the configuration help instructions so there's no way for the node server to help you out with what needs to be configured.

You have to add both the 'key' and the 'value' for the following custom configuration parameters:

key = macAddress      value = <your station mac address>

key = APIKey  value = <your api key>

The keys need to be entered exactly as above, including the case.  Once you enter these and save them, the node server should connect to the Ambient servers and start sending data to the ISY.  What may be missing in the instructions is that you do need to restart the admin console after the node server is installed so that it will pick up the new nodes created by the node server.

I did some guessing just like this actually.   None of my guesses worked.  But these don't either. 

AmbientPoly(1)

Current Status: Disconnected
Current Version: 0.1.2
Time Started: Not Running
Uptime: None
Current Worker: ambientpoly-0021b90234d8-1

 

I played with the stop and start buttons but the status is still "not running", uptime "none", status Disconnected.

image.thumb.png.92b7adb33e5e0f85efab7af9a1dbc9d8.png


 

AmbientPoly Log (Last 5000 lines)
AutoScroll

      
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4062  100  4062    0     0  16392      0 --:--:-- --:--:-- --:--:-- 16379
100  4062  100  4062    0     0  16386      0 --:--:-- --:--:-- --:--:-- 16379
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1188  100  1188    0     0  10166      0 --:--:-- --:--:-- --:--:-- 10241
Cloning into 'nodeserver'...
Collecting pgc_interface>=1.1.0
  Downloading https://files.pythonhosted.org/packages/4b/01/130cf4d57349365bc63b1fc1597e050f421d30560f9da7361e4d747b8a06/pgc_interface-1.1.9.tar.gz
Collecting AWSIoTPythonSDK (from pgc_interface>=1.1.0)
  Downloading https://files.pythonhosted.org/packages/02/6f/f4440a73dc7f09e97db0b51b9caadc444324241314f19b16f1c561ac2dca/AWSIoTPythonSDK-1.4.7.tar.gz (79kB)
Building wheels for collected packages: pgc-interface, AWSIoTPythonSDK
  Building wheel for pgc-interface (setup.py): started
  Building wheel for pgc-interface (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/1b/0a/05/672f0f2868a4a4d95b35f28481ad8b0196ba69fdd7fbc96ecb
  Building wheel for AWSIoTPythonSDK (setup.py): started
  Building wheel for AWSIoTPythonSDK (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/32/57/b7/3a20085978ab5811946ad638b4be1e1f752e02230418e43875
Successfully built pgc-interface AWSIoTPythonSDK
Installing collected packages: AWSIoTPythonSDK, pgc-interface
Successfully installed AWSIoTPythonSDK-1.4.7 pgc-interface-1.1.9
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ pip3 install -r requirements_cloud.txt --user
Collecting pgc_interface<1.1.0,>=1.0.0 (from -r requirements_cloud.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/a7/1c/b1af8253f13db021e3744226dddd952c96e5b4d1ef81128ecae2310fd0a7/pgc_interface-1.0.11.tar.gz
Collecting urllib3>=1.23 (from -r requirements_cloud.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl (125kB)
Building wheels for collected packages: pgc-interface
  Building wheel for pgc-interface (setup.py): started
  Building wheel for pgc-interface (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/45/0f/05/f8ada0d8890538290440097188619cfd7ebba4e067d488bce0
Successfully built pgc-interface
Installing collected packages: pgc-interface, urllib3
Successfully installed pgc-interface-1.0.11 urllib3-1.25.6
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "./ambient-poly.py", line 6, in <module>
    import polyinterface
ModuleNotFoundError: No module named 'polyinterface'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4062  100  4062    0     0  27875      0 --:--:-- --:--:-- --:--:-- 28013
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1188  100  1188    0     0  21956      0 --:--:-- --:--:-- --:--:-- 22415
Cloning into 'nodeserver'...
Collecting pgc_interface>=1.1.0
  Downloading https://files.pythonhosted.org/packages/4b/01/130cf4d57349365bc63b1fc1597e050f421d30560f9da7361e4d747b8a06/pgc_interface-1.1.9.tar.gz
Collecting AWSIoTPythonSDK (from pgc_interface>=1.1.0)
  Downloading https://files.pythonhosted.org/packages/02/6f/f4440a73dc7f09e97db0b51b9caadc444324241314f19b16f1c561ac2dca/AWSIoTPythonSDK-1.4.7.tar.gz (79kB)
Building wheels for collected packages: pgc-interface, AWSIoTPythonSDK
  Building wheel for pgc-interface (setup.py): started
  Building wheel for pgc-interface (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/1b/0a/05/672f0f2868a4a4d95b35f28481ad8b0196ba69fdd7fbc96ecb
  Building wheel for AWSIoTPythonSDK (setup.py): started
  Building wheel for AWSIoTPythonSDK (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/32/57/b7/3a20085978ab5811946ad638b4be1e1f752e02230418e43875
Successfully built pgc-interface AWSIoTPythonSDK
Installing collected packages: AWSIoTPythonSDK, pgc-interface
Successfully installed AWSIoTPythonSDK-1.4.7 pgc-interface-1.1.9
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ pip3 install -r requirements_cloud.txt --user
Collecting pgc_interface<1.1.0,>=1.0.0 (from -r requirements_cloud.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/a7/1c/b1af8253f13db021e3744226dddd952c96e5b4d1ef81128ecae2310fd0a7/pgc_interface-1.0.11.tar.gz
Collecting urllib3>=1.23 (from -r requirements_cloud.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl (125kB)
Building wheels for collected packages: pgc-interface
  Building wheel for pgc-interface (setup.py): started
  Building wheel for pgc-interface (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/45/0f/05/f8ada0d8890538290440097188619cfd7ebba4e067d488bce0
Successfully built pgc-interface
Installing collected packages: pgc-interface, urllib3
Successfully installed pgc-interface-1.0.11 urllib3-1.25.6
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "./ambient-poly.py", line 6, in <module>
    import polyinterface
ModuleNotFoundError: No module named 'polyinterface'

    

Although I didn't notice it before I think the last line of the log might be the issue.

 

 

Link to comment
Share on other sites

3 hours ago, MrBill said:

Although I didn't notice it before I think the last line of the log might be the issue.

It is.  Apparently you're the first person to try and run this from Polyglot cloud.  There was a change in the module name quite a while back, shortly after I wrote this. It's been broken since then.

I just pushed version 0.1.3 so it should show up in the store in a hour or so.

Link to comment
Share on other sites

7 hours ago, bpwwer said:

I just pushed version 0.1.3 so it should show up in the store in a hour or so

Thanks.  This version doesn't seem to work either.   Just to clarify because this is the first node server I've attempted to use, I should press Stop and then Start to make the update occur?  Doing that doesn't make it it update the status are of the screen, it still shows 0.1.2, disconnected, not running etc...   I don't know how to interpret the log but it looks like it's got errors.

 

 

  Downloading https://files.pythonhosted.org/packages/a7/1c/b1af8253f13db021e3744226dddd952c96e5b4d1ef81128ecae2310fd0a7/pgc_interface-1.0.11.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  4062  100  4062    0     0  22386      0 --:--:-- --:--:-- --:--:-- 22441
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  1188  100  1188    0     0  24863      0 --:--:-- --:--:-- --:--:-- 25276
Cloning into 'nodeserver'...
Collecting pgc_interface>=1.1.0
  Downloading https://files.pythonhosted.org/packages/4b/01/130cf4d57349365bc63b1fc1597e050f421d30560f9da7361e4d747b8a06/pgc_interface-1.1.9.tar.gz
Collecting AWSIoTPythonSDK (from pgc_interface>=1.1.0)
  Downloading https://files.pythonhosted.org/packages/02/6f/f4440a73dc7f09e97db0b51b9caadc444324241314f19b16f1c561ac2dca/AWSIoTPythonSDK-1.4.7.tar.gz (79kB)
Building wheels for collected packages: pgc-interface, AWSIoTPythonSDK
  Building wheel for pgc-interface (setup.py): started
  Building wheel for pgc-interface (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/1b/0a/05/672f0f2868a4a4d95b35f28481ad8b0196ba69fdd7fbc96ecb
  Building wheel for AWSIoTPythonSDK (setup.py): started
  Building wheel for AWSIoTPythonSDK (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/32/57/b7/3a20085978ab5811946ad638b4be1e1f752e02230418e43875
Successfully built pgc-interface AWSIoTPythonSDK
Installing collected packages: AWSIoTPythonSDK, pgc-interface
Successfully installed AWSIoTPythonSDK-1.4.7 pgc-interface-1.1.9
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ pip3 install -r requirements_cloud.txt --user
Collecting pgc_interface<1.1.0,>=1.0.0 (from -r requirements_cloud.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/a7/1c/b1af8253f13db021e3744226dddd952c96e5b4d1ef81128ecae2310fd0a7/pgc_interface-1.0.11.tar.gz
Collecting urllib3>=1.23 (from -r requirements_cloud.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/e0/da/55f51ea951e1b7c63a579c09dd7db825bb730ec1fe9c0180fc77bfb31448/urllib3-1.25.6-py2.py3-none-any.whl (125kB)
Building wheels for collected packages: pgc-interface
  Building wheel for pgc-interface (setup.py): started
  Building wheel for pgc-interface (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/45/0f/05/f8ada0d8890538290440097188619cfd7ebba4e067d488bce0
Successfully built pgc-interface
Installing collected packages: pgc-interface, urllib3
Successfully installed pgc-interface-1.0.11 urllib3-1.25.6
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
--- Logging error ---
  File "./ambient-poly.py", line 8, in <module>

    import polyinterface

ModuleNotFoundError: No module named 'polyinterface'
Traceback (most recent call last):
OSError: [Errno 9] Bad file descriptor
    self.socket.send(msg)
  File "/usr/local/lib/python3.7/logging/handlers.py", line 936, in emit
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
    self._connect_unixsocket(self.address)
Traceback (most recent call last):

OSError: [Errno 107] Transport endpoint is not connected
  File "/usr/local/lib/python3.7/logging/handlers.py", line 854, in _connect_unixsocket
    self.socket.connect(address)
  File "./ambient-poly.py", line 10, in <module>

During handling of the above exception, another exception occurred:
    import pgc_interface as polyinterface
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "/root/.local/lib/python3.7/site-packages/pgc_interface/__init__.py", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "/usr/local/lib/python3.7/logging/handlers.py", line 933, in emit
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
FileNotFoundError: [Errno 2] No such file or directory
    LOGGER.info('{} {} Starting...'.format(__description__, __version__))
Call stack:
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
Message: 'PGC Interface 1.0.11 Starting...'
Arguments: ()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
Traceback (most recent call last):
  File "/root/.local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 134, in _message
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
FileNotFoundError: [Errno 2] No such file or directory
Exception in thread Interface:
    self._target(*self._args, **self._kwargs)
    self.run()

    self.sock.connect(SOCKETFILE)
Traceback (most recent call last):
    self.sock.sendall((json.dumps(message) + '\n').encode('utf-8'))
  File "./ambient-poly.py", line 262, in <module>
  File "/root/.local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 203, in send
  File "/root/.local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 182, in start
    polyglot.start()
    self.send({ 'connected': True })

 

Link to comment
Share on other sites

9 hours ago, MrBill said:

Thanks.  This version doesn't seem to work either.   Just to clarify because this is the first node server I've attempted to use, I should press Stop and then Start to make the update occur?  Doing that doesn't make it it update the status are of the screen, it still shows 0.1.2, disconnected, not running etc...   I don't know how to interpret the log but it looks like it's got errors.

I believe that it is suppose to automatically update when stopping and then restarting. 

You can try the latest and see if it works any better for you. It shouldn't have any errors now, but I'm having all kinds of strange problems with polyglot cloud. If I reload the web page after making any changes it seems to make things work sometimes.

I'd suggest deleting the node server and re-installing it from the store.  That way you know you're running the latest version (which should be 0.1.4 now).

Link to comment
Share on other sites

Hi @bpwwer - 

First, thank you for creating all of these weather node servers.  The entire community benefits greatly by your efforts and those of others that create these valuable additions for us.  

I see you've created several weather node servers.  Some appear to rely on one's own "local weather station" hardware.  I don't have any of that.  

As this thread is long and things can change, I'm wondering if you can give a brief overview of (or point me where to look for) the differences between them, and maybe which one you think is currently "best".   How would you compare them to the Climate Module in ISY?  Maybe this should be a new thread. 

I'll defer to you to define best since you're closer to them.  I'm not exactly sure how I'd use them, but I would start with pretty simple stuff.  I understand that the data these services provide is out of your control.  Would you ever use more than one in tandem?  

Thanks for the work you've done and thanks in advance for any guidance you can provide.  

Link to comment
Share on other sites

12 hours ago, TrojanHorse said:

Hi @bpwwer - 

First, thank you for creating all of these weather node servers.  The entire community benefits greatly by your efforts and those of others that create these valuable additions for us.  

I see you've created several weather node servers.  Some appear to rely on one's own "local weather station" hardware.  I don't have any of that.  

As this thread is long and things can change, I'm wondering if you can give a brief overview of (or point me where to look for) the differences between them, and maybe which one you think is currently "best".   How would you compare them to the Climate Module in ISY?  Maybe this should be a new thread. 

I'll defer to you to define best since you're closer to them.  I'm not exactly sure how I'd use them, but I would start with pretty simple stuff.  I understand that the data these services provide is out of your control.  Would you ever use more than one in tandem?  

Thanks for the work you've done and thanks in advance for any guidance you can provide.  

I don't think 'best' really applies when looking at the different node servers I've created.  The node servers that pull data from specific hardware are obviously tied to the hardware capabilities so you'd have to first define which hardware is best for your if you're looking for a personal weather station (which I understand you are not).   It doesn't make sense to really compare those node servers with the ones that pull data from on-line weather services.

If you look at the various node servers I've created for weather services (in alphabetical order):

  • udi-apixu-poly:  Going away as the service is being discontinued and replaced by a new API called WeatherStack
  • udi-darksky-poly
  • udi-owm-poly (OpenWeatherMap.org)
  • udi-weatherbit-poly (under development)
  • udi-weatherstack-poly (under development)

There are slight differences in the actual data returned by each service, but in general, they all support the same basic set of data.  There are differences in the plans each offer. Right now, I've coded these to support what data is returned by the 'free' plans. With paid plans, more data is available (typically things like longer forecasts and air quality type data).  The terms of use for each is different so that may effect which is better for you personally.  The biggest difference would be related to where and how these services get the data they provide. They mostly don't disclose this information, but it can effect how accurate the data is for your location.   I.E. one service pulls current conditions from an airport 60 miles away while another gets data from a college 2 miles away.  You'd have to try the different services to see what one tracks best with your location. 

The location issue is the main reason I started writing these. I live in a foothill area at about 1300ft elevation. When looking at data from weather services it either comes from an airport that is at about 200ft elevation or one that is about 3000ft elevation.  Those can be up to about 10 degrees different in temperature from my location, which makes using the data to adjust things like HVAC and and a whole house fan difficult.  I'm currently using a WeatherFlow personal weather station to get local condition data.

The ISY climate module is getting it's data from Aeris weather service.  It's similar to the above services but doesn't offer a free plan.  The main difference right now is that it offers a little bit better integration with the ISY and integrates with the irrigation module.  That's one area where the weather node servers need some work to catch up.

  • Like 3
Link to comment
Share on other sites

Thank you!  This is a helpful overview.  It appears that some are named a bit differently in the polyglot store, but as those are under development I likely wouldn't pick them at this point.  Perhaps I'll look at investing in a local weather hardware device.  I'm guessing there that while you can get specificity of current conditions, the forecast data might suffer a similar location problem that you describe?  I took a brief look at the WeatherFlow and didn't see a mention of detecting snow.  Anyway, this gives me something to think about and I'm glad I didn't just start with the first one in the alphabetical list as that one is going away.  Thanks again!

Link to comment
Share on other sites

Yes, even with a local weather station, forecasting would come from a service and still suffer inaccuracies from location, but that's pretty much true of any forecast data you get today.   For actual automation, at least what I'm doing, it's the current condition data that's really important.  For example, I have a rule that is something like this:

if a window is open AND the outside temp is less than the inside temp, then turn on the whole house fan.

For this to work, I need to know the real outside temperature.  When I was trying to use the climate module for this, it was a problem.  Both because the temperature reported wasn't very close and because the update interval was so long.   That's another think about the various services, the time between updates can vary.  Getting a temperature reading once an hour during morning or evening hours when the temperature is changing much more quickly can also be a problem.

Note, the node serves that I listed as under development aren't available in the store yet.  

Link to comment
Share on other sites

On 10/22/2019 at 7:09 PM, bpwwer said:

I believe that it is suppose to automatically update when stopping and then restarting. 

You can try the latest and see if it works any better for you. It shouldn't have any errors now, but I'm having all kinds of strange problems with polyglot cloud. If I reload the web page after making any changes it seems to make things work sometimes.

I'd suggest deleting the node server and re-installing it from the store.  That way you know you're running the latest version (which should be 0.1.4 now).

Thanks!  Appears to be working now.  (Although I didn't do anything!  it seems to have taken a few hours to startup.  When I posted above I was waiting to board a plane and it wasn't working... this is the first chance I've had to look since that time. Based on "time started" It seems to have randomly begun to work either 2 or 4 hours later (not sure which times are displayed CDT or PDT)).

  • Like 1
Link to comment
Share on other sites

Hi @bpwwer

I have no idea how to submit a file via github, however you might take a peak at this attached suggestion for updating the README.  I admit my proposed changes aren't exactly perfect but I don't know how to make it perfect either.   The biggest point tho is the two magic strings are included "APIKey' and "macAddress".  With this info I would have figured it out... I was convinced I was the one that was doing something wrong.  As it turns out, no one can get this running on Cloud Polyglot without knowing the two magic strings.

AmbientWeather-polyglot_README

Link to comment
Share on other sites

I am having issues with getting my weatherflow hub talking with the ISY with the weatherflowpoly.  

I have tried adding the stationID from the app and it contiues to log the following:

2019-10-25 09:10:08,744 [Controller] [INFO ] Updating Driver hub - GV4: 1572019808, uom: 57
2019-10-25 09:11:08,742 [Controller] [DEBUG] heartbeat hb=1
2019-10-25 09:11:08,743 [Controller] [DEBUG] set_hub_timestamp: 1572019868
2019-10-25 09:11:08,744 [Controller] [INFO ] Updating Driver hub - GV4: 1572019868, uom: 57

Prior to this there is an error in the log file:

 

2019-10-25 09:03:09,062 [Thread-1  ] [ERROR] Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "./weatherflow.py", line 362, in udp_data
    s.bind(('0.0.0.0', self.udp_port))
OSError: [Errno 98] Address already in use
2019-10-25 09:03:09,063 [Thread-1  ] [WARNING] /usr/lib/python3.7/threading.py:951: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
2019-10-25 09:04:08,741 [Controller] [DEBUG] heartbeat hb=0

 

Thoughts?

Link to comment
Share on other sites

51 minutes ago, Mecheng70 said:

I am having issues with getting my weatherflow hub talking with the ISY with the weatherflowpoly.  

Prior to this there is an error in the log file:


2019-10-25 09:03:09,062 [Thread-1  ] [ERROR] Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "./weatherflow.py", line 362, in udp_data
    s.bind(('0.0.0.0', self.udp_port))
OSError: [Errno 98] Address already in use
2019-10-25 09:03:09,063 [Thread-1  ] [WARNING] /usr/lib/python3.7/threading.py:951: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_DGRAM, proto=0, laddr=('0.0.0.0', 0)>
2019-10-25 09:04:08,741 [Controller] [DEBUG] heartbeat hb=0

 

Thoughts?

I commented in the git hub issue, but I'll repeat it here in case anyone else has this happen as well.

That error indicates that some other application on the RPi is already listening for data from the hub. By default, only one application on the machine can listen for the data unless it is configured specifically to allow sharing with other applications. The node server is configured to allow sharing but it looks like something else is already running that's not configured to share.

 

Link to comment
Share on other sites

11 hours ago, bpwwer said:

I commented in the git hub issue, but I'll repeat it here in case anyone else has this happen as well.

That error indicates that some other application on the RPi is already listening for data from the hub. By default, only one application on the machine can listen for the data unless it is configured specifically to allow sharing with other applications. The node server is configured to allow sharing but it looks like something else is already running that's not configured to share.

 

Figured it out... 

I had weewx running for my weatherflow and did not have the flag set to True for sharing. 

/etc/weewx/weewx.conf

Updated the line under the [WeatherFlowUDP] section to be share_socket = True

Thanks.

Link to comment
Share on other sites

WeatherflowPCG is crashing on my PGC...

2019-10-26 21:56:26,216 [Interface ] [ERROR] MQTT Connection error: 'Controller' object has no attribute 'Station'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 209, in _startMqtt
    self._connect()
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 234, in _connect
    self.inConfig(self.init)
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 552, in inConfig
    watcher(self.config)
  File "./weatherflow.py", line 69, in process_config
    if self.Station == '':
AttributeError: 'Controller' object has no attribute 'Station'

I have 'Station' configured as a custom parameter. I've tried uninstalling and reinstalling it - no change.

Is this a known issue?

Link to comment
Share on other sites

8 hours ago, Michel Kohanim said:

@MWareman,

We fixed the custom parameters not saving. That was fixed and it seems that something else is broken. Do you still have this problem?

With kind regards,
Michel

I do - yes. But I don't think it's the parameter save issue.  The parameter appears to be saving just fine now (Thank You!). I even see it being used in the log when the WeathewrFlowPGC Poly starts:

2019-10-27 15:12:52,846 [MainThread] [INFO ] PGC Interface 1.1.9 Starting...
2019-10-27 15:12:52,903 [MainThread] [INFO ] Running with WorkerID: weatherflowpgc-{uuid}-5
2019-10-27 15:12:52,904 [MainThread] [INFO ] First run: False
2019-10-27 15:12:52,904 [MainThread] [INFO ] Server file read into memory...
2019-10-27 15:12:52,905 [Interface ] [INFO ] Connecting to MQTT endpoint a3e3308oqn03e2-ats.iot.us-east-1.amazonaws.com...
2019-10-27 15:12:52,975 [MQTT      ] [INFO ] MQTT Connected successfully to: a3e3308oqn03e2-ats.iot.us-east-1.amazonaws.com as weatherflowpgc-{uuid}-5_5_{guid}
2019-10-27 15:12:52,975 [MQTT      ] [DEBUG] Sent Message: [prod/ns] : {"connected": true, "userId": "{guid}", "topic": "prod/ns/weatherflowpgc-{uuid}-5", "profileNum": "5", "id": "{uuid}"}
2019-10-27 15:12:53,038 [Interface ] [INFO ] MQTT Subscribed to topic: prod/ns/weatherflowpgc-{uuid}-5
2019-10-27 15:12:53,039 [NodeServer] [INFO ] Starting WeatherFlow Node Server
2019-10-27 15:12:53,039 [NodeServer] [INFO ] Sending customParams to Polyglot.
2019-10-27 15:12:53,040 [NodeServer] [DEBUG] Sent Message: [prod/ns] : {"customparams": {"Station": "3865"}, "userId": "{guid}", "topic": "prod/ns/weatherflowpgc-{uuid}-5", "profileNum": "5", "id": "{uuid}"}
2019-10-27 15:12:53,040 [NodeServer] [INFO ] Sending notices to Polyglot.
2019-10-27 15:12:53,041 [NodeServer] [DEBUG] Sent Message: [prod/ns] : {"notices": {}, "userId": "{guid}", "topic": "prod/ns/weatherflowpgc-{uuid}-5", "profileNum": "5", "id": "{uuid}"}
2019-10-27 15:12:53,044 [Interface ] [INFO ] in process_config
2019-10-27 15:12:53,044 [Interface ] [ERROR] MQTT Connection error: 'Controller' object has no attribute 'Station'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 209, in _startMqtt
    self._connect()
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 234, in _connect
    self.inConfig(self.init)
  File "/usr/local/lib/python3.7/site-packages/pgc_interface/pgc_interface.py", line 552, in inConfig
    watcher(self.config)
  File "./weatherflow.py", line 69, in process_config
    if self.Station == '':
AttributeError: 'Controller' object has no attribute 'Station'

I just don't know if this is a bug in the WeatherFlowPCG poly - or pgc_interface.py

Michael.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...