[PROJECT] Driver for Ambient API/Local and Ecowitt

Thanks for letting me know! I will have to take a deeper look at it then. The samples I had so far did not work at all and my own Ambient system cannot do it apparently.

@bertabcd1234 Just installed your driver and its working great, pulling data locally from my WS-5000 (on f/w 1.74 without gateway). It's logging several 'skipping key' debug messages (rainfall statistics, maxdaily gust, etc.) which I assume are attributes that aren't supported by the driver.

This is a great supplement to the Ambient cloud api. For some reason the WS-5000 frequently loses connection with the Ambient-- the 'blue ball' icon disappears on the screen and the station no longer updates ambientweather.net. It recovers, eventually, but as a result the data pulled from the api by the Hubitat device is usually stale. Yet it never loses its connection with Wunderground, at least not since I updated its wifi firmware.

Thanks for this!

1 Like

I'm still confused, but it seems like you are talking about using Ecowitt gateway to access the Ambient WS-2000 locally (without the cloud API). Correct?

You can add the Ambient Weather Station to the Ecowitt Gateway, and then the Ecowitt Gateway can serve up the data from the station.

Looks like this in the Gateway:

Live Data:

My PWS (WS-2902C) in the Ecowitt Gateway device list:

1 Like

Yeah, I really only added the ones that were useful to me (plus a few more that seemed reasonable). :smiley: But I tried to keep the logging useful enough that it would be easy for someone to add parsing for keys/attributes that are valuable to them.

The biggest limitation to this seems to be that you can only configure one custom server, which is fine if you just have one hub (or the ability to share it out). I'm honestly shocked that Home Assistant doesn't have this local support yet, or at least didn't last time I checked (they do have an AmbientWeather cloud integration), but since I could only pick one direct destination, I'd rather it be Hubitat anyway.

1 Like

@bertabcd1234

Your driver is working for my Ambient WS-2902 (FW 4.3.2) in direct mode,

Here is what is working, as viewed from device page:

Current States

  • humidity : 99
  • illuminance : 0
  • indoorTemperature : 68.2
  • lastUpdated : 1639816331000
  • pressure : 30.25
  • status : online
  • temperature : 37.2
  • ultravioletIndex : 0
  • windDirection : SSE
  • windGust : 1.1
  • windSpeed : 0.9

It is throwing an error on each reporting interval:
2021-12-18 12:28:56.401 am Error in parse(): java.lang.NullPointerException: Cannot get property 'key' on null object

I do not want to sound rude, but we might want to continue discussion of @bertabcd1234's elsewhere so we do not confuse users with this driver. Is there a release thread for it? I could not find one in a couple searches.

1 Like

@snell - based on this sample driver, do you think you’ll be able to add local support for devices like the Ambient WS-2902 to your driver?

With permission now from @bertabcd1234 I plan on looking into his driver. If possible I will incorporate changes to mine to make non-gateway local connections.

Hopefully that will be good news for the WS-2902s also.

1 Like

Also, if you use mine and have a question about it, I don't have a formal "release thread" for it (might change my mind if more people use it--just wrote it to fit my own use, plus a few things that seemed reasonable even if I didn't need them), but you're welcome to PM me for the time being with any issues to avoid clogging this thread with unrelated posts.

1 Like

@snell It's been a while - hope you're doing well. Your driver has been chugging along nicely these past 6 months or so. After reading the recent thread, I was thinking it would be nice if you could use the Ambient direct approach described by bertabcd1234 to tie into your driver in addition to using the Ecowitt GW1000 (as I am now doing). The Ecowitt solution works great, but I think most would prefer not to buy the extra device if it's now possible to tie into the Ambient console/gateway for direct reporting.

Updated Version(s):

  • AmbientEcowittWeather.groovy = 0.7.10

Change(s):

  • Support for Ambient Local has been added. For those Ambient stations capable of keeping the data completely local (sending it to a local receiver, such as the Hubitat) you can now select that data method... and it works. I tried it with my WS-2902A (with the latest firmware) and it received the data and parsed it properly. Up until now I was under the assumption it was using UDP but thanks to @bertabcd1234's driver as a demonstration (and allowing me to use his code) it worked perfectly with only a single tweak to accommodate a new piece of data.
  • Added support for the batt_co2 data that was now being received and a batt_cellgateway I noticed in the API data. I know neither of those were there in the past... and they do not show in the changelog notes, but they are supported by my driver now.
5 Likes

@snell Thanks as always for your work to keep this driver among best in class. I want to emphasize that there are definite advantages to using the Ecowitt GW1000 gateway for direct reporting to Hubitat. For about $30 for the gateway plus the cost of each sensor, you can add up to 8 external sensors including heat and humidity, lightning, soil moisture and others. If you don't need additional sensors, the new Ambient console/gateway direct to Hubitat feature is the way to go. More details at ECOWITT Welcome to Ecowitt! .

When I select Ambient Local as an option it hides the preference input option for MAC address. Is this intentional? I input the Hubitat IP and specified port through the awnet configuration app.

@beachmoney - you add the MAC address into the "Device Network ID" field.

If you look in the comments at the top of the driver, it has really good instructions.

FYI - This driver is working perfect for me in local mode on my WS-2902A... again thank you to @snell and @bertabcd1234 for making this happen!!!

Wanted to try out the local direct to Ambient WS (WS-2902C) but I think I'm misuderstanding the setup. I've configured (I think) properly. I've set the DNI to the MAC address of the Ambient station.

No child devices created. What am I missing? (I'm prepared to slap my hand to my forehead.) :slight_smile:

Did you uses the awnet app to setup the local server? Here is how I have mine configured.

@danabw:
The main portion is the app setup to make sure that not only is your Ambient at the right firmware but that it is uploading the data at the Hubitat. Amusingly it is all basically the same as if you set up an Ecowitt Gateway. If the MAC is set (remember, just the letters and characters, no : or other separators for it in the DNI) and the app has set it to send it... it is pretty well set.

You will likely only see two child devices created. An Outdoor Station (plus ID) and an Indoor Station (plus ID). Your preferences all look correct to me.

I updated the DNI to the devices MAC address and still no dice. I started seeing these in the logs:


which is not the MAC address of the device that is shown in my router, or on the back of the device itself. Not sure what that device is. I changed the DNI to be the 7 digits before the colon and it is updating correctly now :man_shrugging:

Not sure how they go about sending the data to it... but glad it worked. The MAC I had used was the one displayed in the Device List in the app.