Announcement

Collapse
No announcement yet.

Alexa TTS that works better (IMHO) than the solution for Home Assistant.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bugman1400
    replied
    I get the following error in node-red....
    Click image for larger version

Name:	Screenshot from 2020-04-24 19-44-31.png
Views:	362
Size:	57.6 KB
ID:	1380689

    Leave a comment:


  • mr.Magoo
    replied
    The first one is just an MQTT-In node which I think is standard with NodeRed.
    The second one is indeed a function....

    No need to code though ? If you import the flow in my first post (1st of the whole thread) it should give you everything you need.

    Leave a comment:


  • Bugman1400
    replied
    I am missing these two items. Looks the MQTT to Alexa Speak is a function that I need to code but, perhaps I missed it.

    Click image for larger version

Name:	image_88165.jpg
Views:	369
Size:	31.2 KB
ID:	1380158

    Leave a comment:


  • mr.Magoo
    replied
    OK, so, given the issues with MQTT for some people, I did put together a different flow for WebHooks.


    In HS, create an event to run a script:

    &hs.URLAction("http://IPofNodeRed:1880/HS4?Action=Announce&Where=Office&Volume=20&SayWhat=Testing%2 0Testing", "GET", "", "")

    Action is Announce, Speak or Whisper
    Where is the device name you'd like to send it to, omit this parameter and it sends it everywhere.
    Volume is the volume you want it set at, omit this parameter and it uses whatever volume the device is set at (faster)


    Click image for larger version  Name:	Webhook.JPG Views:	37 Size:	54.8 KB ID:	1380012
    [ATTACH]n1380783[/ATTACH]

    Leave a comment:


  • mr.Magoo
    replied
    mcsMQTT is a client and it's what will take you from HS to MQTT, in addition to all this you also need to run a Broker ("server" / "gateway" / "relay").
    I use Mosquitto personally >> https://mosquitto.org/download/ ( https://hub.docker.com/_/eclipse-mosquitto) but you can use whatever you want.

    The broker is what listens to messages from a client and broadcasts that to all the other clients.

    Additionally, MQTT is NOT required, it's the media/method I chose to get data/instructions from HS4 >> Node-Red, technically you could use webhooks, or another method which would eliminate the need for MQTT,
    It's just that I personally like the simplicity of MQTT to transfer data between devices, so I use it for a lot more than just Alexa.

    Below is my mcsMQTT config, using loopback (127.0.0.1) since Mosquitto is running on the same machine as HS4, but you need to change that if they're not running on the same machine. I'm not using any security for the MQTT broker.



    Click image for larger version

Name:	hs4mqtt.JPG
Views:	449
Size:	125.4 KB
ID:	1380004

    Leave a comment:


  • Bugman1400
    replied
    Still struggling with HS4 to mcsMQTT to node-red. I've got HS4 and mcsMQTT plugin set up on Ubuntu with node-red running on Docker on same machine. I've also got some of the example flows to work and speak to house Echo Dots and Echo Plus units. I dont know much about MQTT but, I'm looking for example that will take me from HS4 to MQTT. I think mr.Magoo's flow above will take me from MQTT to node-red.

    Leave a comment:


  • mr.Magoo
    replied
    I did update my original flow (see 1st post) the other day, same functionality just a much cleaner look and probably a bit more efficient as well.

    Click image for larger version  Name:	flow.JPG Views:	72 Size:	29.2 KB ID:	1377383

    [ATTACH]n1380784[/ATTACH]

    Leave a comment:


  • alphatech
    replied
    Thanks, I'm sure something easy that I'm missing. I also posted it to Michael plugin with some print screens
    https://forums.homeseer.com/forum/li...t-via-node-red

    Leave a comment:


  • mr.Magoo
    replied
    Originally posted by alphatech View Post
    Thanks to the help of all here I got it to work, although I have noticed that I need to send the command few times before Alexa respond, I'm sure it is some setting in MQTT but not sure what to change. I also noticed that Alexa status say connected and then disconnected every minute or so, same with homeseer status. They are not synchronized for a better word, while alexa shows connected homeseer shows disconnected.

    Thanks


    Going by memory, the MQTT server / broker (Mosquitto ?) does not like it when you have two different connections with the same name and that's when you'll see connect/disconnects, so make sure that all your connections have a unique name / reference.

    Leave a comment:


  • rrepic
    replied
    Im going to give this a try to see if I can get this to work. I just installed node-red on a docker container on my Synology since its an always on service already. Container is up running nodered-node-red. Tomorrow Ill try this package and interfacing.... Anyone already try this setup? Thanks!!

    Leave a comment:


  • alphatech
    replied
    Thanks to the help of all here I got it to work, although I have noticed that I need to send the command few times before Alexa respond, I'm sure it is some setting in MQTT but not sure what to change. I also noticed that Alexa status say connected and then disconnected every minute or so, same with homeseer status. They are not synchronized for a better word, while alexa shows connected homeseer shows disconnected.

    Thanks
    Attached Files

    Leave a comment:


  • MFULLER
    replied
    Great, thanks a restart resolved it.

    I couldn't get MQTT to work at all, so I've set mine up to use HTTP In. I then set a Homeseer event to use GETURL and pass a query string to it with the text. It's just a basic passing of a string with no options, but that's all I need.

    Code:
    [{"id":"d8f9d66c.47a108","type":"tab","label":"Homeseer to Alexa","disabled":false,"info":""},{"id":"ce1a4f5d.59fa6","type":"http in","z":"d8f9d66c.47a108","name":"","url":"/homeseerquery","method":"get","upload":false,"swaggerDoc":"","x":320,"y":540,"wires":[["d2eb278f.997948","459da19c.54ff1"]]},{"id":"1adbe9fb.fe3f76","type":"debug","z":"d8f9d66c.47a108","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":830,"y":540,"wires":[]},{"id":"d2eb278f.997948","type":"alexa-remote-routine","z":"d8f9d66c.47a108","name":"","account":"4b654b8f.ee5f94","routineNode":{"type":"speakAtVolume","payload":{"type":"announcement","text":{"type":"msg","value":"payload.msg"},"volume":{"type":"num","value":"50"},"mode":"set","devices":["317907e038e34abaa1607fc2252359e6"]}},"x":590,"y":540,"wires":[["1adbe9fb.fe3f76"]]},{"id":"459da19c.54ff1","type":"http response","z":"d8f9d66c.47a108","name":"","statusCode":"200","headers":{},"x":540,"y":500,"wires":[]},{"id":"4b654b8f.ee5f94","type":"alexa-remote-account","z":"","name":"AlexaCookie","authMethod":"proxy","proxyOwnIp":"192.168.1.1","proxyPort":"4567","cookieFile":"cookie.txt","refreshInterval":"3","alexaServiceHost":"alexa.amazon.co.uk","amazonPage":"amazon.co.uk","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"on"}]
    and this is my little script. I pass the text to speek in the HS parameters box under the event.

    Code:
    Sub Main(ByVal strParms as String)
    Dim strParmArr() as String
    Dim strCommand
    
    'strParmArr = strParms.ToString.Split("|")
    
    strCommand = "/homeseerquery?msg=" & strParms
    
    hs.GetURL("192.168.1.1",strCommand,TRUE,1880)
    
    End Sub
    Last edited by MFULLER; February 19, 2020, 09:44 AM. Reason: Spelling

    Leave a comment:


  • mitchmitchell1616
    replied
    I was playing with this tonight and got the "no csrf found" message -- a couple of things I noticed:

    1. Check your amazon devices, each time I authenticate I get a new device showing up. I deleted a bunch of them.
    2. I store my authentication cookie in the file system -- I'll see how long it persists. When I get the "no csrf found" error, the file is not present.
    3. After playing with authentication several times I started getting "no csrf found" always -- two things I noticed, Amazon kept wanting me to enter a verification code when logging into their website when this was happening. I cleared it up by restarting the node red server.
    4. I decided to enable two-factor authentication on my Amazon account and I was pleased to see that the node red nodes supported that.

    Leave a comment:


  • zimmer62
    replied
    Originally posted by mr.Magoo View Post
    ...and I haven't touched mine since the beginning, so almost 6 months without the need to do anything.
    Granted, I'm running Node-Red (for this) on a Windows Box, maybe that has something to do with it ?
    Also running node-red on a windows box... I'll have everything work fine for a few weeks at a time, then I stop getting announcements and have to check on what happened. Today it was the "no csrf found" message.

    Leave a comment:


  • mr.Magoo
    replied
    ...and I haven't touched mine since the beginning, so almost 6 months without the need to do anything.
    Granted, I'm running Node-Red (for this) on a Windows Box, maybe that has something to do with it ?

    Leave a comment:

Working...
X