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

    #61
    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.

    Comment


      #62
      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

      Comment


        #63
        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]

        Comment


          #64
          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.

          Comment


            #65
            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:	443
Size:	125.4 KB
ID:	1380004

            Comment


              #66
              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]

              Comment


                #67
                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:	366
Size:	31.2 KB
ID:	1380158

                Comment


                  #68
                  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.

                  Comment


                    #69
                    I get the following error in node-red....
                    Click image for larger version

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

                    Comment


                      #70
                      When doing what ?


                      I just checked the quoted config v.s. an export from what I'm running right now and they're identical except for naming / ip-addresses.

                      Comment


                        #71
                        Originally posted by mr.Magoo View Post
                        When doing what ?


                        I just checked the quoted config v.s. an export from what I'm running right now and they're identical except for naming / ip-addresses.
                        Just simply tried to import the code into node-red and got the error message. Will try another route.

                        Can you confirm Palette..

                        Click image for larger version

Name:	Screenshot from 2020-04-25 12-01-47.png
Views:	360
Size:	47.5 KB
ID:	1380771

                        Also, is there a way to send JSON file instead of copy & paste code?
                        Last edited by Bugman1400; April 25, 2020, 11:04 AM. Reason: Update

                        Comment


                          #72
                          OK, tried copy/paste from the forum and had the same issue as you... must be something in the formatting from the forum posts so I added them as text files instead which works for me.

                          Comment


                            #73
                            Was able to connect to HS4Pro but, I don't know why the Alexa Speak node is directing me to connect to 192.168.1.10:3456........

                            Click image for larger version  Name:	Screenshot from 2020-04-26 11-09-40.png Views:	0 Size:	167.4 KB ID:	1380919

                            Comment


                              #74
                              Because you have your Alexa Account to authenticate via Proxy (and/or no cookie present), you also need to change that IP to the IP of your Node Red Box

                              Personally I don't like that method since you need to re-authenticate every time you deploy the settings in Node-Red and/or restart your box,
                              so I suggest grabbing the cookie and using cookie as your auth-method.

                              See >> https://forums.homeseer.com/forum/ho...91#post1321191

                              Comment


                                #75
                                Originally posted by mr.Magoo View Post
                                1-5 for simple login (but you have to login every time you deploy) , 1-7 to grab the cookie

                                You might have to change the host/page depending on what you guys use down under.


                                Add this flow
                                Code:
                                [{"id":"8c611665.a086c8","type":"alexa-remote-init","z":"95ab52ba.bdd6d","name":"","account":"24975ac8.2d8616","option":"refresh","x":420,"y":560,"wires":[["d8ab29f.307b4d8"]]},{"id":"29bc7e29.6017c2","type":"inject","z":"95ab52ba.bdd6d","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":620,"wires":[["8c611665.a086c8"]]},{"id":"d8ab29f.307b4d8","type":"debug","z":"95ab52ba.bdd6d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":630,"y":500,"wires":[]},{"id":"24975ac8.2d8616","type":"alexa-remote-account","z":"","name":"MyAlexa","authMethod":"proxy","proxyOwnIp":"192.x.x.x","proxyPort":"3456","cookieFile":"","refreshInterval":"3","alexaServiceHost":"pitangui.amazon.com","amazonPage":"amazon.com","acceptLanguage":"en-US","userAgent":"","useWsMqtt":"on","autoInit":"on"}]

                                1. Double click the Alexa Init / Refresh node and give it a name, and update the account settings (pen)

                                Click image for larger version Name:	1.PNG Views:	0 Size:	17.4 KB ID:	1321197

                                2. Change the IP to the IP of your device, if you're on a machine where you have a local webbrowser you can leave it as blank/local host but if you need to access it from another device you need to enter the IP it should listen from / bind to.
                                Click image for larger version Name:	image_81173.png Views:	3 Size:	40.0 KB ID:	1321195

                                3. Point your browser to your IP :3456 and it'll open up the alexa login
                                Click image for larger version Name:	3.PNG Views:	0 Size:	15.7 KB ID:	1321193



                                4. Login (it'll say "Amazon Alexa Cookie successfully retrieved. You can close the browser." when done
                                Click image for larger version Name:	image_81180.png Views:	3 Size:	47.6 KB ID:	1321202


                                5. There appears there's a bug so the cookie gets "lost" from the debug window the first time, so once the status says "ready" you can insert and have it refresh the cookie

                                Click image for larger version Name:	5.PNG Views:	0 Size:	15.1 KB ID:	1321196


                                6. Open the debug window and copy everything in the Local Cookie string (between the " ")
                                Click image for larger version Name:	6.png Views:	0 Size:	18.1 KB ID:	1321194

                                7. Create a new account and set the method to Cookie and paste your cookie into the cookie field
                                Click image for larger version Name:	image_81181.png Views:	3 Size:	26.3 KB ID:	1321203
                                I can't locate the debug messages to pull the cookie out.



                                Comment

                                Working...
                                X