SOLVED - WC to RM: Notification of Lightning

In this example;
Get out. Get out now. Lightning has been detected. Test a b c d e f

It stops at the end of "Tes". So counting spaces, that would be 54 characters.

In this example;
Lightning has been detected. You might want to think about getting out of the pool soon.

It stops at the end of "think". Counting spaces, that would be 52 characters.

Wondering if it's a "race condition" where the audio takes longer than the "done."

Using your examples:
Get out. Get out now. Lightning has been detected. Test a b c should play "perfectly" (no "tes")

Thus I wonder if:
Lightning has been detected. You might want to think about getting out of the pool soon. Test a b c

would play perfectly too. In other words, would N seconds of near silence at the end on EVERY message work? :slight_smile: Or is N a variable? :frowning:

Tested this, it stopped at "Tes"

Then tried a longer phrase of;
Lightning has been detected. You might want to think about getting out of the pool soon. I said, lightning has been detected, get out. Test a b c

It stopped at the end of the 2nd sentence - "soon."

On this TTS;
Lightning has been detected, you might want to think about getting out of the pool soon. I said, lightning has been detected, get out, get out.

It said all of this;
Lightning has been detected, you might want to think about getting out of the pool soon. I said, lightning has been detected,

One thing they both have in common is they played until the end of the 2nd sentence, and nothing after the end of it. My original post only had 2 sentences, and the announcement was being truncated. Don't know if it is cutting off the last N characters??

In my imagination: Text is fed into a "to speech" module and that module takes a variable amount of time to convert. Then it starts playback. Then it says "done," but the playback isn't done, yet. As if it's saying "Done with conversion" but is being treated as: "done with playback". What's buffered up gets played, what didn't is dropped.

Again, this is my imagination - not what's really happening. The longer the text, the longer the conversion time and also the longer the playback, but no amount of extra words make the conversion long enough to complete the playback. :frowning:

I tried
Lightning has been detected, you might want to think about getting out of the pool soon. I said, lightning has been detected,

I did this from the Play Text in my sonos device page. It played back fine for me. Have you been testing from a rule or from the device page of your sonos?

Edit: I even added "Lightning has been detected, you might want to think about getting out of the pool soon. I said, lightning has been detected. Are you deaf? Get out now you moron." Worked fine

1 Like

I think per his info he's been testing from the rule, making the virtual button to turn on, this is why I was suspecting from RM but you saw Bruce's answer.

:joy:

1 Like

That's what I thought. It was my way of suggesting he try playing the text directly from the sonos device to confirm if it's an issue with RM or the sonos device.

I ran a test myself with one of my existing rules. It worked from my RM rule as well. I tried using both the music and speech device options.

This cutting off is an issue with the Sonos driver. Identified and will be fixed.

1 Like

Thanks all for helping with this.

@stephack, I hadn't ever looked at the device page for my speakers, so didn't even know all those commands were in there. I went ahead and played the long string there, and it worked fine. But is still cut short at the end when done through the rule.

Love it :joy:. When this is all fixed, and if there is a way to use a Random function in TTS like there is in webCoRE, I will add that as one of the sayings, and probably something about trying for a Darwin award... :slight_smile:

@bravenel, thanks for heads up, happy there will be a fix for it.

Can anyone chime in with feedback about a Random function like in WC?

I remember @Matthew discussing this in another thread. Maybe he can chime in.

Message Central should be able to do what you want.

Not sure of the context of the question? Message Central from @Cobra does have up to four groups of random messages. I have 25 'Greetings' and 25 'Farewell' messages that play randomly as people arrive and depart based on presence sensor changes.

1 Like

That's precisely the context and precisely the thread I was referring to. I just couldn't remember where it was posted.

1 Like

Thanks for tip @stephack and @Matthew (and @Cobra for the app) . I am now trying to figure out how to work Message Central into the Lightning Detected rule, or if I start the process from within Message Central? Trying to get my head around how Hubitat rules work, compared to webCoRE.

In my head I thought that now I have added Message Central, that there would be an option within RM to pick one of the created Messages, but I think the rule needs to be redesigned in Message Central?

You could just trigger the TTS of Message Central with your virtual switch

I donā€™t have the option to plug MC into Rule Machine or vice versa

Andy

Good to know, thanks @Cobra.

Is this a Sonos setup? Doesnā€™t the current Sonos integration only supports 128 characters? Also you should hear double messages.

Yep, this is a Sonos setup. The cutting off of the end of the message was happening even on short messages.

@bravenel is on to it.

My ideal situation for both this rule, and one that checks UV level before swimming, would be for WeatherFlow to be integrated with HE, but I am not a programmer, so am at the mercy of others wanting to implement it. In the meantime, this workaround seems to be working.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.