[UPDATED] - Message Central - Make your home speak

community_app

#163

@Cobra

Andy - any update on adding weather alerts?

Love your app btw. Probably the #2 app used in the house outside of RM. I am just listening to the severe weather outside while typing this.


#164

Feature request:

I’d like to have arrival and departure notifications, but it drives me nuts when my wife and I leave together and then my phone informs me that she has left. That’s not a useful notification, I already know we’ve left. What I would like is to have a notification only when not leaving together.

I had this set up in webCoRE on smartthings (and briefly hubitat before I nixed webCoRE) but I have not been able to replicate this with the built in hubitat apps. The way I had it working before was that if someone’s presence changed, it would then wait for about 60 seconds and check to see if the other person’s presence changed. If they both changed within that minute, it would not send a message. If only one person’s presence changed, it would send the message (and I had it send different messages if the other person was home or away).

This worked surprisingly well. 60 seconds seemed to be the sweet spot to eliminate false positives, but short enough that after my wife triggered it, it would finally send right around the time she pulled in the driveway.

I don’t know if this app or your presence app would be a better place for this idea, but I’d love to have this function back.

Thanks


#165

Version 12.3.0 uploaded now

%Alert% variable added
This takes alerts from a weather device (such as weather Underground) and allows you to insert it into the message

Weather Switch has switching on the alerts now too

Andy


#166

Probably Presence Central is the place for this.

The presence notification in MC was only really an afterthought :slight_smile:
For aggregation etc PC works much better and was what it was designed for
If you post your request in the Presence Central thread we can discuss it there.

Andy


#167

You could, of course, use the restrictions in Message Central to only allow messages when your wife leaves and you are present.


#168

Has anyone had luck getting MC to play mp3s?


#169

Right. That works if I’m staying. But if we leave together, my phone may exit the radius a few seconds before her and then I’ll get the message. Hence the 60 second delay.

The delay is to make up for the imperfect accuracy of the presence sensors.

Edit: didn’t scroll up far enough. I’ll copy discussion to the other thread.


#171

Can you give me step-by-step on how to accomplish this? I am confused on getting weather alert notifications to speak throughout the house. Truly appreciate the help!


#172

A weather device such as Weather Underground will normally have an attribute ‘alert’
If this is configured with MC then when the alert is received it will store it as a variable.
This means when you trigger a message (perhaps with a switch or time) and the message contains the %alert% variable it will replace %alert% with the actual alert.

Obviously the first thing you need is a device capable of generating the ‘alert’

Andy


#173

To configure in Message Central...

Start by creating a new child app

1st select the message type (voice?)
Then after selecting the speaker and a few other things like volume, select the trigger
In this case I’ve selected ‘time’ and set the time to trigger.
Configure a message including the %alart% variable
Then click next.

Next, select your weather device (in my case, ‘weewx weather’)
Then click next..

The next page is where you can configure any restrictions.
After configuring click next.

Name you app then click done.

Andy


#174

So my goal is that when a weather alert occurs it just announces at anytime of the day through all my speakers. So thinking about that what trigger would I use? Still time?


#175

There might be a problem with that.
For this to trigger whenever there is an alert, I would need to write a new trigger.
If I create a weather alert trigger, this would mean that whenever the attribute was updated, it would announce the alert.
Even if the attribute was only set to ‘no alert’
The only thing I can think of is to create a new trigger and restrict it so that if the alert contains ‘no alert’ or something similar then ignore it.
If I was writing it for my ‘weewx weather driver’ I would match “no current weather alerts’
But different drivers may say different things.

Which weather device are you using?

Andy


#176

Do you mean upon 'update', or upon a change in value? My driver's alert value 'updates' on the user selected time (I use 5 minutes). I would not want to hear the alert announced every five minutes when that is updated. I would want to hear an announcement if the 'alert' value changes from it's previous value, even if that value changes to 'no alert'.


#177

@Matthew
I’m not sure what your driver does but mine both send attributes on each update from the pws or wu.


#178

What does your driver send when there are no alerts?


#179

When there are no alerts my 'alert' attribute is populated with 'No current weather alerts for this area.'


#180

To create a new trigger, I would have to exclude multiple values.


#181

I appreciate the difficulty in attempting to accommodate all the various drivers that could exist out there. My driver could be altered to conform to your trigger design requirements, and other driver designers would have to accommodate in the same way.

The point I was emphasizing was that the trigger should not be upon 'update' of the attribute, but upon a change in the value of the attribute. My driver checks Weather Underground every five minutes and updates all the attributes in the driver. The 'alert' driver is included in that update, but it very rarely actually changes in value. I would hope your trigger would fire upon a change in value of the attribute, so I would get a message only upon a change of the 'alert' attribute', instead of the 'update' of the attribute, which in most cases would just send a message that there are 'no alerts' every five minutes.

I have no idea if that is easy or hard .... but if it could be done then you would not have to accommodate the various drivers using an identical 'no alert' message because you could allow whatever their 'no alert' message is to announce and it would only do so once when the alert value changed to 'no alert'. Make sense?


#182

I have been playing around with Message Central today to see if I like it. It works great with the time / date variables, but I havent been able to get it to speak any of the weather variables. In fact, if I link it to my Cobra WeatherUnderground driver, it doesn't speak anything and I get an error in the log, even if I don't use a variable Ex: %temp%. @Cobra could you please help me figure out what I am doing wrong?

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.207:errorjava.lang.IllegalArgumentException: Command 'poll' is not supported by device. on line 3077 (talkSwitch)

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.204:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - compileMsg - msg = %greeting%. It is %time% on %day% %date%.. I hope you have a wonderful day! %temp%

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.187:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Calling.. CompileMsg

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.181:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Continue... Check delay...

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.179:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - state.appgo = true - state.timeOK = true - state.dayCheck = true - state.timer1 = true - state.timer2 = true - state.volume = 40 state.presenceRestriction = true

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.176:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Presence sensor 2 restriction not used

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.166:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - running checkPresence1 - restrictPresenceSensor1 = null

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.152:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Calling.. CheckPresence1

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.148:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Presence sensor restriction not used

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.146:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - running checkPresence - restrictPresenceSensor = null

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.144:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Calling.. CheckPresence

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.140:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Day restrictions have not been configured - Continue...

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.138:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Calling.. CheckDay

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.130:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Time restrictions have not been configured - Continue...

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.127:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Calling.. CheckTime

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.125:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Calling.. talkSwitch

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.122:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Mode = true

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:14.110:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Checking mode...

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:13.953:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Speaker(s) in use: [Kitchen Sonos, Office Sonos] set at: 40% - waiting 0 seconds before continuing...

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:13.780:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Virtual morning message is on

[app:2246](http://192.168.1.38/logs#app2246)2018-10-12 15:11:13.777:debugMORNING_MESSAGE (Childapp Version: 12.3.1) - Switch - Voice Message - Virtual morning message

I just through %temp% on the end of the working message to see if it would work. Once I add Weather Underground, I get no TTS from this.


#183

A small request.

What do you guys think about getting status update from Message Central? I would like to have an option to select from a list of lights, locks, doors and have Message Central notify me via speaker which lights, locks or doors are on/opened.