[PROJECT] Driver for Ambient API/Local and Ecowitt

This is a set of drivers originally designed to support polling the Ambient Weather API. It was started back in July of 2019 but has seen quite a bit of change over time. The driver also supports the Ambient Local method AND Ecowitt protocol (such as for the GW1xxx devices).

The three main methods are:

  • Ambient API: Allows you to connect to the Ambient Weather API using an API Key you obtain from Ambient as well as the MAC address of your Ambient Weather station. From there it will poll the API on a regular basis and make the data available to your Hubitat. Further, if you load the child driver also and enable child devices, each device will represent a sensor and contain data for that specific sensor. For example: soil sensors, pm2.5 sensors, or secondary temperature/humidity sensors.
  • Ecowitt Local: Supports Ecowitt gateways (GW1xxx and the GW2000 for the Wittboy) to get the information from all the supported weather sensors, including Ambient models like the WS-2902, and provides them to the Hubitat. From there the driver parses the data and provides it, including with child devices if desired. Setup instructions are in the initial comments of the parent driver.
  • Ambient Local: With newer firmware Ambient introduced the ability to have the stations send data locally to a custom destination. That destination can be set to your Hubitat and then you can use a Virtual Device of this driver and the Ambient Local method. Setup instructions for the Ambient Local method are almost identical to the Ecowitt method and can be found in the parent driver.
  • Available within the Hubitat Package Manager (HPM).

You can find the latest version of the main driver here, and the child driver for it as well (if you want to use the child devices):


Posted version 0.4 with the following changes:

  • Post all variables as Events also so that the data can be displayed in dashboards and used by Rules.
  • Conversion of many variables between metric/imperial measurements based on Hubitat's location.getTemperatureScale().
  • Added variables to account for conversions in some cases. Ex: windGust was added and will display mph or converted kph. However the original windgustmph the weather station reports will also still be displayed.
  • Found that the Weather tile in dashboards reports windSpeed and windDirection attributes, which are not in Hubitat documentation, so added those with the appropriate values.

Upcoming change(s):

  • "Human readable" wind direction. Ex: North, North-East, etc...
1 Like

I've been using this driver since March, what are you looking to do different than this one? Ambient Weather Device

To be honest I did not know that one existed when I created mine. I had seen a thread about one but the initial thread read like it only did a couple variables and Ambient did not have one listed for Hubitat.

So I made my own. I also reached out to Ambient and they will be happy to list one for Hubitat, although I am still waiting to work on mine more (I was hoping for feedback) and a response from Hubitat for some questions I asked them.

I guess I will have to look at that driver, but I do not want anyone thinking I "copied" something. Do far as I know I am not lacking any data field from Ambient besides the 24hourrainin one, but I have a fix for that (I think, my station does not report that field so it is tough to tell) that will be in version 0.5.

I’ve got it working great. One request would be to have solar radiation map to an illuminance or lux value in order to use it for lighting automations.

thanks for working on this

1 Like

That sounds pretty reasonable. I will try to get a new version out this weekend (maybe, but no promises late tonight).

@snell Great driver BTW. I noticed you mentioned above about converting wind direction to a name. That would be great. Also is there a possibility of getting baromrelin? thanks

I know I had it reading Baromrelin in general... So two questions:

  1. Just to be sure, you are running the latest driver version posted 0.4?
  2. Is it not showing in the list of state variables or events at all? If it is shown, is there a Hubitat value you want it duplicated to?

Either way, I should be able to have that fixed/added tonight, tomorrow at the latest.

@snell Yes I am running latest .4. I am not seeing the relative just the absolute in the attribute list. thanks

EDIT: I see baromrelin on line 91 of driver just not in the attribute list.

OK. So something I missed in the driver (darn). Bugs always take priority so I will work on that tonight.

No problem at all. Take your time. Thanks

I have posted version 0.5. It should take care of the baromrelin not being sent as an event. It also added compass points (based on a preference for how you want them reported) as "WindDirectionString" as well as reports illuminance based on the solarradiation variable.

@snell The baromrelin and Illuminance work great.Not sure what to do with the WindDirectionString. It reads the same as windDirection. Is there something we have to do? thanks

EDIT: it would help if I would scroll down the page a little on the driver page and select from the drop-down!! :roll_eyes: All working! thanks

Thanks! Question about the dropdown for wind direction... Does the naming I chose seem confusing or is it OK for what the various methods do?

@snell I think they are great. I have tried the 8 and 16 Word versions and they both are working fine. Wording is perfect.

1 Like

Working now. The MAC address has to have colons included. Could you either note that in the driver or remove the requirement? When you open IPTools, it gives you the MAC address with dashes, vs the web console that gives you colons. I first tried with dashes and that didn't work, so I removed them and when that didn't work I started thinking my key wasn't right, since the log simply shows "Getting data for MAC: 000EC61xxxxx"

Perhaps you could show a detailed error that the MAC address isn't entered in the correct format if it's not possible to allow any of the three formats for entering it?

What's the difference with the Current State vs the State Variables shown?

I get different values for temp1 and humidity1 in each.

Current States
State Variables
43%20AM 27%20AM 03%20AM

Hey @snell! This is good! It's choosing my indoor humidity and yet still displaying my add-on sensor humidity level. Nice!

Of course, I don't have my original outdoor temp/humidity sensor powered up right now, so is it mapping outdoor to indoor humidity? They seem to show as the same right now. I have ordered what I think might work as a replacement for the factory outdoor WH32E sensor, but won't know for a week or so.

I will see if there is something I can do about the MAC address. At the very least I will make the description better for v0.6, but maybe I can figure a way to accommodate multiple styles... Something to think on. Not sure how to display an error on preferences yet... Must be a way though.

I typically store all variables I am dealing with as state variables, so everything starts there. Then, in this case, I sent each one over as an Event, so they show in Current States. If I do not send them as an Event, they are not able to be displayed in the dashboard for example. Originally I was not sure everyone would want every single possible value. I may thin out what is in the variables in the future.

It is weird that they would have different values. For most everything I just repeat the value from the state variable to the Current State event... so I will have to look at why it might be different.

1 Like

luminance is working great! this driver seems really solid.


Download the Hubitat app