Debug data missing

I am using the http request node to get information on a domoticz sensor.
The output is sent into a debug node.

If I use a browser then I get a complete message with all the info but the debug node only shows partial information in the payload and misses out the data I actually need.

Any ideas please?

the debug only shows the first 1000 chars by default - but the data is still there on the message - you can set the debug node to also send to console and you can see the full data there if you need to.

1 Like

It is not that. I get the same in the console.

Some data is missing half way in the message.Below I will post the whole output from my browser.
Node red http does not give me the payload:result data ???

{
	"ActTime" : 1585649518,
	"AstrTwilightEnd" : "21:35",
	"AstrTwilightStart" : "04:37",
	"CivTwilightEnd" : "20:09",
	"CivTwilightStart" : "06:03",
	"DayLength" : "12:57",
	"NautTwilightEnd" : "20:50",
	"NautTwilightStart" : "05:22",
	"ServerTime" : "2020-03-31 11:11:58",
	"SunAtSouth" : "13:06",
	"Sunrise" : "06:37",
	"Sunset" : "19:35",
	"app_version" : "2020.1",
	"result" : 
	[
		{
			"AddjMulti" : 1.0,
			"AddjMulti2" : 1.0,
			"AddjValue" : 0.0,
			"AddjValue2" : 0.0,
			"BatteryLevel" : 255,
			"CustomImage" : 9,
			"Data" : "On",
			"Description" : "",
			"DimmerType" : "none",
			"Favorite" : 1,
			"HardwareID" : 8,
			"HardwareName" : "Dummy",
			"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
			"HardwareTypeVal" : 15,
			"HaveDimmer" : true,
			"HaveGroupCmd" : true,
			"HaveTimeout" : false,
			"ID" : "000140E8",
			"Image" : "Generic",
			"IsSubDevice" : false,
			"LastUpdate" : "2020-03-31 11:08:36",
			"Level" : 0,
			"LevelInt" : 0,
			"MaxDimLevel" : 100,
			"Name" : "GarageAlarm",
			"Notifications" : "false",
			"PlanID" : "0",
			"PlanIDs" : 
			[
				0
			],
			"Protected" : false,
			"ShowNotifications" : true,
			"SignalLevel" : "-",
			"Status" : "On",
			"StrParam1" : "",
			"StrParam2" : "",
			"SubType" : "Switch",
			"SwitchType" : "On/Off",
			"SwitchTypeVal" : 0,
			"Timers" : "false",
			"Type" : "Light/Switch",
			"TypeImg" : "lightbulb",
			"Unit" : 1,
			"Used" : 1,
			"UsedByCamera" : false,
			"XOffset" : "0",
			"YOffset" : "0",
			"idx" : "152"
		}
	],
	"status" : "OK",
	"title" : "Devices"
}

When pasting things in like a log use the </> option to cause it to format.

That said, how would anyone (but you) know there is any data missing?

Apologies. Now corrected.

I get everything shown under payload except the "result: "
Maybe some limitation with the http node?

What I get is

payload: object
ActTime: 1585652206
AstrTwilightEnd: "21:35"
AstrTwilightStart: "04:37"
CivTwilightEnd: "20:09"
CivTwilightStart: "06:03"
DayLength: "12:57"
NautTwilightEnd: "20:50"
NautTwilightStart: "05:22"
ServerTime: "2020-03-31 11:56:46"
SunAtSouth: "13:06"
Sunrise: "06:37"
Sunset: "19:35"
app_version: "2020.1"
status: "OK"
title: "Devices"
statusCode: 200

Is that all in msg payload? It looks ike payload is an object, does it expand in the debug?

What data are you missing ?
What do you see when you use curl on the commandline with the same url from the http request node ?

Yes msg.payload is an object. However msg,payload.result (and all items contained within) is totally missing from the debug window.

Above I have first posted the same http request from a browser and with this I get the full object including the "result" property.

can you provide your flow? (use the </> code tag so it will format correctly)

@bakman2
I have tried curl and I get all the information - exactly the same as from a browser shown above.
Node red debug misses out the "payload.result" property for some reason .

I have now solved my problem by using MQTT instead but I would love to know why http is not working.

Sure Here is the flow (username and password changed)

[{"id":"9d462d1f.7b935","type":"http request","z":"efd8e7c3.186d38","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"http://127.0.0.1:8080/json.htm?type=devices&rid=152","tls":"","persist":false,"proxy":"","authType":"basic","x":890,"y":1340,"wires":[["b7f1d503.4c26b8"]]},{"id":"ebd3acc3.015d9","type":"inject","z":"efd8e7c3.186d38","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":1340,"wires":[["9d462d1f.7b935"]]},{"id":"b7f1d503.4c26b8","type":"debug","z":"efd8e7c3.186d38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1090,"y":1340,"wires":[]}]

Looking at the output you posted above, it has payload.result

Can you post the output of the curl vs the debug output (make sure to set the debug output to complete msg object)

Complete message object from node red

msg : Object
object
_msgid: "ade3b875.2040c8"
topic: ""
payload: object
ActTime: 1585662426
AstrTwilightEnd: "21:35"
AstrTwilightStart: "04:37"
CivTwilightEnd: "20:09"
CivTwilightStart: "06:03"
DayLength: "12:57"
NautTwilightEnd: "20:50"
NautTwilightStart: "05:22"
ServerTime: "2020-03-31 14:47:06"
SunAtSouth: "13:06"
Sunrise: "06:37"
Sunset: "19:35"
app_version: "2020.1"
status: "OK"
title: "Devices"
statusCode: 200
headers: object
content-length: "410"
cache-control: "no-cache"
pragma: "no-cache"
access-control-allow-origin: "*"
content-type: "application/json;charset=UTF-8"
set-cookie: array[1]
0: "DMZSID=97244f38ca5a45060f5310a5eb191096_ZDhlMWFjNDMtMTUzYi00ZmZjLWJiM2YtZWQyZjY3NjcwNTcx.1585663026; HttpOnly; path=/; Expires=Tue, 31 Mar 2020 13:57:06 GMT"
x-node-red-request-node: "624a2abe"
responseUrl: "http://127.0.0.1:8080/json.htm?type=devices&rid=152"
redirectList: array[0]
responseCookies: object
DMZSID: object
path: "/"
Expires: "Tue, 31 Mar 2020 13:57:06 GMT"
value: "97244f38ca5a45060f5310a5eb191096_ZDhlMWFjNDMtMTUzYi00ZmZjLWJiM2YtZWQyZjY3NjcwNTcx.1585663026"

Curl

 {
        "ActTime" : 1585662600,
        "AstrTwilightEnd" : "21:35",
        "AstrTwilightStart" : "04:37",
        "CivTwilightEnd" : "20:09",
        "CivTwilightStart" : "06:03",
        "DayLength" : "12:57",
        "NautTwilightEnd" : "20:50",
        "NautTwilightStart" : "05:22",
        "ServerTime" : "2020-03-31 14:50:00",
        "SunAtSouth" : "13:06",
        "Sunrise" : "06:37",
        "Sunset" : "19:35",
        "app_version" : "2020.1",
        "result" :
        [
                {
                        "AddjMulti" : 1.0,
                        "AddjMulti2" : 1.0,
                        "AddjValue" : 0.80000000000000004,
                        "AddjValue2" : 0.0,
                        "Barometer" : 1032.7,
                        "BatteryLevel" : 94,
                        "CustomImage" : 0,
                        "Data" : "10.3 C, 48 %, 1032.7 hPa",
                        "Description" : "",
                        "DewPoint" : "-0.24",
                        "Favorite" : 1,
                        "Forecast" : 6,
                        "ForecastStr" : "Sunny",
                        "HardwareID" : 4,
                        "HardwareName" : "Mysensors LAN",
                        "HardwareType" : "MySensors Gateway with LAN interface",
                        "HardwareTypeVal" : 42,
                        "HaveTimeout" : false,
                        "Humidity" : 48,
                        "HumidityStatus" : "Comfortable",
                        "ID" : "0700",
                        "LastUpdate" : "2020-03-31 14:49:56",
                        "Name" : "Garden TempHumBaro",
                        "Notifications" : "true",
                        "PlanID" : "0",
                        "PlanIDs" :
                        [
                                0
                        ],
                        "Protected" : false,
                        "ShowNotifications" : true,
                        "SignalLevel" : "-",
                        "SubType" : "Weather Station",
                        "Temp" : 10.300000000000001,
                        "Timers" : "false",
                        "Type" : "Temp + Humidity + Baro",
                        "TypeImg" : "temperature",
                        "Unit" : 0,
                        "Used" : 1,
                        "XOffset" : "0",
                        "YOffset" : "0",
                        "idx" : "164",
                        "trend" : 2
                }
        ],
        "status" : "OK",
        "title" : "Devices"
}

Yes that is weird :robot:

Did you set the http request node to output json ? Do you see a difference (ie. result array) when it returns a utf-8 string ?

yes I tried both json and utf-8 outputs. Also json parser node. Still same - no result property.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.