[UPDATED] - Weather Switch - Turn on a switch in response to weather

I suspect that Smarttiles is querying the driverā€¦

The sendevents are needed for WS to ā€˜subscribeā€™ to the events (and therefore act upon them)
Do you have duplicate entries on the ā€˜deviceā€™ page now?

Andy

That would explain it. I learn something new every day. Here's a screen shot. And, point-of-fact, the SmartTiles are reading the lower case temperature which isn't accurate.

Back to the drawing board.

As you donā€™t have the sendEvent statements for the lower case info, it wonā€™t update correctly (if at all)
What you are seeing is probably legacy data

If you donā€™t mind the duplicate entries then I can probably get this to work for SmartTiles as well as WS

Itā€™s 1am in the UK now so Iā€™ll have a look tomorrow for you.

Andy

Get some sleep! This is a fantastic app and Iā€™m so happy you wrote it. I think there are really only 4 items that need a bit of nudging:

weather
temperature
humidity
feelslike

I need to step off and get some food and grog. Iā€™ll take a swing at it a bit later (Iā€™m -8 hours from you). I was just focusing on the driver. Now that Iā€™ve taken a bit of a look at the child-class code, it doesnā€™t seem insurmountable.

I am working on the driver and app anyway tomorrow
Iā€™m going to try to get the driver to compile a sort of ā€œreportā€ so I can get WS to send via SMS or pushover (until we have TTS then Iā€™ll get Sonos to speak it)
I canā€™t use the built in report (fcctext or fcctext_metric) because I prefer to use a mixture of imperial and metric
In WS I plan to trigger the report with a virtual momentary switch so I can get it any time.

Andy

@homeauto2112
I had a 'play' this morning...

I have added the following lowercase attributes and events

  • feelsLike
  • humidity
  • temperature
  • weather
  • weatherIcon

See how this works for you :slight_smile:

WeatherUndergroundCustomLowercase.groovy

https://github.com/CobraVmax/Hubitat/tree/master/Drivers/Weather

If there is anything still missing, please let me know (and if it works OK or not)

Andy

You should now get something like this:

Ok
New version released on GitHub (link above)

The driver now creates a 'summary report' of the data collected.
You can select how to format it (imperial/metric etc)

I'm intending to use this with a new release of Weather Switch to SMS or use PushOver to send this report
For this version I have included the lowercase attributes

Let me know what you think and how you get on.

Andy

Good Afternoon!!

I loaded the new driver (with lowercase in the title) and the WS app is working find. Here's the view of the summary though I have to force a poll to get it on the page:

Here is the weather tile:

45%20AM

I added in an - attribute "city", "string" to pull the city:

47%20AM

I'm getting called into work early so I don't have time to hunt down by the percentPrecip nor the humidity are showing up. I'll give it a look over when I get back though.

Everything is looking pretty solid so far!

1 Like

If you are using station id: KCALOSAN362
Then I canā€™t see that it reports percentPrecip
I loaded this station into my driver and did a search for it but could not find it

Humidity is being reported from the capability so that should be the same as previuosly

Andy

I think we are both dancing around the same head of a pin. In that SmartTile, the info use to be there. This whole experience now leads me to question whether it was accurate which links to your point about my station. The perecentPrecip is a forecast and wouldnā€™t be provided by the weather station. So how it use to get it from the default or older driver I was using (which I lost in all of this shuffle), is still a mystery to me.

As far as Iā€™m concerned your app is spot on and works for me. The SmartTile is more of a distraction with an app that isnā€™t being updated so itā€™s more of a curiosity to me. Iā€™m sure thereā€™s an easy answer to it.

Iā€™ve added the ā€˜cityā€™ attribute and sendEvent so that should work ok now.
Iā€™ve also marked a couple of things to refresh when polled - they were not refreshing correctly before

Latest Driver version: 1.8.0

Andy

@homeauto2112

Okā€¦ I think I got it!
we were looking for the wrong data name - Itā€™s not percentPrecip but ā€˜popā€™ (Probability of Precipitation)

Also I found a bug with the summary so it should show correctly now without having to poll

Have a look at version 1.9.0 on GitHub

This now has an attribute & sendEvent for ā€˜percentPrecipā€™ as requested :slight_smile:

I have also uploaded a new version of the app which can use ā€˜Chance Of Rainā€™ as a trigger

Andy

Good afternoon!

Just got up and will try the drive as soon as the coffee is brewed. The ā€œpercentPrecipā€ came directly from the code in SmartTiles. At this point (without having tried the 1.9.0 driver), the WS app works and most of the SmartTiles code works as well. For some odd reason, the humidity isnā€™t reporting correctly and I didnā€™t have any time yesterday to look into it.

Coffee is done and trying the new driver now.

Okay, the driver looks good. App is responding as it should. I forgot to post this earlier, but I receive the following error when I select the "poll"

This error seems to occur whether the auto poll is on or off.

BTW: Iā€™m really enjoying the illuminance!

I started to play with the HU dashboard and here's a screenshot. Not sure why the humidity is showing a double % sign.

For Cobra's driver are you using the attributes option when setting up the tile? I was first just using the Humidity and was getting the double % like yours is showing. I also noticed that the value was wrong. Started digging around and found the attribute option and all is good now.

HE-weathertile-options

Hope this helps.

Thatā€™s a nice find!!

Iā€™ve noticed the values were wrong too, but Iā€™m also seeing that it may be due to the differing refresh times. If there are two ā€œdevicesā€ with refresh commands timers and cacheing, there will be some differences. If I refresh both the WU and the dashboard, then I get a correct entry. Now sometimes I have to refresh a few times to sync things.

1 Like

Guys
Iā€™ve 'tweakedā€™ the driver to try and get rid of the double percentage
Not sure if it will work
If it doesnā€™t please let me know and Iā€™ll look again

Uploaded new files to github (same version number)

Andy