@KurtSanders I have a couple of items related to the STAmbientWeather app/drivers.
Currently I am seeing the following error after updating my settings via the Ambient app. Does this mean I should remove/re-add the app or is there another way to fix the issue?
I am using the temperature value from the Ambient Weather Station device in Rule Machine, and the rules are failing with the following error. Is it possible to get this value represented as a number vs a string?
@mjarends That debug error message appears to be related to the loss of a previous Ambient Weather Station (AWS) device that is now missing. Not sure how that happened unless one manually {accidentally} deleted that AWS device, or some mysterious other adverse event.
Here are some choices that I can recommend:
Go into the AWS app on Hubitat and click through the screens and see if the AWS app can regenerate that missing device and check/verify all the others.
If that does not work to regenerate the AWS devices, you can reinstall the AWS after removing the existing AWS app. However, if you have Rules/Webcore that reference those AWS devices, they will be broken. If you want to try to preserve all the Rules/Webcore's, there is a means, but it is more steps. As I remember:
Create a virtual device with the AWS device driver for each AWS device you have. This will create dummy/empty devices that we can have Rules/Webcore reference while you remove/reinstall AWS.
Use the Hubitat Settings/Swap Apps Device to swap each AWS device with the virtual ones you created above.
Remove/Reinstall AWS using your Ambient API key
Verify AWS is working as expected by inspecting the created AWS devices and checking the debug logs for any abnormal errors.
Use the Hubitat Settings/Swap Apps Device to swap back each virtual AWS device with the real AWS devices you just created.
Lastly, the value for the hubitat defined standard device named temperature value is numeric. Are you referencing the temperature value in your Rule/Webcore? The other dynamic attribute fields associated with temp* are indeed string values for using in dashboards, extended decimal output, etc.
I do not see that attribute statement in the current version (6.0.0) of AWS devices installed using HPM. Here is what I show in the device drivers for AWS version 6.0.0 which coerce the capability for "Temperature Measurement" device to numeric for applications to use (See documentation below).
In my installation of AWS version 6.0.0. via HPM, Rule (Version 5.1.4 (12/9/2022) does not seem to throw an error when I create a new Rule as I show below:
Are you using the latest version of AWS version 6.0.0 and Hubitat Rule (Version 5.1.4 (12/9/2022) ? You are the first to report/see such an error with using temperature as a value for comparison. Many people are using this Hubitat version of AWS app for many years and I'm confident that I would have been reported this error.
Check and see what is happening in your instance of Rules if you wouldn't mind!
I had that same issue and had to create another rule to convert the temperature to a number for the rules to work. What is odd is that it worked fine until one day it just didn’t.
Also I believe I figured out what the missing sensor was from my first post. It was the indoor sensor and I may have removed that device at some point after I had initially installed the app. Recreating the app resolved the issue.
Line 110 in the AWS driver is setting the temperature attribute to a string. If that line were deleted, then just having the capability would default to setting that attribute as a number. Since the attribute is explicitly defined, it's overwriting the default attribute type.
Ok, @anon47916022 thank you for brining that line 110 to my attention. I Was viewing the source on my phone at the time and did not see it.
I now see that line 110 in the AWS driver on my Mac and remember why I had to re-define temperature as a String. It was way back in the day when this app was originally developed for SmartThings (ugh) which had weird quirks for rounding/truncating extended precision numeric values. It impacted WebCore for users requesting it not round/truncate the values reported from AWS API.
Line 87 in AWS device driver documented this "attribute" section as:
"Numeric values from Ambient API are rounded to 0.1 if 0 < X < 0.1 because SmartThings Tiles cannot display values less than 0.1 and greater than zero"
I'm still not sure why my test Hubitat Rule works as I posted above with that line 110 in the driver (maybe because I did not have a trigger" and fails in yours and @mjarends.
But I agree, those lines might NOT to be in there for both temperature and humidity capabilities since Hubitat might handle extended precision numerics better that ST ever did for their standard capabilities.
I will comment out those lines in version 6.0.1 and post in HPM for @mjarends and others to update. Updated now in HPM!
@KurtSanders Great driver! Thank you very much. Hadn't had my weather station in HE for a long time, and the praises of others prompted me to try your driver this time around.
We hadn't had any rain since I re-installed the station, and one thing that caught me off-guard was that the driver reported Wet when it rained. We were out and I got an HSM notification that my home's water valve had been closed due to a leak detected by my weather station (because I was using the option "Use every water sensor" in HSM).
Thankfully this didn't disrupt our tenant, and I simply commented out capability "WaterSensor" in the driver, but I'm fairly certain this isn't an expected result from the driver when no Ambient Weather leak detector is in use
If it's helpful information, my station in an older WS-0900-IP that used the Observer IP gateway with firmware 4.5.8 (last version compatible with my station).
@SmartHomePrimer Thank for the compliments and glad it helps you with your home automations .
The fix for HSM is to check only the water sensors that should be monitored for a "leak". I also have several leak detector sensors in the utility room and basement that I only have HSM monitor and shut-off the water main when a HSM monitored sensor detects a leak. The default for HSM is use ALL water sensors and the Ambient Weather Station uses that sensor capability for automation of devices, like an outside rollout shade to close when "rain" is detected, etc.
I recommend that you also verify the HSM motion sensors that you want HSM alerts for within
¹ It is STRONGLY recommended that one specifically designate the "motion sensors" and/or “leak detectors” in one’s HSM app to be notified rather than use the “Use every Motion or Moisture sensor” to avoid false alarms from your Ambient Weather Station which uses these standard capabilities for weather conditions.
Understood. I don't use HSM for anything other than leak detection, but that's good advice for others. It might be helpful to add a switch that a user would need to select if they have an Ambient Weather WH31LA Leak Detector for model WS-1965, WS-2000 and WS-5000 weather stations, since this is an unintentional side affect for any Ambient Weather station, except for one with a leak detector in the above model range. This is why I was caught off guard by my weather station reporting a leak
For me personally, it's fine. I know I could select individual water sensors, but I'd rather my weather station doesn't report a capability it doesn't have, so I'll just keep the driver capability commented out.
What do I comment out in the driver to prevent my sensors from sending anything other than temp and humidity?I'm getting excessive events alerts and tried commenting out lots of stuff but it didn't work
I don't have any recommendations to provide one for commenting out code, but one can increase the threshold for alert warmings in each of the AWS devices that it creates. Those default alert levels are low for this type of application. Hope this helps if not, there is another AWS application that might be better suited for what you desire.