Announcement

Collapse
No announcement yet.

Why is this msg.payload.status truncated ?

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

    Why is this msg.payload.status truncated ?

    I am trying to set a virtual vdevice feature with the following string:

    "https://dev.virtualearth.net/REST/v1/Imagery/Map/road/46.71111,-73.112121/15?mapSize=400,400&pushpin=46.71111,-73.112121&mapLayer=basemap&format=jpeg&key=private_key"

    Part of the string makes it in the status of the device but everything after the '&' (before pushpin) is rejected, is there any way to have HS4 accept the complete string ?

    #2
    You might have to escape it with a single \ right before the &
    HS4Pro on a Raspberry Pi4
    54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
    Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

    HSTouch Clients: 1 Android

    Comment


      #3
      rmasonjr i already tried this solution but it keeps being rejected and don’t make it to the virtual device. Everything before makes it but as soon it sees the & it troncates the message even with ‘\’ before

      Comment


        #4
        Maybe try &

        Comment


          #5
          I’m away from my server, I’ll try this later this afternoon, thanks

          Comment


            #6
            Can you post an image of how you are setting msg.payload.status, please? I copied your string, without the quotes, and am able to get the full string added using teh settings as shown below:
            Click image for larger version

Name:	hs3.png
Views:	202
Size:	6.9 KB
ID:	1433941

            Here is the debug out of the node from above:
            Click image for larger version

Name:	hs4.png
Views:	195
Size:	13.0 KB
ID:	1433942
            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


              #7
              ksum here is how I manually inject my message that does not make it complete in the HS4 devise status:


              Click image for larger version  Name:	node-red.PNG Views:	0 Size:	27.1 KB ID:	1434053
              here is the debug

              Click image for larger version  Name:	node-red2.PNG Views:	0 Size:	39.8 KB ID:	1434055

              and here is the status ih HS4

              Click image for larger version  Name:	node-red3.PNG Views:	0 Size:	46.3 KB ID:	1434056

              And here is what I want to replace the manual injection with:

              using a change node:

              Set msg.payload.status
              (jsonata) "https://dev.virtualearth.net/REST/v1/Imagery/Map/road/" & msg.payload.iPhone[0].locationInfo.latitude & "," & msg.payload.iPhone[0].locationInfo.longitude & "/15?mapSize=400,400&pushpin=" & msg.payload.iPhone[0].locationInfo.latitude & "," & msg.payload.iPhone[0].locationInfo.longitude & "&mapLayer=basemap&format=jpeg&key=private_key"



              Comment


                #8
                Originally posted by drhtmal View Post
                Maybe try &
                that does not work, it still stop at the &

                Comment


                  #9
                  in fact, any string containing '&' does not make it to the status of the virtual device at least in my windows environment

                  Comment


                    #10
                    Can you set the status of the device to contain the '&' in HomeSeer or via a script? Maybe it isn't possible if holding such? What are the device's settings in HomeSeer?
                    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


                      #11
                      Yes i am able to set the status via hs.devicestring in a string

                      in Fact, just received a note from spud for a question I asked in the node-red Homeseer integration in the github ‘issue’ section, this as been logged as a bug.

                      thanks all for the help

                      Comment


                        #12
                        This is fixed in node-red-contrib-homeseer version 1.0.5 which has just been released

                        Comment


                          #13
                          Thank you, spud The update will require you to restart Node Red. Here is a short flow to do that. Import it and then, after updating the Homeseer contrib, click the Inject node to restart Node Red. refresh your browser and all should be good.

                          Code:
                          [{"id":"8497fd50.d66e1","type":"exec","z":"4487e413.bb781c","command":"sudo ","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"System Command","x":720,"y":370,"wires":[[],[],[]]},{"id":"c8687228.7cd88","type":"inject","z":"4487e413.bb781c","name":"Restart node-RED","topic":"","payload":"node-red-restart","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":480,"y":370,"wires":[["8497fd50.d66e1"]]}]
                          !
                          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
                            thanks again to all

                            spud that was a rapid fix, special thanks

                            Comment

                            Working...
                            X