[UPDATED] - Message Central - Make your home speak

The ā€˜voiceā€™ option uses musicPlayer not speechSynthesis which it why the device would not be available to select.

Iā€™m sorry Mark but for me to make speechSynth work for voice would be a major rewrite which I donā€™t have time for at the moment.
I would have to rewrite the output from every trigger.

Andy

Got ya, well the pushover method appears to work for me, so that's fine. Just didn't know if this was something I was doing wrong. Thanks!

Iā€™m not sure if the variables work with the pushover section... (canā€™t remember without checking the code) probably, but if it doesnā€™t that shouldnā€™t be too difficult to implement.
I just have to call my ā€˜compileā€™ routine before sending

Andy

Yes, the variables do work with the pushover method, I'm using them.

1 Like

Oh!
Ok, I must have implemented it then :slight_smile:

I couldnā€™t remember, I wrote the original on ST a long time ago :slight_smile:

I just had a quick look at the code and yes Iā€™m using speechSynthesis for the PushOver option.

@ogiewon Dan, is there something on top of this that needs to be added for your Assistant Relay driver?
What other options have you implemented other than priority?

Andy

The Pushover Driver implements many features of the Pushover API thanks to @stephackā€™s contributions.

The Google Assistant Relay Driver implements the Custom Command and Custom Command with Converse as special features using the [CC] and [CCC] as prefixes to the string being sent to the Assistant-Relay NodeJS server.

The drivers can be seen here

So, I just need to pass on [CC] and [CCC] and have that as an option for a prefix (the same as I do for priority)?

Andy

Yes, but these are not used for typical TTS output. They are used to issue a unique command to Google, the same as if you asked the Google Home to do something. Is that really how your App is intended to be used? I see CC and CCC more as special tools to be used via Rule Machine.

Thoughts?

I was just going to say that I didn't see a use case for passing the [] commands in this particular app.

1 Like

Iā€™m inclined to agree. Not necessary.

Is message priority used with the google home assistant driver?

The reason I ask is I think it would be easy enough to duplicate the pushover commands in my app and create a ā€˜push to google home assistant... ā€˜ output section.

Andy

No, message priority is a feature of the Pushover official API. The assistant-relay Driver is really just used to broadcast TTS on all Google Home devices in your house.

1 Like

That makes things a little easier.

A few less lines of code to add to each trigger.

Ok, Mark Iā€™ll have a look at this in the morning

Andy

I would think you should just implement a generic ā€˜Speech Synthesisā€™ device option, not something specific to the Google Assistant-Relay driver.

Yep, thatā€™s what I was thinking and was the reason for the questions.

Andy

3 Likes

OK
I have completed a major recode to allow options for Speech Synthesis
I have not had a chance to try all the options but try this and please let me know if you find any bugs etc.

Updated child app: Version 11.0.0

One thing to note:
For anyone who has been using this with the 'musicPlayer' capability
You will need to open each child and select "Voice Message (MusicPlayer)" as the old "Voice Message" is no longer valid.
Once selected the previous settings should reappear so you can then just save the child again.

Andy

2 Likes

I have also added a number of 'weather' variables.
The following variables have been added:

%wsum% - Replaced with a weather summary
%high% - Replaced with a 'Forecast High'
%low% - Replaced with a 'Forecast Low
%hum% - Replaced with a 'Humidity'
%wnow% - Replaced with 'Weather Now'
%rain% - Replaced with 'Chance of Rain'
%vis% - Replaced with 'Visibility'
%wgust% - Replaced with 'Wind Gust'
%wspeed% - Replaced with 'Wind Speed'
%wdir% - Replaced with 'Wind Direction'
%feel% - Replaced with 'FeelsLike'
%temp% - Replaced with 'Temperature'

You will need the appropriate 'weather device' for these to work.

something like this:

or this:

or this:

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

As an example, here is the message I use for a daily weather (using the weewx driver)

%greeting% , Here is your weather for today,,, %wnow%,, With a high of %high% degrees ,, and a low of %low% degrees. , Temperature is currently, %temp% degrees. and it feels like %feel% . Humidity is currently, %hum% % . Wind, is from the %wdir% at %wspeed% mph, with gusts up to %wgust%. Visibility is around %vis% miles. , and,, There is a %rain% % chance of rain today

You might notice I use a comma (,) as a slight pause at various times

Andy

1 Like

Thanks for this Andy! Tested with @ogiewon Google Assistant Relay, works perfectly.

2 Likes

Great! :slight_smile:

I am giving this another try. I think you need to add an 'if' to the begining of line 2291 of the child app.

if(state.msgType == "Voice Message (SpeechSynth)"){
    if(state.talkpresence == 'present' && state.msg1 != null){
   def msg = message1     
   compileMsg(msg)    
   LOGDEBUG("Presence - Speech Synth Message - Sending Message: $msg")     
        }
     (state.talkpresence == 'not present' && state.msg2 != null){
     def msg = message2     
   compileMsg(msg)    
    LOGDEBUG("Presence - Speech Synth Message - Sending Message: $msg")   
    speechSynthNow(state.fullPhrase)  
     }  
 }      

so that

(state.talkpresence == 'not present' && state.msg2 != null){

is

if (state.talkpresence == 'not present' && state.msg2 != null){

Thanks.

@Matthew
You are correct.
Obviously when I was copy/pasting I must have missed the ā€˜ifā€™ :slight_smile:
Iā€™ll get it corrected in the morning and check the rest of the code for other missing bits :slight_smile:

Thanks for the catch.

Andy