Weather/Temp from online source

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.

No. What custom commands are you referring to? If you pull up a weather device in Custom Commands, all of its commands are exposed. So you can send any command to it you want. You can create a custom command to poll the weather device. But, there's no way to use the results of that command in some other RM action. Nor are there any plans to add such a feature. What you are describing is way beyond current capabilities of RM.

Have you heard of Groovy?

@SmartHomePrimer
When I get some time, I was thinking to add tts to weather switch as I do something similar with two stages

@bravenel
Bruce I think @SmartHomePrimer actually means custom attributes which a lot of the weather drivers present (like ‘rainTomorrow’ or ‘inside_temperature’)

Andy

1 Like

There is no plan to do custom attributes in Rule Machine.

Thanks Andy. Yes, that is along my thought lines. Glad you are bilingual :wink:

1 Like

I’l start looking at tts this next week when I can.
It will be a bit basic at first - let me know which output you want to use and I’ll get you to test it

Andy

That's wonderful Andy.

Forecast conditions, rain today, rain tomorrow, wind speed, wind gust, temperature feels like, and since this is TTS, not activation of switch, current conditions would be relevant.

Essentially, I'm looking for a future scenario where a source like WU might not be an option, and Alexa skills like Keven Key's Personal Weather (which relies on WU) likely won't be an option any longer due to the inability to get a dev key without paying a fee, so I would be getting conditions from Weewx. Here's what Personal Weather can provide today.

Current Conditions:
"current conditions",
"everything",
"conditions",
"current",
"current reading",
"readings",
"reading",
"now",
"report",
"the current conditions"

Dew Point:
"dew point",
"dewpoint",
"the dew point",
"what is the dew point"

Heat Index:
"heat index",
"the heat index",
"what is the heat index"

Humidity:
"humidity",
"how humid is it",
"the humidity",
"how humid it is",
"check the humidity",
"check humidity",
"what is the humidity",
"how dry is it"

Pressure:
"pressure",
"the pressure",
"what is the pressure",
"is the pressure rising",
"is the pressure falling"

Rain:
"rain",
"precipitation",
"the rain",
"how much rain",
"rainfall",
"how much has it rained",
"rainfall amount"

Temperatue:
"temperature",
"how hot is it",
"how cold is it",
"how hot is it outside",
"how cold is it outside",
"the temperature",
"how hot it is",
"how cold it is",
"check temperature",
"check the temperature",
"what is the temperature",
"is it hot",
"is it cold"

Wind:
"wind",
"how fast is the wind",
"what is the wind speed",
"the wind speed",
"the current wind speed",
"current wind speed",
"check wind speed",
"is it calm",
"is it windy"

Wind Chill:
"wind chill",
"the wind chill"

Forecast:
"forecast",
"weather forecast",
"weather be like",
"how hot will it be",
"how cold will it be",
"what will the weather be like",
"what is the forecast",
"the forecast",
"get forecast",
"tell me the forecast"

@SmartHomePrimer
That’s a little ambitious for a little program like weather switch

I had no intention of going this far for WS.
I was just thinking of using the current triggers to be able to say a phrase (obviously less than 128 characters) with, eventually, maybe, variables for some of the values

For example, I would have WS say ‘UV is very high so please be careful in the sun’ when WS reports that the attribute ‘uvHarm = high’

At the moment WS turns on a switch when uvharm is high
This switch then triggers the message

By adding TTS to WS it would just remove the need for a virtual switch and ‘speak’ directly

Andy

Sorry. To be clear, I’m after the same thing, but hopeful that at some point, a value could accompany the TTS. So if a trigger was that a value was above or below as it is now, a virtual switch could also trigger an attribute to be spoken, along with its value. Is that more than you would ever want for Weather Switch?

That’s pretty much in line with my thinking.

If a threshold is reached then trigger the tts and include the value in the speech.

E.g
I set wind to warn me above 30mph.
Weather driver reports 35mph.

In my tts ‘input’ I write:

“Warning, wind is currently %triggerValue%”

HE says: “Warning, wind is currently 35mph”

This is how I see it working (when I get around to coding it)

Andy

2 Likes

WeatherUnderground is no longer allowing free API access; no new API keys, and discontinuing existing free API keys sometime next year. Has anyone found an alternative?

@mbishop try apixu?

1 Like