Weather/Temp from online source

Thanks @Cobra. I added in lowercase illuminance and humidity in my version. I need those in lowercase for Housepanel. No other changes. Great work!

UPDATE: @Cobra has incorporated my small change into his driver. No need for my version now. Please just use his. Thanks @Cobra!

1 Like

@Matthew
The illuminence and humidity should have been there already!
They are sent by the ‘capabilities’ and should already be in the lowercase format
Did I miss the ‘sendEvents’ for these?

Where did you add your code?

Andy

Hmm... seems it was working for me

Have a look at the screenshot in this post (at the bottom)

Hi…
just spotted illuminence wasn’t there in the screen shot… I will update my code

Andy

I did miss lowercase humidity (it was there in your code). However, the sendEvent for lowercase illuminance is not. If you want to add that, I have no other changes. Thanks! Appreciate your work.

@Matthew
I have added the sendEvent for illuminence and added a lowercase ‘city’ which someone else asked me about.

Now version: 1.7.2

Andy

Excellent. Thank you. No need for my version now.

1 Like

FYI
Just uploaded version 1.8.0

Andy

1 Like

Is anybody else finding that the data is not being updated every 5 minutes. Mine is occasionally missing an update.

I use 10 minutes and I have not noticed it missing any updates.

I have left it the default of 5. May extend and see what happens.

Guys
I have just uploaded Version: 1.9.0
This has a couple of bug fixes and now has a couple of new attributes ‘Chance of Rain’ & ‘percentPrecip’

Andy

1 Like

I was not getting the Humidity (either upper or lower case) values to show in several dashboards (HousePanel and SmartTiles). Those dashboards show the humidity value as ‘null.’ In looking at examples that did work, it appeared that the humidity being reported by the driver was just the number and did not include the ‘%’ symbol. I altered the driver on lines 163 and 212 to the following:

sendEvent(name: "humidity", value: resp1.data.current_observation.relative_humidity.replaceFirst("%", "")) //, unit: "%")

That just removes the “%” symbol that is included in WeatherUnderground’s relative_humidity attribute. With that change my dashboards now are showing the humidity correctly.

I don’t know if this is unique to my use case or if it should be changed for other’s general use, but thought I would report on what I found.

Thanks.

@Matthew
Were you gettin a double % sign? (e.g. 60%%) or was it just not showing at all

Andy

They both just showed ‘%’ with no number. Those dashboards (HousePanel and SmartTiles) apparently need just the number and they add their own ‘%’ symbol as they both show correctly now (a number with a single ‘%’ at the end) after I removed the ‘%’ from the driver result.

2 Likes

@Matthew
Good find- thanks for that
I have the same issue with this on another thread.
I’ll make the same change to the lowercase setting (I use the uppercase one as my app does not add the %

Thanks again

Andy

Yes, the way it is supposed to work is the value should be a number and then a separate “units” setting for “F” or “C” or “%” would get passed to the device event state

That way when retrieving the attribute, you get {value:“58”, unit: “%”}

but most just put the unit in the value… Or override the unit (or ignore it)

2 Likes

I have realised that I can store Illuminance into a variable which means I do not have to define lots of Virtual switches for light levels.
Here is a piston I use to do it.

is there a way to get the actual high and low temps since midnight, rather than just the forecasted high and low?

@bravenel - Any discussions about RM custom commands from weather drivers? For example, I can user @Cobra 's Weather Switch app to pull from a weather driver to trigger a virtual switch, to then trigger a RM rule for TTS to get the condition, but very restrictive and a lot of components for that one action. If we could create Custom Commands to poll any weather driver, and then use the result for TTS or notifications, it would really simplify things.

Download the Hubitat app