[PROJECT] Driver for Ambient API/Local and Ecowitt

I have my own keys as well

1 Like

@snell I've been using this Device for a few weeks now in conjunction with the Weather Device from @Cobra as there are advantages to both. Does the battery parameter on your device work for some devices? I have the WS-2902 and when I added the driver to HomeBridge it gives me a device with Outside Temp, Humidity, Illuminance which all work but the battery shows 0%, I thought this might be the battery in the console but replaced those and it still shows 0% so for now I have excluded the Battery option for that device in the HomeBridge json file. Thanks.

1 Like

I’m not seeing battery values for any of my Ambient Weather sensors. I think this may be a Homebridge limitation. Very few of my HomeKit devices show battery level.

The battery value reported by the API is just a 1 =good, 0 = bad. If you are seeing the battout as 0 it SHOULD be that the backup battery in the 2902A is considered bad.

I don't even see a battout reading at all?

I have this...

Which makes sense because as @snell was saying all ambient shows you is OK or Bad.

@waynespringer79 - You have to have the latest firmware on the IP observer module to see battery. If you’re getting data from a console, I’m not sure whether you can see it or not

1 Like

I have only have these listed. I doubt I have the latest firmware as I've not done anything with the 2902A since I've got it about April of LAST year.

But it looks like I will probably be replacing the unit anyway soon. It got busted from a tree falling on it in a storm about a month ago. I taped it back together it seemed to be working fine since then. But coincidentally with the timing I switched to this driver from the Thomas C Howard app/driver. The unit has been repeatedly dropping outside connection reporting, as my inside display is constantly showing blanks. I replaced the outside units batteries an hour ago thinking that the "crack" on the unit probably broke the solar panel, upon changing the batteries ants started fleeing out of the unit.

So long story short it looks like I'm shopping for an upgrade!

1 Like

That stinks... If you think about selling it off I might be interested (if cheap) just to have it in the house and try things out without messing with my "real" one.

If I was looking again already I might look at the other models to be able to add the optional sensors.

That's my thoughts as well, I'm looking at the WS-2000 because of the extra sensors. Although now I found their replacement parts page, I may be able to fix mine for like $45. I haven't found anything on their site about different firmware yet though?

If there's a firmware update for your station, it will be here...

https://www.ambientweather.com/software.html

It appears my model has to be updated from one of their many android apps, that I never could or can get to work right.

Even more reason to upgrade to the WS-2000 as it has an SD card slot to update from.

It would be nice if they reported the device firmware back in the API data so it could be checked easier.

I used their awnet software (which LOOKs terrible and ancient) to upgrade previously. My firmware is at 4.1.7 apparently with no newer version available in the app. Here is their page on it:

Yes that is the App I despise. I literally just spent 45 minutes factory resetting my display about 10 times because that app shown I had no devices. So I factory reset the display to rejoin the device through that app, it rejoined the wifi symbol shown on the display but the app screen still shown nothing under devices. Finally I threw my hands up and walked away.

I had to move my display from where it's been for months (right above a TV) on end because the signal indicator for my outside unit dropped to nothing, I moved the unit into what you would assume to be less signal strength because of more walls in between, and the signal is full, but still nothing in the awnet app. So I put it down once again and walked away.

Now after reading your post, I opened the app again to make sure it was the same thing I had problems with and all of a sudden the device now shows up and a button to click that says "Update Firmware to 4.1.7" Once I click that the download stays at 0% and timeouts

Geeze I despise that app!

After rebooting my phone it finally completed. After refreshing everything I still don't have a battout in my current states though

I cannot argue with it being a pain. I recall it being loads of "fun" to get my station added... but thankfully I have not had to deal with it since.

The battout should show if the station reports it in the API. Mine does not report it either and I checked my debug logs to see if it was reported at all just in case it was missing from the driver (which I checked first). Unfortunately this falls into the "not all devices report all values" disclaimer I assume.

1 Like

One of the things I'm noticing that if you set the "Data Refresh Rate" to 1 minute, it is posting the exact same info for 5 straight log inquiries. So it's like it's only getting updated data from Ambient Weathers API every 5 minutes regardless of what you have your refresh rate at and is only just logging more frequently, is this normal?

It can be. Not only is there the refresh rate you can set the driver to poll the API... but there are two other factors that can affect it:

  1. There is a refresh rate for your station that you set that determines how often you send data to Ambient. If that is only set for every 5 minutes, you would not see updated data at rates faster than every 5 minutes. I know I can set mine with the awnet app.
  2. The API itself indicates that data is only stored at 5 to 30 minute intervals. My driver is set to poll the latest possible data stored on it. As a note, as I was writing all this up I switched mine over to Debug and saw that the data coming back (the date) ranged from 4-6 minutes (more often 6). So with a 1 minute query interval I was getting multiple repeats.

They DO have a Realtime API (maybe, some parts indicate it is around, some parts say it is forthcoming) however that uses Websockets and my driver is not set up to do that at this time. Maybe a future version.

1 Like

@snell

My Ambient weather station is really different than what it seems most here are using. Most here seem to be using various complete traditional weather stations, Rain, Wind, temperature, humidity etc.

My Ambient Station is a WS-8482 panel with 3 different kinds of sensors wirelessly attached. One TX-3107 floating pool temperature sensor, one TX-3110B outdoor Temperature and Humidity sensor, and 3 TX-3102 Soil Moisture and Temperature Probe sensors. I use these to control a number of things such as turning my pool solar valve on and off as temperature changes, and for monitoring soil moisture to then control drip irrigation to various places.

As such my needs for reading the Ambient Weather data is a bit different than many. Your driver certainly works. It returns everything the typical users needs and more. But in my case the fact that it returns everything in one device is presenting me with a challenge. My Challenge is likely due to me being fairly new to HE and not fully understanding things like Rule Machine.

For example, most weather stations have just one battery, so checking the battery of such a station in a rule is simply a matter of building a trigger for a Battery type device and looking at the battery value change. But in my configuration, your driver returns 5 different battery values, one for each of my devices. i don't know how to address and check each one individualy in a rule or in a Device Watchdog. Likewise it returns 5 temperatures, 4 humidities, and so on.

How do i address each of these individually in a rule trigger or condition, or even in a dashboard tile? I am used to the Parent Child type apps used on HE and I would have thought that your driver would be a good fit with an app which breaks out each ambient weather device into a separate child device. Perhaps you have other ideas about that or about how to create individual devices for each sensor.

Your help in understanding how to use this driver is welcome and of course appreciated.

LJ

1 Like

I hope I can help. I was recently looking at your exact type of station because the floating pool sensor has my interest.

First, I am not sure that parent/child will work well here because the way the Ambient is reported is per station. Your station is reporting all those multiple batteries and such because that variety allows for linking secondary sensors, but from the API's perspective it is all one station. If someone had multiple stations it might be more useful to be parent/child.

As for including them in rules... It should be possible without too much hassle. In fact, I might have made it a bit too busy, but they should all be there.

If you go to Rules 4.0 you can select a trigger event of Custom Attribute. It will then ask what device you are going to use, so select your Ambient device. Then it will ask which attribute, You can choose from ANY attribute listed in the driver apparently. This is a bit misleading as it has attributes that have no values in them (for example, if you selected batt8). Not much I can do about this as you cannot dynamically adjust attributes in drivers at this time. At any rate, you can select the attribute you want, in your case whichever temperature, humidity, battery or whatever.

From there you can perform whatever other actions or such you want. I have it doing this exact thing by checking my Ambient's reported wind speed so I can turn off any inflatables we will put up at Christmas time if the wind gets too fast. I am also using it to check whether some exterior lights should go on, depending on the illuminance reported.

The dashboard tiles work in a similar way. When adding a tile, select your Ambient device. Then select the Attribute template. It should present you with a list of attributes in the "Pick an Attribute" field. THIS list only shows ones that have been reported with sendEvent from the driver... so you should only see ones that the driver has actively reported. I do not know why Hubitat made it that way (as opposed to the entire attribute list in Rules) but it works.

Hope this helps.

Thanks for the Rules direction. I had thought about looking at Custom Actions next but wasn't sure if you could use that for Triggers. I knew you could for actions. I am still learning all the power of Rules Machine and only have about 27 rules so far. I will play with this with your driver.

As for the SmartApp ideas. I used to use a SmartApp on Smartthings by Kurt Sanders. It was great and automatic and created devices for each of these sensors. Take a look at it if you want some ideas. I did approach him a month or so ago while I was converting from ST about whether he wanted to port it to Hubitat. He currently has no interest in Hubitat for himself so he wasn't interested in porting his app. It used to work great. If you are interested, take a look at:

Also, The pool temp device is the best I have used so far and the panel is pretty nice.

LJ