Announcement

Collapse
No announcement yet.

Alexa routine always asks for new cookie

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

    Alexa routine always asks for new cookie

    Hi,
    I have installed Node-Red into my QNAP with "Container station"


    Every time I "Deploy" the Alexa routine asks me to open the browser and add in the password

    Also, whilst I followed the examples

    https://docs.homeseer.com/display/HS...meSeer+Devices

    to the letter, my alexa echo are silent with the "Hello world" example

    Any suggestions?
    Thanks

    Click image for larger version

Name:	testAlexaNodeRed.jpg
Views:	837
Size:	32.9 KB
ID:	1439030

    #2
    I had that same issue and ended up saving the Alexa Account information with something other than the default values and also using the Proxy method with a File pointing to the cookie file in the Alexa Account settings. Some have had better luck using the Cookie method instead.

    Note that the file setting in the File Path field is the File with Path. In my Raspberry Pi, this field is set to:
    Code:
    /home/pi/Documents/NodeRed/Alexa.cookie.txt
    I originally read this to be just the path and that didn't work well.

    All this assumes you are using the Alexa remote2 contrib.
    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    Comment


      #3
      What is the format of the txt file and where did you get any cookie from? Or does it create the file for you and get you put in the path and file name?

      Comment


        #4
        Take a look at this write-up, which has some instructions for setting up the account starting at step 3. Hopefully it gets you what you need as it mentions both methods. If not, feel free to ask more here.
        Karl S
        HS4Pro on Windows 10
        1070 Devices
        56 Z-Wave Nodes
        104 Events
        HSTouch Clients: 3 Android, 1 iOS
        Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

        Comment


          #5
          Thanks for the reply BTW

          Comment


            #6
            I tried adding a file name to a cookie but where do I get the cookie?

            also , I guess because of this error, I added a debug node and I see a debug message: “TypeError: Cannot read property ‘hasOwnProperty’ of null”

            Comment


              #7
              Hi again and thanks for you comments so far.

              I did follow that guide in my first setup.

              Whilst it does say there are three authentication methods, the Username and Password does not seem to work.
              The "Cookie authentication" link actually goes over to a page github but step 4 of the instructions there are no longer possible because Amazon has stopped streaming music to a browser.

              So this means I only have method 1 = "Proxy" as a candidate to get this to work

              When I "Deploy" I get a prompt on the node to open a browser and then when I do the node seems to accept it but it is just a ruse because the routine does not work and my debug mode clearly shows the error “TypeError: Cannot read property ‘hasOwnProperty’ of null”


              Question: How did you create that amazon.cookie.txt file in your instalation?

              Thanks again

              Comment


                #8
                Did you look at the instructions in the link posted? Here is the raw link: https://docs.homeseer.com/display/HS...meSeer+Devices Start at step 3.
                Karl S
                HS4Pro on Windows 10
                1070 Devices
                56 Z-Wave Nodes
                104 Events
                HSTouch Clients: 3 Android, 1 iOS
                Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                Comment


                  #9
                  Drag the Alexa Routine node into a Node Red flow and double-click on the node. Now click the pencil icon in the Account row to open the account settings. This module provides 3 methods to authenticate your Alexa account. The preferred method is Proxy authentication and that is detailed below. Note: If you have difficulty getting the Proxy method to work, try using Cookie authentication instead.

                  Followed them exactly. For some reason it never saves a file.
                  I have tried node-red running on
                  a) QNAP NAS using Container Station (Docker)
                  b) Windows 10
                  c) Raspberry PI

                  All three installations give me the exact same problem, so I must be missing something really basic

                  Comment


                    #10
                    I'm having the same problem. The Proxy method doesn't work, so I'd like to try the Cookie method. I follow the instructions, but when I get to step 4, I have no idea what it means. "Select a radio station to play." What does that mean?

                    Comment


                      #11
                      Those Cookie instructions, likely should read:


                      ## Chrome

                      1. Open Developer Tools by pressing `F12`, `Ctrl+Shift+I` or `Cmd+Opt+I` (or from the menu).
                      2. In the Developer Tools switch to the **Network** tab.
                      3. Now enter `alexa.amazon.`[`de`,`co.uk`,`com`] in the url and press enter.
                      4. In the table (of the Developer Tools) click on the request with the **Name** `index.html`. (sort by Waterfall(last column) ascending and it should be the first).
                      5. Now in the newly appeared panel go to **Headers** > **Request Headers** and there you will find **Cookie**.
                      - If you see "⚠️ Provisional headers are shown" disable all extensions / use incognito mode
                      6. Copy this whole cookie.
                      7. Paste it into the alexa remote account nodes cookie field.

                      ## Firefox

                      1. Open Web Developer Tools by pressing `F12`, `Ctrl+Shift+I` or `Cmd+Opt+I` (or from the menu).
                      2. In the Web Developer Tools switch to the **Network** tab.
                      3. Now enter `alexa.amazon.`[`de`,`co.uk`,`com`] in the url and press enter.
                      4. In the table (of the Web Developer Tools) click on the request with the **File** `index.html`. (sort by Waterfall(last column) ascending and it should be the first).
                      5. Now in the newly appeared panel go to **Headers** > **Request Headers** and there you will find **Cookie**.
                      6. Copy this whole cookie by clicking into the field after *Cookie:*, Select All(right click or ctrl+A) and then Copy.
                      7. Paste it into the alexa remote account nodes cookie field.
                      Karl S
                      HS4Pro on Windows 10
                      1070 Devices
                      56 Z-Wave Nodes
                      104 Events
                      HSTouch Clients: 3 Android, 1 iOS
                      Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                      Comment


                        #12
                        Thank you. That worked. BTW, your steps are a lot more complete than the steps given on github:
                        1. Go to alexa.amazon.com.
                        2. Open Developer Tools by pressing F12, Ctrl+Shift+I or Cmd+Opt+I (or from the menu).
                        3. In the Developer Tools switch to the Network tab.
                        4. Select a radio station to play.
                        5. Now you should see a request with the Name queue-and-play in the Developer Tools. Click on it.
                        6. Now in the newly appeared panel go to Headers > Request Headers and there you will find Cookie.
                          • If you see "⚠️ Provisional headers are shown" disable all extensions / use incognito mode
                        7. Copy this whole cookie.
                        8. Paste it into the alexa remote account nodes cookie field.
                        I still have no idea what step 4 means, but it doesn't matter now.

                        I would add one more item to your recipe. Took me a while to see it. Between step 3 and 4, be sure that "Doc" is selected in the toolbar.

                        Thanks again.

                        Comment


                          #13
                          My steps are the direct copy of an older version of what was on GitHub. I will try to remember to change them back to these when I'm at a computer on Monday. Thank you for confirming they still work!
                          Karl S
                          HS4Pro on Windows 10
                          1070 Devices
                          56 Z-Wave Nodes
                          104 Events
                          HSTouch Clients: 3 Android, 1 iOS
                          Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

                          Comment


                            #14
                            My victory was short-lived. I successfully got the cookie authentication method to work. I stepped away for a week, and when I got back, I started getting the message, "no JSON." Now what? Any ideas?

                            Comment

                            Working...
                            X