Announcement

Collapse
No announcement yet.

node red

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

    node red

    hey people. was wondering if Anyone can answer this

    i get this when executing fromn within node red:


    object
    payload: string

    { "Response":"Error, user does not have access" }
    push: object
    parts: object
    _msgid: "91802c74.20f2f"
    url: "http://192.168.86.37:81/JSON?request=runevent&group=&name=turnallkitchenlightson"
    statusCode: 200
    headers: object


    however, if i copy the url out of text above and put in a browser it works perfectly.

    What type of access is wrong from within nodered?

    I disabled AV software for test but still no go.

    Oh and this is HS3

    thanks.

    #2
    Node Red is natively supported in HS4. If you are trying to use the HomeSeer contrib, you must use one of the more resent HS4 installations. What are you using in Node Red to try to connect to HomeSeer 3?
    Karl S
    HS4Pro on Windows 10
    242 Devices
    56 Z-Wave Nodes
    37 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units 1 display

    Comment


      #3
      Thanks. As the output shows i am calling events. This is using "join API" and Google Home.

      Comment


        #4
        You are using a Join node and a Google Home node? Can you share a screen capture and export of your flow? If using a Google Home node, what contrib is it from? I have not been impressed with the ones I looked at.
        Karl S
        HS4Pro on Windows 10
        242 Devices
        56 Z-Wave Nodes
        37 Events
        HSTouch Clients: 3 Android, 1 iOS
        Google Home: 3 Mini units 1 display

        Comment


          #5
          No google home node just join and i build the url in a function to call homeseer. Has worked for well over a year but not know. I can put the same url in a browser it works.

          Comment


            #6
            Can anybody help me? i cant figure this out.

            here is some additional info:

            http://192.168.86.XX:8X/JSON?request...&function=Inje ctAction&p1=SomeText< this works from within node red.
            http://192.168.86.XX:8X/JSON?request...itchenlightson > this does not work from within bode red

            any idea why i can call to plugin but not launch an event?

            Both above lines work if invoked from browser without node red.

            Thanks.

            Comment


              #7
              It would be helpful if you exported your flow and posted it. Remove any sensitive info. By posting your flow we can import it and help debug. As it sits you are asking us to help debug a program without having the source code.

              Comment


                #8
                1. How are you sending the url out of Node Red? We need to know what Node you are using for this and if it is not a standard Node Red node, what contrib it comes from. For instance, the built in HTTP Request node requires a specific format which could have changed with an update. Not knowing what type of node you are using means we cannot help determine why it isn't working.
                2. Does your event have any spaces in the name? If yes, replace them with %20. This means if your HomeSeer Event Name is turn all kitchen lights on you need to change that part of your out put to turn%20all%20kitchen%20lights%20on . If you did a Copy from a Debug node and Paste to a browser of the url, then this may not be the case.
                3. You may find better results using one of the MQTT Plugins with HomeSeer and MQTT Nodes in Node Red. You would find even better results upgrading to HS4 and using the HomeSeer integration to directly run a HomeSeer Event.

                Please provide a copy of your flow and the information requested in item 1 above if item 2 does not resolve your problem. Unless I am missing something, we do not have enough information with what you have provided to offer any further assistance. There are a few of us here who know Node Red and are willing to help, but we need more information in order to do so.
                Karl S
                HS4Pro on Windows 10
                242 Devices
                56 Z-Wave Nodes
                37 Events
                HSTouch Clients: 3 Android, 1 iOS
                Google Home: 3 Mini units 1 display

                Comment


                  #9
                  Thanks for the replys. It is a built in HTTP Request node that i build the url in a function node ahead of it. It has worked for years. It quit working a week ago. the call comes from IFttt and then JoinAPI node. AS you see in output no spaces. The exact same call to &injectaction working perfect.This why i am not ripping intp design as it worked for so long. Seems to be a network , permissions thing as like i stated i built the url in a function node and it works from a browser.

                  Here is output:


                  object
                  payload: string

                  { "Response":"Error, user does not have access" }
                  push: object
                  location: false
                  fromTasker: false
                  toTasker: false
                  find: false
                  id: "7bcc0c71-3475-4xxxxcc1-82f1-2ed"
                  apikey: "03caaa7061bf4xxxf1e6ad131"
                  deviceNames: "PrydeServer2"
                  text: "node2=:=HS3event_EventGroup=_EventName=turnallkitchenli ghts on"
                  deviceNamesrray: array[1]
                  0: "PrydeServer2"
                  date: 1607621342171
                  parts: object
                  parts: object
                  id: "ea936f43.d6431"
                  type: "string"
                  ch: "_"
                  index: 2
                  count: 3
                  id: "3feexxxx7aaa.0a41e6"
                  type: "string"
                  ch: "="
                  index: 1
                  count: 2
                  _msgid: "953f9d65.8da8c"
                  url: "192.168.86.xx:81/JSON?request=runevent&group=&name=turnallkitchenlightson"
                  statusCode: 200
                  headers: object
                  server: "HomeSeer"
                  cache-control: "no-cache"
                  access-control-allow-origin: "*"
                  content-type: "application/json; charset=utf-8"
                  accept-ranges: "none"
                  content-length: "51"
                  x-node-red-request-node: "0b46dea6"
                  responseUrl: "http://192.168.86.xx:81/JSON?request=runevent&group=&name=turnallkitchenlightson"
                  redirectList: array[0]

                  Comment


                    #10
                    Here is a flow having same problem. I think it is a hs3 prob and not node red

                    [{"id":"5cc58cde.e9c0c4","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"86330114.ef10d","ty pe" :"inject","z":"5cc58cde.e9c0c4","name":"","topic":"","pay loa d":"","payloadType":"date","repeat":"","crontab":"","once ":f alse,"onceDelay":0.1,"x":100,"y":100,"wires":[["f95dc647.5cefd8"]]},{"id":"f95dc647.5cefd8","type":"http request","z":"5cc58cde.e9c0c4","name":"","method":"GET","ret ":"txt","paytoqs":false,"url":"192.168.86.37:81/JSON?request=runevent&group=&name=turnallkitchenlightson","t ls":"","persist":false,"proxy":"","authType":"","x":280,"y ": 120,"wires":[["a884b1b0.2c0e3"]]},{"id":"a884b1b0.2c0e3","type":"debug","z":"5cc58cde.e9c0c 4 ","name":"","active":true,"tosidebar":true,"console":tru e,"t ostatus":false,"complete":"true","x":450,"y":120,"wires":[]}]


                    and its debug returns:

                    msg : Object
                    object
                    _msgid: "52dadb98.e38d14"
                    topic: ""
                    payload: ""
                    statusCode: 401
                    headers: object
                    www-authenticate: "Basic realm="HomeSeer0""
                    x-node-red-request-node: "69bcb5e8"
                    responseUrl: "http://192.168.86.37:81/JSON?request=runevent&group=&name=turnallkitchenlightson"
                    redirectList: array[0]



                    not sure why it chnged output to 401 but thats is the same thing i believe

                    Comment


                      #11
                      Ok i was playing with "No Password Required for Local/Same Network Login (Web Browser/HSTouch)". Off gives 401 error On gives "{ "Response":"Error, user does not have access" }" error again. So second call was answered by homeseer so URL is fine. Something not right in HS3 i thiink

                      Comment


                        #12
                        This is now resolved. It needed username and password in request node. The call to my plugin works if is there or not but not events. It needed it. I gave it to both for consistency.

                        Comment


                          #13
                          Great! I was able to test your flow, modified to my settings, without issue and was going to test a couple items regarding user names. Glad you got it!

                          You know you might be able to get rid of IFTTT if you used MQTT, or some other contrib. Also, depending on what your function node does, it is probably better to use a Change node. The function node should be a last resort as, according to the more veteran Node Red users and developers, the function node is slower. If you post more about your flow I would be willing to see if there might be a different way which may work for you.

                          Once you upgrade to HS4 you will want to look at updating your flows to use the built in HomeSeer functionality. It works quite nicely.
                          Karl S
                          HS4Pro on Windows 10
                          242 Devices
                          56 Z-Wave Nodes
                          37 Events
                          HSTouch Clients: 3 Android, 1 iOS
                          Google Home: 3 Mini units 1 display

                          Comment


                            #14
                            I need ifttt for voice control from google home though right?

                            Comment


                              #15
                              You can use HomeSeer for Google home voice control of HomeSeer devices and events. For an event you say "Hey Google, run (event voice command)". You could also use one of the Google voice contribs but they seem to require creating their own virtual items you control with Google voice. These are not HomeSeer virtual devices but Google home devices. I have not tried the Google voice contribs after installing and seeing this methodology.

                              Also note that if you have multiple Google home units and one light in a room you can associate the light with the room and just say "Hey google, turn on the light" and it will operate that room's light. I believe you can use the HomeSeer location settings but I manually associated the rooms since I do not have Google home units matching each HomeSeer location where I have voice control. Telling it to turn on the lights, plural, I believe turns on all lights which have voice commands in all locations. But you could say turn on the kitchen lights and get all kitchen lights on without an event.

                              I have a feeling you are using a function to parse part of a string and also remove spaces. This could be handled with a Switch node followed by a Change node. The switch node would look for a given string or strings, send the flow to a change node, and the change node would set the event name. When you move to HS4 you would replace the change node with a HomeSeer event node for direct communication.
                              Karl S
                              HS4Pro on Windows 10
                              242 Devices
                              56 Z-Wave Nodes
                              37 Events
                              HSTouch Clients: 3 Android, 1 iOS
                              Google Home: 3 Mini units 1 display

                              Comment

                              Working...
                              X