[PROJECT] Driver for Ambient API/Local and Ecowitt

@anon81541053 it's looking pretty good. Like I said, we should converge before we diverge much. :slight_smile:

I am less concerned about the tiles/display, and more concerned about how I can use the individual values. So I would like to do something like "If it's warmer outside than inside, do XYZ" or "If it's windy outside and the window is open do XYZ". So, being able to use the sub sensors as first level citizens in rules etc.

@anon81541053 I also have the WS-2902A sensor array. If it helps, here is the output sent from the GW1000 in Ecowitt format for the array:
PASSKEY=REDACTED&stationtype=GW1000B_V1.5.7&dateutc=2020-04-27+22:51:24&tempinf=72.5&humidityin=23&baromrelin=24.498&baromabsin=24.498&tempf=79.0&humidity=17&winddir=0&windspeedmph=2.01&windgustmph=3.36&maxdailygust=11.41&solarradiation=363.46&uv=3&rainratein=0.000&eventrainin=0.000&hourlyrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.539&yearlyrainin=2.780&totalrainin=2.780&temp1f=52.34&humidity1=52&temp2f=74.66&humidity2=22&temp3f=71.42&humidity3=26&temp4f=59.36&humidity4=39&temp6f=73.22&humidity6=20&temp7f=51.98&humidity7=54&temp8f=60.08&humidity8=42&soilmoisture3=51&soilmoisture4=39&wh65batt=0&batt1=0&batt2=0&batt3=0&batt4=0&batt6=0&batt7=0&batt8=0&soilbatt3=1.4&soilbatt4=1.4&freq=915M&model=GW1000
This also contains 2 WH51s, 8 WH31s. I do not have a WH32, but the array itself is reporting outdoor temp/humidity.

Let me know what I can do to help.

Gotcha, ok, I hadn't tried that. Still, think it would be nice to treat them as individual devices as you have started to do.

Might take me a couple days (my "honey do" list JUST turned into repainting 2 rooms and completely gutting a 3rd, so I am stuck in planning for those), but I will look into trying to merge this all in.

You guys are really making me wish I had bought a higher-end model that I could add sensors to, but I know it would mostly just be playing on my part. The single-most reason I got a weather station was to be able to know if wind speed was getting too high so I could turn off my wife's inflatables at Christmas. That is all... Just to save me the aggravation of turning them off myself individually, or having to repair them do to wind damage. So anything beyond that is a bonus. :grinning:

Which one do you have @snell? They are pretty cross-compatible and it likely will work with the GW1000 and thus you could also add sensors.

I have an Ambient WS2902A.

Everything I have read says it cannot have additional sensors added. I got it on the cheap a year ago (shortly after I got my Hubitat) and since I was not worried about more from it I did not worry about it being able to do extra sensors at the time. Of course I never figured I would have this much work put into a weather station (or the drivers to read data from them). Not really a "weather" person. :man_shrugging:

I have the exact same sensor array as you. It is compatible with the Ecowitt GW1000 which is very inexpensive. And you can add a lot of sensors to the GW1000. If you have an additional little display with your WS2902, additional sensors won't show up there, but the GW1000 will pull data from that sensor array and all kinds of other additional sensors. I'm not sure if that is what you are looking for, but that is exactly my setup (minus any fixed display). The GW1000 is $36 on Amazon, additional sensors are pretty inexpensive.

Anyway, if you have questions about that setup, let me know, happy to answer.

What?! Ugh. I thought I had read it was not possible at all...

Oh my wasted youth... middle age. :slight_smile:

I also started a MASSIVE rework of the AmbientWeather driver last night. My plan is a complete overhaul, culminating in an AmbientEcowittWeather driver. I was looking it over and realized there have been so many things I have learned (not sure if they are best practices, but whatever) that I felt now would be a good time to do that.

Yup, it's been working great for me. There is one gotcha on the Ecowitt outdoor weather sensor in that it uses the same "channel" as the WS2902A's outdoor temp/humid.

As I understand it most Ambient and all Ecowitt are just branded Fine Offset devices. Or clones, or something like that. Somewhere on one of those weather forums, for dudes more into weather than you and I, there was a nice list of which were which. I cannot find it right now, but this one can lead you to which speak which protocols.

I hope I didn't just unleash the beast in you or your significant other might hunt me down if those rooms don't get taken care of. :running_man:

I think you can also add sensors to the 2902A by getting a WS-2000 Console which will display both the 2902A sensors and additional sensors.

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

Ha! Well... we will see once all my new parts arrive in a couple weeks.

At the very least I will be able to prove myself if the multiple sensors are working then, although I am pretty sure if I release something you folks would let me know quickly.

Youch! That console is pretty darn pricey. I just ordered a bunch of stuff, so we will see how the GW1000 works out.

I'll be interested in the results.

Just don't buy a WH32 as I said, it conflicts with the outdoor temp/humid reading on the WS2902A.

I think you will find the local only capabilities of the GW1000 to be very satisfying.

OK everybody! I have a new driver put together. I ran it through the paces (with what I have at home now), but this is still the first version (0.01). This is a mostly reworked AmbientEcowittWeather.groovy driver! I massively reworked how it checked and posted data which made it a lot shorter and easier to manage.

But the big change... This one supports Child Devices! YES! Based on what @anon81541053 did, I learned something (yet again) and made it so it creates child devices as various sensor data is reported. This DOES require a child device driver... so if you want to use the feature, it is posted as WeatherSensorChild.groovy.

If you want to use the new driver without the child devices, you CAN! They are disabled by default and you do not even need the driver if you do not enable them. If you DO enable them and forgot to load the driver, you will get an error message in your log but everything else should work AS IS! Hoorah!

At this time I am not replacing the AmbientWeather driver... but this one is such an improvement (I think, and I hope you all do too) that it will likely be replaced eventually.

Anyways, please check the new driver out and let me know how you like it.

@snell I gave it a try, and it looks to be working great with the Ecowit GW1000 + other sensors. I will give it a more through look here in a bit.

Ok, after some further analysis:

  • it looks like we are missing the rain total for day, week, month, and year in the Outdoor Station though they show in the parent device
  • The values for humidity seem to be getting messed up starting at Sensor 3 when looking at the child device. The value for humidity on Sensor 3 seems to be coming from the Outdoor Station's humidity when looking at the child device. The humidity value for Sensor 4 seems to be the soil moisture from one of my soilhum4
  • It looks like it is not picking up the soil moisture sensors, which I think is where things start to go sideways.

I have a WS2902A, 8 temp/humidity sensors (WH31), and 2 soil moisture sensors (WH51) which seem to start at offset 3.

Let me know if you need more help. Happy to provide more info.

Here is the parent value for soilhum:

ParentSoilHum3

Here is the parent value for humidity3:
ParentSensor3

Here are the values on Sensor 3

Parent showing the values for Outdoor Station:
ParentOutdoorStation

Child Outdoor Station values:
OutdoorStation

Sorry, a couple more. The Outdoor Sensor does seem to have the wind direction as a number, but not as letters. Probably a future thing. :slight_smile:

On the Ecowitt WH51, I don't think soil has a soiltemp or soilhum, it only reports soilmoisture. If it helps, see the payload I posted above.

@snell If you throw this up on GitHub, I'd be happy to make PRs.

@OpenDave:
Thanks for the feedback! I did not put ALL the respective sensors onto the outdoor station, which is a lot of what you are seeing. As for the soil sensors... I had those working before so it must be an error I made in the new one. I will get those corrected and have a new version posted soon.

I avoid GitHub myself... which is why I reworked my website to be able to allow people to import drivers finally.

UPDATE:
Version 0.02 is now posted. This version should publish EVERY value to their respective child sensor. You will need to upgrade the WeatherSensorChild also, since that had to have additional attributes added to support all of them.
It should also separate out Soil Sensors properly (oops).

@snell Looks like it's all working great. All the sensors are showing up and have the right values. It's even detecting a low batter on one of my sensors. Cool.