Jump to content

Davis WeatherLink API v2 node server available in beta store.


bpwwer

Recommended Posts

Posted

I've made a beta version of a node server that uses the V2 API available for initial testing/feedback.

The version 2 API is very different from the version 1 API.  It organizes the data differently and node server node organization changes to match the API.

The node server first queries for the list of stations associated with your account.  For each station it finds, it creates a "station" node.  It then queries for the list of sensors and sensor data reported by each station.  It creates a node for each sensor associated with the station.  These nodes are grouped with the correct "station" node and are named based on sensor product name.

Support for different Units is still missing in this beta release.  For some data (rain for instance), the data is available in both US and Metric values, but for most, it seems to only be available in US units.

Since this is a new node server, you can run it in parallel with the existing production WeatherLink node server.

Posted

No, it only communicates with the server.  The WeatherLink node server gets data directly from the console.

  • 4 weeks later...
Posted

Good Morning @bpwwer

I just installed the new beta version in a new slot and deleted my old version. Most of it seems fine but am seeing a couple errors. I assume you are still using my station too. Can you let me know what you think.

Various screen shots belowScreenshot2023-09-27at9_03_19AM.thumb.png.9d518108061bd0d6af5c958698cd1322.png

Screenshot 2023-09-27 at 9.08.15 AM.png

Posted

Yes, I use error's to log debug messages a lot while developing so a bunch of those will change to info/debug in the final version.

The "Failed to find node address ..." message may or may not be meaningful. I'd have to see the full log with the level set to at least info, including the part where the node server starts to be sure.  As it goes through the sensors, it will skip sensors that don't have any properties supported by the node server.  Those will then show that error message during the poll.  That could be what's happened or it could be a legitimate error and the nodes really didn't get created because something failed.

Posted

The AirLink fields look like station fields, not sensor fields which makes me think that the admin console hasn't been restarted and doesn't know what the sensor node looks like.

There's a lot of data in the various queries that I just ignore.  For example most of the sensors have both sensor data and health data.  I ignore the health data.  You can see that with :

Sensor Node Console Health/598950 has no properties we support

and if you look above that in the log, it shows all the fields it found in the health data structure that aren't supported.  When it parses the fields for a specific sensor/data block and doesn't find any supported fields, it doesn't create a node for that.  When it later shows up in the query (the query returns everything, I can't pick and choose what to query). It reports the fact that there's no existing node as an error.    I probably need to track which sensor/data blocks are valid (have nodes) and which aren't and not log an error those those that aren't supposed to be valid.

 

Posted

@bpwwer

There does appear to be something wrong with my airlink fields getting updated the admin console.It does not appear ever to be updating. I never see what you had shown in your other post for an airlink.

. Whenever I select airlink it shows the last item I selected. See an example below I had selected the Vantage pro first and then went back to the airlink. 

To make sure all was well, this AM I updated all modules on the PG3. I then deleted Davis V2 and restarted the Admin Console to clear everything. I then reinstalled the Davis V2 node server and restarted the Admin Console. Same thing.

If I look in the PG3 nodeserver logs it is setting up my 2 airlinks OK. I quickly checked if they showed up in the info sent from UDI to Home assistant app and they appear to be ok. So it looks like an Admin Console issue. Here are the versions I have currently installed.

Let me know what you think I should try next.

PS When you try it from your side connecting to my station is everything ok? Very weird if it is.

Thanks

Steve

Screenshot 2023-09-28 at 9.42.49 AM.png

Screenshot 2023-09-28 at 10.06.41 AM.png

Screenshot 2023-09-28 at 9.40.38 AM.png

Posted (edited)

 

@bpwwer

a bit of new info.Screenshot2023-09-29at9_56_44AM.thumb.png.4a655096d4705c75ea74410e7777f3d8.png I stumbled on this z-wave X-ray this morning. It shows the airlink info is there, apparently the admin console can't display it for some reason. FYI i cleared java cache and redid the test. Still the same results.

 

Edited by stevehoyt
Posted

It looks like the admin console wasn't able to get the profile file (or at least the airlink node definition) from the IoX.  The admin console needs that to define how the data gets displayed.  Without it, it typically just displays whatever was last viewed.

It took me a while to get the admin console working as this is the first time I've tried since doing a bunch of OS upgrades to my desktop.  But now that it is, I still see the Airlink displayed fine.  However you only provided me with access to your office weather station, not the equipment closet one you list above.

When the node server starts, it first does a bunch of queries and parses all the data to determine what types of nodes to create.  It then has to build the profile files and finally send them to the IoX.  Depending on how many sensors it's having to parse, this can take a couple of minutes.  Unless you're adding/deleting sensor devices, the files should be the same every time it starts so you should only need to restart the admin console once after the initial start up of the node server.  It sounds like you've done this.

From the log files, it looks like it's uploading the profile files to IoX without any issues.  So that kind of implies that the node server isn't creating them correctly.  

Posted

I should have told you I changed the name from office to equip  closet. as I moved it. We both should be looking at the same thing, perhaps the renaming caused the problem. 

Anything I could do to help figure this out?

Posted

I didn't have the node server renaming the node when the station name changes so it was still showing as office but the incoming data does have the new name.

I only see one airlink in the data I'm getting when I query the current conditions for the station, not 2 like you are.  Any reason you can think of that would cause that?

I think it might be because of the two airlink sensors.  When I create the node definitions and NLS entries, I do so for each sensor so with 2 airlink's it's going to create duplicate entries in the profile files.  It's possible that the IoX doesn't like seeing the duplicate entries and that's why it's not showing them properly.  I'm looking into fixing that now.

Posted

I just uploaded version 3.0.1 to the beta store.  Try re-installing and see if this works better.

Posted (edited)

@bpwwer

I just tried the new version. No change as far as data for the airlinks being displayed. Also for the fun of it I tried to write a program with an if statement on both of the airlinks and the parameters do not appear in the if.

I am not sure if that means anything.

No idea why you would not see both airlinks, but if I had to guess it probably is related to the weather link pro share.

I will message you privately with the API v2 keys. Why don't you see if that makes a difference. I am not sure how much polling they will allow, but for now lets give it a try.

 

If you need me to I could delete one and see if the data would display then. I prefer not to do that if possible but will if needed. I could try deleting it from your config file too if that would help.

Let me know what else I can do.

Edited by stevehoyt
Posted

Do you see the same errors in the Yolink node server or any other node server for that time frame?

When the errors happen in the Davis log, there's also a pause of about 40-60 seconds in PG3x where nothing is received from any node server.  Typically, PG3x is seeing something every second.

The error is happening when the node server is trying to send messages to the MQTT broker and it fails.  This indicates some type of communication failure on the network.  It's not something in the node server code.

 

Posted

I'll keep your comments in mind and watch what is going on when I see the errors again.

Xfinity internet has been flakey the last few days here. That may be the cause.

Pardon my ignorance I know nothing about MQTT, but where is the MQTT broker living. Since I have a polisy I assumed everything was on it. 

Thanks

Posted

Yes, the MQTT broker is running on the Polisy.  So in theory, external network issues shouldn't effect anything between node server and PG3, but there's nothing that I can do at the node server level (or even the PG3 level to change that behavior.  All I can do is make sure it attempts to recover when it happens.

Posted

FYI

I am seeing about 10 of these errors per day. Also see an occasional similar error from the solar edge nodeserver. 

If you think it would be of value, I can open a ticket with UDI. About all I could say is to contact you as you know what is going on. As I am running a Polisy not EISY I doubt anything would get done.

Let me know if you think it would be of value otherwise I will just live with it for now.

Posted

@bpwwer

I see that Benoit has talked to you about this issue. 

What are your thoughts? Should we have the option to turn off one of the consoles? I know I can delete it in the config section. 

I would be perfectly satisfied to turn off one of the consoles. Most of the data ( except indoor temp humidity etc) is all coming from the same outside source, so it is redundant. I have multiple consoles so that I see the info in different rooms. 

The one I would turn off in my case would be "Steves House"

Steve

 

Posted

I didn't think of this before, but I never really ran my system with your configuration for any length of time. For the development, I would start it, check if things started up properly or not, debug, restart until it was working.  Since then I've left it off.  So I never let it run for more than a couple of minutes at a time.

If you don't mind, I can let mine run for a day or so and see if I get the same errors showing up.

I'm not sure you can disable the station in the node server.  Maybe by deleting the nodes while it's running. But a restart of the node server would re-create the nodes.

Posted

No problem go ahead and run it for a couple days and lets see what happens. 

I don't know if Davis has any limitations on how often we can query. If so, I can shut mine off for awhile until you get the data you need and it won't hurt me.

I am not sure what your options are for changing the nodeserver are,  but I don't have a problem deleting a station in the node server for now. I rarely restart it so no big deal.

Per benoit's  answer below to me. Is it hard to just do the poling via 1 thread only as a permanent fix?

"I think the problem appears when the nodeserver tries to publish data simultaneously from 2 threads.

I contacted Bob, and the nodeserver indeed can publish from 2 threads. When polling, there will be one thread per weather stations, and they basically get polled at the same time. This means that it is likely that publishes can happen at the exact same time.

Posted

I didn't look at yesterday's data, but so far today I've seen 3 instances.   So I'm able to reproduce the issue.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...