BME-nodeservers / docs

Documentation for my node servers
Other
0 stars 0 forks source link

NodeServer Online does not appear to be populated #9

Open AlecG2 opened 1 year ago

AlecG2 commented 1 year ago

The actual weather data is working fine for me (as well as the forecast data) however, the "NodeServer Online" field is always 'blank' and when the program logic checks for "NodeServer Online" it always fails - even though the node is providing data. I noticed a similar problem in the NOAA node server as well.

Another issue I noticed is that the "Gust Speed" is also 'blank' when the node is initially started and remains 'blank' for quite a while (an hour or so.) This results in logic that uses "Gust Speed" to fail until this field is populated. I believe this is due to the server logic accumulating the data for "Gust Speed" and only periodically updating it. I would suggest populating this field on node startup with some value - probably zero, so that the logic will not fail while waiting for the server to update it.

bpaauwe commented 1 year ago

I don't know which of my many nodes server's you are commenting on.

However, the node server on-line value is not populated by the node server. PG3/PG3x updates that value only when the node server starts or stops.

Blank fields are typically caused because the IoX doesn't maintain the current values and waits for updates from node servers to re-populate them. But back when only the ISY i994 existed, we designed the node server to only send data when values changed so that node servers didn't overwhelm the ISY with unnecessary data. The results of that is blank fields until the node server sends an update.

The node server should be sending all the data it gets from the weather service when it first starts. If it's not sending gust speed on startup, that would mean that the server has not included gust speed in the data sent to the node server. I don't believe the node server should make up fake data in that case. Leaving it blank is more accurate than providing made up data. It's possible there's a bug in the node server, but you'll have to tell me which node server before I can take a look at it.

AlecG2 commented 1 year ago

Sorry, I'm new to the GitHub and thought I was commenting on the section for OpenWeatherMap, but I guess that I'm wrong and will include the node name in any future comments.

I understand what you are saying and that makes sense. Now that I understand this, I am able to restart the node server, and now it is reporting "Connected". So this solves my primary issue - Thank You!

I agree with you that the "gust speed" being blank is a server issue. However, this causes any program reference conditions to it to fail (I assume because 'blank' is not a valid comparison value) which, in turn, causes the associated programs to fail to operate properly until this field becomes non-blank. If there were a way to detect if a node value were blank, this could be solved programmatically, but I can't see any way to do this.

My suggestion to populate this with some value would alleviate this problem and allow the logic to operate - unfortunately, my suggestion of populating it with the value zero was kind of dumb; a much better choice would be to populate 'gust speed' with 'wind speed' at node startup. This is (in my opinion) a reasonable value, because, at startup, the gust speed is not known and the current wind speed is as reasonable a value as you could ask for until something better is computed later on.

AlecG2 commented 1 year ago

It occurs to me that some context for my concern would be helpful. I live in Las Vegas and have a 6'x10' retractable (motorized) vertical solar screen that is positioned in my front entry way. This is lowered during the day to reduce the heat absorbed by the front door and consequently transmitted into the house. Because this is essentially a 'sail' when it gets windy, it is critical that I be able to detect when it becomes gusty and raise the solar screen to protect it from being ripped to shreds.

In a high wind condition, it is unacceptable to have to wait an hour or two to be able to determine the gust conditions - by this time the screen would be destroyed.

I understand that in many other weather cases, it really doesn't matter if the data isn't available in a timely manner, but there are circumstances, such as mine, where this is critical. Because of this issue I am not able to use 'gust speed' and have had to use 'wind speed' instead. Although 'wind speed' is doing a good job in most cases, it would be better to use both 'wind speed' and 'gust speed' to raise the screen when strong gusts are anticipated, even though the wind is not currently strong.

Hopefully this gives you a better understanding of my situation.

bpaauwe commented 1 year ago

I just have this one git repository that holds all the readme/documentation for all my node servers (which is a somewhat unique way to handle this), so issues posted here don't include any info I can use to determine which node server you're commenting about.

Your suggestion of using wind speed is a good idea. I'll take a look at doing that.