Android as a Speech/Alarm Device released! And Updated!

@NW Tony, do you not even send back a 200 to the http Get request? I’ll get the requests from your web site. Once I finish it, I’ll post it to my github account. Thanks

##Update##

I got the device installed and the text working. I had to alter my parser to work with your parms. I’m getting

GET /&SPEAK=LANnouncer Version 11&@DONE@ HTTP/1.1

I’m used to query strings starting with a ? as in

GET /?SPEAK=LANnouncer Version 11&@DONE@ HTTP/1.1

with the & for additional arguments. Did you code it that way to make the Android device happy or is that some standard I don’t know about? If the latter, could you tell me what it is. I’m trying to write a general purpose parser for http query strings. The parser also didn’t like the spaces. It only picked up the first word. It that what the @DONE@ is for?

I do send a 200 status back, but ST doesn’t care.
To embed spaces, URLEncode them (%20).
I built it to be SMS friendly as well as REST friendly. But mostly it’s the way it is because I wrote the first version, which was fully functional, in about 20 hours over a long weekend. :sunglasses: Just to scratch an itch.

Yeah, I’ve done projects like that, just do what it takes to get it to work. Rather than change the parser, I just normalized the message and then ran it through. It gave me a chance to play with Ruby code I haven’t done before.

After I got the test to work I added code to my smart app. It only takes two lines:

In preferences

section("Send text to:") { input "talker", "capability.speechSynthesis"}

In the event handler

talker.speak("I am alive")

Thanks for all your work. You saved me some.

Not sure if this has been asked before but I often run into a case where multiple devices turn on or mode changes in a single call from ST but Lanannouncer seems to cut itself off and go onto the next one. It will be in the middle of saying something and cut out and start the next thing to say.
Anything that can be done here to make sure all calls complete before the next is started?

I am using BigTalker with it I should add

1 Like

I ran into a similar problem and The only solution I found is to limit what gets sent at the same time. I use Rule Machine as well as Big Talker but with Rule Machine, I can delay my announcements so they don’t run into each other.

1 Like

That was by design. For example, in case you have a long weather announcement from BigTalker, and sound a siren; you probably want that siren right then.

I could change it to queue them, but since the current beta version supports arbitrary MP3s, if you have song or some long motorcycle revving playing, that may throw off the door chime.

Maybe add it as a configurable option? I don’t use any alarm function so for me having everything finish is ideal but I certainly get the point of being able to “cut in line”

Possible to use this (sideloaded) to fire tv?

Should be. Fire TV is just a custom version of Android. If you have the latest Fire OS, you’re on Android 5.1, which has everything LANnouncer needs.

Would I then be able to use the tv for announcements?..or would I need to Bluetooth connect to my Echo?

I’m trying to find ways around using my tablet as it cannot utilize Bluetooth and wireless simultaneously.[quote=“NWTony, post:130, topic:30282, full:true”]
Should be. Fire TV is just a custom version of Android. If you have the latest Fire OS, you’re on Android 5.1, which has everything LANnouncer needs.
[/quote]

Your TV would have to be on. I don’t know beyond that; haven’t tried out a FireTV.

NWTony
thank you for this great app.
Is there a way to adjust how long the siren or alarm continue to beep? I set the announcer as a siren in SHM and it goes off but stops after a few seconds, I would like for it to continue until I manually turn it off like what I do with the Aeon Siren
thanks

As of today, you could probably use an MP3 for that. Along with the new “STOP” command.

1 Like

So, how do we get the premium version?

@NWTony, thanks so much for building this. It’s been great fun and super useful.

One question: I can’t seem to get the SPEAK commands to work with the IFTTT integration through GCM. The ALARM commands work fine, but when I try to send

http://lannouncer.keybounce.com:1036/command?userName=email@gmail.com&deviceName=My%20Fire&command=SPEAK%3DAll%20Of%20These%20Words

Nothing happens. Any thoughts? Thanks again.

Yes, that’s not a valid email address. Your email address isn’t "email@gmail.com" but, probably, edzhang89@gmail.com. Try that.

Also make sure your Fire is in WAN (or GCN) mode.

Haha, sorry for the confusion – I had my actual email address in there in my implementation but took it out when I made the post so that I could avoid posting it on a public forum :slight_smile:

My Fire is set to GCN mode. Like I said above, there’s no issue at all with the ALARM commands (of any type), but the SPEAK commands seem to not get processed correctly by my LANnouncer (even though they show up on the log).

In any case, sort of a moot point for my implementation because I found a work-around with just sending a IFTTT Maker GET request directly to my LANnouncer IP (thereby bypassing the necessity for GCN) but I figured you might want to be aware of the issues.

Thanks again for all of your help!

The funny thing is, I see that "email@gmail.com address in the latter calls to LANNouncer; I think perhaps you changed it by accident and didn’t reset it.

I’m happy to work with you to see if we can fix the problem. Given what you’ve said, my new guess is that you started WAN mode and then started GCN mode, but WAN mode didn’t fully exit, which would be a bug in my code.

Why no kit kat love? I cant get this to install on anything older than android 5

I’ve searched this thread looking for an answer to my problem but could not find one, so forgive me if I’ve missed it somehow, but…

I’ve installed the LANnouncer Android app on my Galaxy S4, the LANnouncer ST device and the Big Talker SmartApp. I’ve configured LANnouncer to communicate via SMS (I’m not at home, so I can’t try the LAN option yet, and I couldn’t seem to get the GCM option to work…and the WAN option is described as a “premium” option, but I can’t find so much as a mention anywhwere of what that means or how to enable it). SMS seems to mostly work, and I’ve gotten it to successfully trigger the tone, siren, strobe and notify mechanisms which are detected and correctly responded to by the Android app. I’ve reliably done this both through the LANnouncer device panel buttons as well as a Big Talker event (switching a light on/off). But in addition to the communication option problems above I’m having the following issues:

  1. SMS messages instructing the Android app to speak the supplied text (“VERSION 11” in the case of the device panel test button) are sent to and received by the phone, but the Android app does not appear to be doing anything with them. ie, no speech is being emitted by the app. I have all volume settings set to their highest, and the phone is not in silent mode. Other speech-producing apps are working fine. I know that the app is detecting the SPEAK SMSs because it displays them in the log at the bottom, and also jumps to the foreground whenever one arrives. But oddly, it doesn’t do the latter (jumping to the foreground) for the messages that it’s handling correctly. I’m guessing this is an indication that the app is experiencing an error processing the SPEAK messages and come to the fore to display an error, though it never does so.

  2. The Android app frequently seems to “hang” and become non-responsive for a few moments. One time it was so bad that Android prompted me to shut the app down and restart it.

Thoughts?