[PROJECT] Driver for Ambient API/Local and Ecowitt

I wish my weather station was capable of adding more sensors like the pool one, but the pool sensor can only link with 2 types of stations I think and I do not want to add a second station just for that. I think that is a bit of an oversight by Ambient (not allowing pretty much every sensor to link with stations that allow added sensors) but they must have had a reason.

No plans on my part to make an app to integrate with this. I surprised myself by being able to make a driver that seems to be working pretty well.

1 Like

Your assistance with Rules Machine got me where I needed to be. Thanks so much.

I agree with your point. But I think AW is coming to that conclusion and getting there slow but sure.
If you get the creative itch in the future check out the link I sent you. You could take your work in whole new direction.

Thanks again,

Lj

Oh by the way, you don’t need to add a complete weather station to use these sensors. The pool sensor and panel I listed above come as a package. The panel communicates with Ambient weather like a station. Then the other sensors are add-on units. Up to 7 of them. At the price it is not expensive. Look at their site.

@ljp-hubitat:
Totally agree it is not an expensive package for those, and you do not need the whole "outdoor wind/rain/etc..." package, but the panel is what is actually the "weather station". The rest of it (in my case the thing on the pole, yours it is the various ones) are the sensors reporting to the station. The station itself usually has sensors also (indoor temperature and humidity in my case).

Buying another station might push the WAF since I bought the Ambient even though I already have an Acurite system, so I am sure I would have to hear "what is this 3rd one..."

As for expanding on it... I do not want to copy someone else's ideas since they did their own thing and deserve credit for it. If I do make something I will try to do it mostly myself and give credit where I did use other's ideas (like @Cobra's idea for checking driver versions).

@snell Have you been noticing what appears to be problems on the Ambient Weather side maybe with their servers here recently? About the last week or so I've been getting the following errors, then it self corrects itself, then later on the come back all completely random.

I also notice that on my Ambient Weather Dashboard the update time which used to be no more than 2 minute intervals takes forever like this screenshot of 39 minutes.

Have you noticed similar issues?

I think it’s a cloud issue. I have not been looking for errors on HE, but I just tried updating my Ambient Weather app, but it won’t update. Last was an hour ago.

1 Like

That appears on their side, but I do not monitor mine enough to have noticed. I will have to check my logs. Maybe they have a notice on their site? I will try to remember to check tonight.

Ambient is migrating their database to a different server today.

3 Likes

Thanks, I figured something had to be going on.

1 Like

I am getting numeric format errors in Hubitat's log file, possibly from the single rule I entered in Simple Lighting to check luminance and turn off a light if luminance is greater than 600. No code expert here, but it looks like some other drivers output luminance (lux) as a long rather than float:

app:1962019-12-02 07:23:45.488 am errorjava.lang.NumberFormatException: For input string: "434.581" on line 426 (luxHandler)

app:1962019-12-02 07:18:45.542 am errorjava.lang.NumberFormatException: For input string: "263.536" on line 426 (luxHandler)

app:1962019-12-02 07:13:45.621 am errorjava.lang.NumberFormatException: For input string: "154.574" on line 426 (luxHandler)

app:1962019-12-02 07:08:45.763 am errorjava.lang.NumberFormatException: For input string: "45.612" on line 426 (luxHandler)

app:1962019-12-02 07:03:45.619 am errorjava.lang.NumberFormatException: For input string: "0.0" on line 426 (luxHandler)

I will have to take a look at this tonight. The illuminancemeasurement capability just documents it as NUMBER.

1 Like

I don't know nothing about code but my station using the driver outputs a number with a decimal if that makes any difference.

dec

Is the sun shining on it? Just curious.

Same here. I don’t really know much about what external Lux values should be. My station doesn’t report lux, but my Hue outdoor motion sensor is picking up 3988 Lux right now, on an overcast day, with snow reflecting the light outside.

Ambient Weather does not provide lux from their API only solarradiation which is in w/m2. The app/driver must convert this to lux value and it should be an integer not decimal to work with the hubitat illuminancemeasurement.

1 Like

It should if you go into your Ambient Weather Dashboard Unit settings and change the default.

No, I mean the model I have has no equipment for reporting light valve.

Ahh, I see

So I was just wondering is yours in bright sunlight with that reading?

Yes it's currently in direct sunlight at the moment.

This is what my hue outdoor is reporting but it's not as much in "direct" sunlight as the PWS is.

hue

1 Like

Just an FYI - some report Lux in full value and some report the divided value.

Lots of devices report the lux range up to 200,000 with a common max being 100,000 for direct full sunlight. Depending on the device, driver, implementation this is then divided by 1000 for visual representation or space saving on weather display consoles and human consumption depending on units.

2 Likes