[PROJECT] Driver for Ambient API/Local and Ecowitt

This is not listed under USER types. Just AmbientWeather and WeatherSensorChild

@snell OK, I copied the drivers from your links above and recreated them and deleted the old drivers I had. Now there is a child device option!! They are coming in great. Sorry for the doh moment.

@snell I do have one other question. I went in to create an event for the WH51. In actions I selected custom attribute and picked the WH51 from the list. In the attribute dropdown it still has all the attributes from the pws instead of the WH51. Is that correct?

If you are using one of the "standard" attributes like temperature, humidity, pressure, or whatnot, you can select the standard attribute without it being a custom one (this is one of the benefits of the child devices).

Unfortunately, the custom attribute list is based on the attributes provided by the driver NOT by which ones the device is actually using (or had sent an event for). There is no way to dynamically select attributes in the driver/for the device (it is a part of the design of Hubitat), so I cannot correct for this as I had to make sure the main driver and the child driver supported every possible attribute that every sensor could report. The "proper" method of a whole bunch of individual child drivers (one for EACH sensor type) would be excessive for me and difficult for people to use.

Understood. I will not use the custom attribute and select from the standard list. Thanks

Don't get me wrong... you can use the Custom Attribute if you want... it just is a long list and easier to make mistakes with. If it is something simple like temperature or humidity, or what not I would recommend the "normal" attributes.

I understand. I will use the standard unless the custom ones are needed. Great Driver BTW. Been waiting for a way to do this so now the WAF factor is good.

1 Like

Got my GW1000, PM2.5, and a soil sensor today. Initial setup went smoothly and all the basics are working. I think I might edit the comments in the next rev of the AmbientEcowittWeather driver to spell out the setup instructions a bit so people do not need to hunt through this thread, but overall it was not too bad.

It has highlighted one thing though... I need to come up with a different naming scheme for the child sensors in this driver. I had a lot of changes I wanted to make in this one anyways so now I have something else to do in the next few evenings.

Ok, the child naming problem should now be cleared up. You can remove the existing child devices if you want, new devices will be automatically generated. I apologize for the problem this might cause for any current work you already made using the names, but it was needed to make sure that names going forward were unique.

Version 0.04 is now posted as well as an updated WeatherSensorChild (0.05).

@snell Any progress on the battery status for the WH31B's? Reading 0 on both CH1 and CH2.

Also doesn't the GW1000 have a barometric value along with the temp and humidity?

I am on the latest version for both drivers. Versions are different below.

Also I have this for the CH2 WH31B.

State Variables

  • Version : 0.02
  • temperature : 75.2
  • Driver : WeatherSensorChild
  • humidity : 36
  • battery : 0

And this for the CH1 WH31B.

State Variables

  • Version : 0.05
  • temperature : 75.2
  • Driver : WeatherSensorChild
  • humidity : 37
  • battery : 0

Can you enable debug logging and send me a shot of that, at least any lines where the batteries are being reported?

I will check into the barometric sensor. The GW1000 does have one but my bet is the value it is returning is getting overwritten by the outdoor sensor, as I do not have a specific separate data point for it.

Now that I have my own GW1000, I am noting some changes I need to start working on to try to make things better for those owners without muddling things for the existing Ambient API users.

I'm a happy Ambient Weather 2902A user and use the API driver provided by Mr. Snell to tie it into my Hubitat Elevation for home automation tasks. As a point of interest, how are you using the GW1000 and associated sensors? How do you tie them to the 2902A and where is the GW1000 located?

Having just gotten a GW1000... It was remarkably easy.

  1. Installed their app "WS View" onto my smartphone.
  2. Plugged in the GW1000 to a USB power supply.
  3. Added the GW1000 "Configure New Device", then select the GW1000 image, then follow through the process which includes getting it on your Wi-Fi.

From there, you can check the live data in the app. The GW1000 will automatically recognize the signals from the WS2902A and does not interfere with it's normal reporting to it's display/station. You can also check the status of additional sensors you might also add (I added a PM2.5 and a soil sensor just to try them out).

Here you go. Both State variables now read .05 for version. Don't know how CH2 changed from .02 to .05 by itself but who knows.

dev:32532020-05-07 07:23:21.929 am debugAmbient/Ecowitt Parent - WH31B Sensor CH1 - state.temperature = 70.52�F

dev:32532020-05-07 07:23:21.875 am debugAmbient/Ecowitt Parent - WH31B Sensor CH1 - state.humidity = 39%

dev:32532020-05-07 07:19:13.877 am debugAmbient/Ecowitt Parent - WH31B Sensor CH1 - state.battery = 0

dev:32532020-05-07 07:19:13.852 am debugAmbient/Ecowitt Parent - WH31B Sensor CH1 - state.temperature = 70.34�F

dev:32532020-05-07 07:19:13.824 am debugAmbient/Ecowitt Parent - WH31B Sensor CH1 - state.humidity = 38%

dev:32532020-05-07 07:18:47.974 am infoAmbient/Ecowitt Parent - WH31B Sensor CH1 - Updated

dev:32532020-05-07 07:18:47.972 am infoAmbient/Ecowitt Parent - WH31B Sensor CH1 - State variables cleared

dev:32542020-05-07 07:20:15.809 am debugAmbient/Ecowitt Parent - WH31B Sensor CH2 - state.battery = 0

dev:32542020-05-07 07:20:15.782 am debugAmbient/Ecowitt Parent - WH31B Sensor CH2 - state.temperature = 70.34�F

dev:32542020-05-07 07:20:15.757 am debugAmbient/Ecowitt Parent - WH31B Sensor CH2 - state.humidity = 38%

dev:32542020-05-07 07:20:05.629 am infoAmbient/Ecowitt Parent - WH31B Sensor CH2 - Updated

dev:32542020-05-07 07:20:05.628 am infoAmbient/Ecowitt Parent - WH31B Sensor CH2 - State variables cleared

For the battery... it did not help much. The debug shows they are getting the value of 0 passed to them, so that is what they show. I will try changing the variable type on mine and see what it comes back with and maybe I can find out what is going on.

It corrected the Version because it updated when you cleared the states. My drivers generally set their Version when refreshed or updated. With the WeatherSensorChild both of those scenarios are unlikely. So I may have to come up with something new.

I am trying to rework my whole versioning method anyways. @anon81541053 has given me a lot to think about with his programming expertise... and getting the versions is an easy way to start with some of the changes.

@snell Any chance you would be interested in adding the WH57? It is a lightning detector.

http://www.ecowitt.com/wifi_weather/143.html

You are EVIIILLL... :laughing:

When I checked, the GW1000 was on sale for $35 so of course I ordered one and an indoor sensor. Thankfully I'm not keeping track of how much I spend on this stuff!

@snell Are you taking the readings directly from the GW1000 device or do you also have to poll an API server for them? I'm still getting sporadic errors from the Ambient Weather net API and would love to be able to get direct readings without going to an API server.

The GW1000 can directly send the values to the Hubitat, which will pass them to the device. Then the driver can process them. When set for Ecowitt Local mode it does not even try to reach the Ambient API and you no longer even need the key.