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

    #46
    Originally posted by mjolsen View Post

    didn't see any instructions on that nor did I find such options?
    I'm assuming you're using Node-Red and the flows posted in this thread.

    If you open Node-Red in you web browser and select the Alexa-Init flow, in the right hand pane is an arrow pointing down. Click that and select "Configuration Nodes". You should see a button under alexa-remote-account. Double click that and it should open "Edit Alexa Account node". I have the method "Proxy" with "127.0.0.1" and port "3456". Right under that is the file path used for the stored cookie which will be used if the flow is restarted. The path will depend on your OS, for me I have /home/user/tempfilename. Once you capture the cookie with a proxy browser login you can look for the file and show the contents.

    Hope that helps.

    Comment


      #47
      Originally posted by mterry63 View Post

      I'm assuming you're using Node-Red and the flows posted in this thread.

      If you open Node-Red in you web browser and select the Alexa-Init flow, in the right hand pane is an arrow pointing down. Click that and select "Configuration Nodes". You should see a button under alexa-remote-account. Double click that and it should open "Edit Alexa Account node". I have the method "Proxy" with "127.0.0.1" and port "3456". Right under that is the file path used for the stored cookie which will be used if the flow is restarted. The path will depend on your OS, for me I have /home/user/tempfilename. Once you capture the cookie with a proxy browser login you can look for the file and show the contents.

      Hope that helps.

      oh yeah.. sorry, I didn't do the file method I copied the cookie from the debug window. So I went back and used the proxy method and dumped it to the file and copied that cookie. Hopefully it sticks. will see in a few days.

      thanks again,
      mike

      Comment


        #48
        Originally posted by mjolsen View Post


        oh yeah.. sorry, I didn't do the file method I copied the cookie from the debug window. So I went back and used the proxy method and dumped it to the file and copied that cookie. Hopefully it sticks. will see in a few days.

        thanks again,
        mike
        Still working since the 29th! Looks like the cookie in the file method works great! Super simple and great solution! Seems like someone could wrap all of this up into a plugin and a clean interface.

        m

        Comment


          #49
          Originally posted by mr.Magoo View Post
          Thanks - glad you like it !
          Another Node that you may want to look into is "Alexa Local" - https://flows.nodered.org/node/node-...ib-alexa-local
          This allows you to set up a "virtual" device in Node Red that is recognized by Alexa as a smart home device and you can either have it trigger things directly - or - when you combine the two (Alexa Local and Alexa Event) you can use it to make the triggering room sensitive in a way not too different from Alexa's own Group/Lights function (but more powerful / flexible).

          i.e. you combine the room from Events with the device from Local and let that control whatever it is you'd like to control
          This sounds interesting but I'm not fully following. Can you elaborate or post an example? I am currently up and running with the TTS using a tweaked version of your original Flow so thanks for that.

          EDIT:

          Thanks, figured it out.

          Comment


            #50
            Sorry but I'm very unfamiliar with all these tools and I need some guidance since from what I read, there are many different platforms and tools that someone can use. I have HS3 on a Windows 7. Does anyone have a step by step process to install these tools on this platform.

            Thanks

            Comment


              #51
              Originally posted by alphatech View Post
              Sorry but I'm very unfamiliar with all these tools and I need some guidance since from what I read, there are many different platforms and tools that someone can use. I have HS3 on a Windows 7. Does anyone have a step by step process to install these tools on this platform.

              Thanks
              I can give you a hand on something like Google Hangouts if you want to shoot me a PM. I don't have anything written up as I just worked through this myself.

              Comment


                #52
                Thank you, looking forward to it.

                Comment


                  #53
                  Thought I would give this a shot as I had a spare Pi sitting around.

                  I've got node red installed (never used it before and have limited pi knowledge).
                  I've followed this thread as best I can but am stuck on the Refresh Cookie part. I open the proxy page and enter my username/password for Amazon. I then switch back to node-red and it gives a "no csrf found" error. Debug shows:
                  Code:
                  18/02/2020, 16:35:40[URL="http://172.16.5.71:1880/#"]node: MyAlexa[/URL]msg : string[13]
                  "no csrf found"
                  Any layman's help appreciated.

                  Comment


                    #54
                    "no csrf found"
                    I had this today as well... I restarted nodered and went to the cookie refresh page again.

                    I haven't been able to keep this running for more than a few weeks without having to intervene. I wish it was more stable.
                    Joe (zimmer62)

                    BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

                    Comment


                      #55
                      ...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 ?

                      Comment


                        #56
                        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.
                        Joe (zimmer62)

                        BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

                        Comment


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

                          Comment


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

                            Comment


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

                              Comment


                                #60
                                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!!

                                Comment

                                Working...
                                X