Jump to content

Polyglot weather station node servers


bpwwer

Recommended Posts

On 10/27/2019 at 8:18 AM, MWareman said:

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.

It's a bug in the node server.

I'm not sure what changed in Cloud Polyglot but it's now calling the node server's process config function before the controller node class has finished initializing.  I need to add more checks to make sure that the controller node has finished initializing before before processing any of the config changes.

Unfortunately, I'm currently without power so I don't have access to my development system to make changes like this.   This issue may be effecting my other cloud based node servers as well.  

 

Link to comment
Share on other sites

It's a bug in the node server.
I'm not sure what changed in Cloud Polyglot but it's now calling the node server's process config function before the controller node class has finished initializing.  I need to add more checks to make sure that the controller node has finished initializing before before processing any of the config changes.
Unfortunately, I'm currently without power so I don't have access to my development system to make changes like this.   This issue may be effecting my other cloud based node servers as well.  
 


Got it. Thanks. Hopefully you get power back soon!
Link to comment
Share on other sites

4 minutes ago, MWareman said:

Got it. Thanks. Hopefully you get power back soon!

 

Power's back on now, but may go off again tomorrow.   

I think I have it fixed now. I believe you just have stop and restart the node server to have it pick up the latest version (which is 1.0.2).

  • Like 1
Link to comment
Share on other sites

2 minutes ago, MWareman said:

Polyglot is still reporting version 1.0.1 thought - just in case.

I think it reports what it shows in the store and the store only checks for new versions periodically. However, when it actually starts the node server, it gets the latest copy from github.

  • Like 2
Link to comment
Share on other sites

4 hours ago, MWareman said:

PGC Darksky appears to be having some issues... 08527ceb73b100c497262e31980ff53c.jpg

The errors only show up when you start the Darksky poly.

As far as I know, those errors are coming from Polyglot not the node server.  I would suspect that Polyglot is having problems communicating with the ISY.  I've randomly seen these messages also while testing.  Node server errors would show up in the real-time log.

One thing that's a bit strange is the node server version number.  The latest DarkSky node server is version 1.1.3 and I believe that Polyglot cloud loads the most current version every time it starts so it would be helpful if it would display the version number of what's actually running vs. what was probably originally installed.

Link to comment
Share on other sites

1 minute ago, bpwwer said:

As far as I know, those errors are coming from Polyglot not the node server.  I would suspect that Polyglot is having problems communicating with the ISY.  I've randomly seen these messages also while testing.  Node server errors would show up in the real-time log.

One thing that's a bit strange is the node server version number.  The latest DarkSky node server is version 1.1.3 and I believe that Polyglot cloud loads the most current version every time it starts so it would be helpful if it would display the version number of what's actually running vs. what was probably originally installed.

I would agree fully - and also have seen occasional such messages.

However - I can have the Darksky Poly disabled and not see any for hours. As soon as I start the Poly - it's fair to say I get many, many such errors in the first seconds (maybe 30-40).

You may be able to tell - I am stopping and starting regularly - so should have the latest. But the version does not show that.  So - the PGC upgrade appears maybe broken. Maybe this is a bug that is already fixed if only the new version would pull down.

Link to comment
Share on other sites

16 minutes ago, MWareman said:

I would agree fully - and also have seen occasional such messages.

However - I can have the Darksky Poly disabled and not see any for hours. As soon as I start the Poly - it's fair to say I get many, many such errors in the first seconds (maybe 30-40).

You may be able to tell - I am stopping and starting regularly - so should have the latest. But the version does not show that.  So - the PGC upgrade appears maybe broken. Maybe this is a bug that is already fixed if only the new version would pull down.

The DarkSky node server (as well as the other weather service node servers) does have a lot of values to update. When it starts, it will typically try to update them all. If those are failing, it would explain the quantity of messages.  Once started, it will only update values when they actually change so normally that's only a couple of values on an update.

I don't think there's anything I can do about this.

  • Like 1
Link to comment
Share on other sites

I have a feeling the issue is something to do with the shadow Darksky Poly introduced by the early Polisy config. I think it messed up something in ISY - and that something is now affecting my PGC polys.

PGC used to show the ‘unmanaged’ polys on the Polisy. I tried deleting the Darksky poly (with the intent to reinstall it) and all unmanaged polys disappeared as well. I reinstalled Darksky and after configuring it the errors returned.

I’ve had work meetings this afternoon - but I’m not sure how to recover. I probably need to remove all Polys and start again... it seems like PGC is having trouble talking to my ISY. I wonder if Polisy could have broken slot 0...

Link to comment
Share on other sites

2 hours ago, Michel Kohanim said:

@MWareman,

Does ISY Portal communicate with ISY without any issues? From my experience with Darksky, once it starts populating values, it takes about 10-20 seconds during which time  you cannot do anything with ISY Portal (commands get queued).

With kind regards,
Michel

Yes - ISY Portal is successfully talking to the ISY just fine. I can turn devices on and off, access UDAjax etc...    good to know about the delay though. That may be what caused my next issue...

I posted elsewhere earlier - things settled down and now I have two 'Darksky' polys registered - and they both show 'Unmanaged' in both PGC and Polisy. Should I just delete them from the ISY Admin tool?

Michael.

Link to comment
Share on other sites

What's the proper way to reduce the level of detail going to the Polyglot Log? Currently my WeatherPoly is recording 40 "Info" lines to the log every time CumulusMX updates. Changing the debug level to "warning" would vastly reduce the records in the Polyglot system log.

Link to comment
Share on other sites

18 hours ago, DaveStLou said:

What's the proper way to reduce the level of detail going to the Polyglot Log? Currently my WeatherPoly is recording 40 "Info" lines to the log every time CumulusMX updates. Changing the debug level to "warning" would vastly reduce the records in the Polyglot system log.

I think that's something I'll have to change in the node server.  I've made most of them pretty verbose w.r.t. logging.

Link to comment
Share on other sites

1 hour ago, bpwwer said:

I think that's something I'll have to change in the node server.  I've made most of them pretty verbose w.r.t. logging.

 

1 hour ago, Jimbo said:

I make this controllable with a driver in most of mine so users can change it to warning to remove debug and info lines.

Sent from my Pixel 3 XL with Tapatalk
 

@bpwwer I use what @Jimbo has put in his nodeservers to adjust the logs verbosity on the fly. Appreciate your efforts on that optimization.

Edited by DaveStLou
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I have the AmbientPoly node installed via the Polyglot cloud and it is displaying information correctly in US units (i.e., Temperature in degrees Fahrenheit).  However, when I try to use the AmbientPoly data (Temperature, Wind, Precipitation) as a Status in a Condition as part of a Program, the units that are displayed are Metric (i.e., Temperature in degrees Celsius, Wind in km/hr, Precipitation in.mm/hr).  Is there a setting somewhere that can be used to have the values be US values when using this data as a Condition of a Program.

Annotation 2019-11-22 184458.png

Edited by peterskajr
Add screenshot
Link to comment
Share on other sites

On 11/22/2019 at 3:43 PM, peterskajr said:

I have the AmbientPoly node installed via the Polyglot cloud and it is displaying information correctly in US units (i.e., Temperature in degrees Fahrenheit).  However, when I try to use the AmbientPoly data (Temperature, Wind, Precipitation) as a Status in a Condition as part of a Program, the units that are displayed are Metric (i.e., Temperature in degrees Celsius, Wind in km/hr, Precipitation in.mm/hr).  Is there a setting somewhere that can be used to have the values be US values when using this data as a Condition of a Program.

Annotation 2019-11-22 184458.png

The node server doesn't have the ability to change the units. My understanding (at least at the time that I wrote it) was that the Ambient API only provided the data in metric units. I don't have the node server doing any conversions.

I don't have an Ambient weather station and don't have access to the API making it hard for me to support this node server.  

Link to comment
Share on other sites

3 hours ago, peterskajr said:

Bob,

Thanks for the response.  What is odd is the node server shows the temperatures in °F in the node screen, it's just when I want to use the node servers as a condition in a program does it show up as °C.

Annotation 2019-11-25 135221.png

I'm sure it's just the way I wrote it.  This was one of the first node servers I created.  I was using a test station from Ambient Weather, but they disabled it shortly after I wrote the node server so I don't have access to any data from them.

I'll take a look at it and see what I can do to fix it.

Link to comment
Share on other sites

On 11/25/2019 at 10:57 AM, peterskajr said:

Bob,

Thanks for the response.  What is odd is the node server shows the temperatures in °F in the node screen, it's just when I want to use the node servers as a condition in a program does it show up as °C.

I believe I have this fixed now.  Currently, the node server is only really supporting imperial units as that seems to be only what the Ambient Weather API reports.  I modified the node definition and editor files so that when using the node server's values in programs, you should get the option of what units to use.  However, temperature is behaving oddly for me.  When looking at one of the temperature values you get a drop down list that contains both Celsius and Fahrenheit.  Other values like pressure will give you the option to select ingh or mb.

Since the node definitions have changed, the easiest way to upgrade would be to delete the node server and re-install it. Otherwise the upgrade process is a bit more involved.

  1. Get the new version. On PGC, you can just stop and restart the node server to get the new version. For a local Polyglot you can update from the store.
  2. From the admin console, look at the main Ambient Weather node and use the "Update Profile" button.  This will tell Polyglot to send the updated node definitions to the ISY. If you don't see this button then deleting and re-installing the node server may be the only option.
  3. Restart the admin console so that it re-reads the profile files and gets the new node definitions.

On a different note. @simplextech and I were talking about combining our two Ambient weather node servers.  For those of you that have tried both, what features do you like/dislike about each?  Don't be shy it won't hurt our feelings.  The goal would be to create one node server that takes the best of both.

  • Like 2
Link to comment
Share on other sites

Bob, thanks for the update.  When I get a chance, I will reinstall the node server and see how it reacts.  I've tried the node server from @simplextech and I don't get any returned values.  I have a very simple weather station at this time (just outdoor and indoor temperature and humidty).  The one thing that I liked about the one from @simplextech is it did at least include a field for indoor temperature.  What I am essentially trying to do is turn on/off a ceiling fan based on the indoor temperature reading from my weather station.   Been playing around with IFTTT and webhooks but it doesn't seem to be very reliable to get the indoor temperature value to populate a State Variable in my ISY setup.

 

Link to comment
Share on other sites

21 minutes ago, peterskajr said:

Bob, thanks for the update.  When I get a chance, I will reinstall the node server and see how it reacts.  I've tried the node server from @simplextech and I don't get any returned values. 

What PWS are you using?  I've tested with a WS-2902, WS-1401, WS-8482 all return data and I use it daily for lighting control.  My current problem is too much data from all systems being online.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...