[RELEASE] Hub Information Driver

PanID, as I understand it, is essentially the zigbee equivalent of a wifi SSID so it being null...

1 Like

I was seeing the same thing on one of my two hubs. Rebooting the hub seems to resolve the issue.

Since the channel should be 0x0B (11) - 0x1A (26) it may make sense for me to report it as NA if it comes back out of that range.

Edit: v2.2.4 now returns NA if channel is not valid.

4 Likes

@waynespringer79 Hello, I have this exaxct same issue, how did you fix it?

I don't have a clue what post you are referencing as this is an older thread which I had multiple posts on?

@waynespringer79
I am getting the parse error in node red.

Which is this node here

[
{
"id": "6926f499.78b3cc",
"type": "function",
"z": "a54023f9.b4d1c",
"name": "",
"func": "var newMsg = {};\nvar fields = {};\nvar tags = {};\nvar myArray = [fields, tags];\n\n//myArray[0].test = "test1";\n//myArray[1].grade = "grade1";\n//node.warn(msg.payload.value);\n//node.warn(Number(msg.payload.value));\n\nif (!isNaN(Number(msg.payload.value))) {\n msg.payload.value = Number(msg.payload.value);\n}\n\n// Add measurement\nnewMsg.measurement = msg.payload.name \n\n// Add fields\nmyArray[0].value = msg.payload.value;\n\n// Add tags\nmyArray[1].deviceName = msg.payload.displayName;\nmyArray[1].deviceId = msg.payload.deviceId;\nmyArray[1].attribute = msg.payload.name;\nmyArray[1].desc = msg.payload.descriptionText;\nmyArray[1].unit = msg.payload.unit;\nmyArray[1].type = msg.payload.type;\nmyArray[1].hub = msg.payload.hub;\n\n// Attach payload\nnewMsg.payload = myArray;\n\nreturn newMsg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 560,
"y": 440,
"wires": [
[
"fc2c1e37.e2642"
]
]
}
]

There were a couple of the attributes it did not work for on getting rid of the error. Don't remember exactly which ones pretty sure "hub uptime" was one of them. I didn't really need their info so I removed those.

Not sure why this always happens. Can you show me the function please?

Ya I never can seem to get that right on the forum posts.


function1

Do I just put that in the function? Can you copy and paste it for me, so I don't have to retype it?

var newMsg = {};
var fields = {};
var tags = {};
var myArray = [fields, tags];

//myArray[0].test = "test1";
//myArray[1].grade = "grade1";
//node.warn(msg.payload.value);
//node.warn(Number(msg.payload.value));

if (!isNaN(Number(msg.payload.value))) {
msg.payload.value = Number(msg.payload.value);
}

// Add measurement
newMsg.measurement = msg.payload.name

// Add fields
myArray[0].value = msg.payload.value;

// Add tags
myArray[1].deviceName = msg.payload.displayName;
myArray[1].deviceId = msg.payload.deviceId;
myArray[1].attribute = msg.payload.name;
myArray[1].desc = msg.payload.descriptionText;
myArray[1].unit = msg.payload.unit;
myArray[1].type = msg.payload.type;
myArray[1].hub = msg.payload.hub;

// Attach payload
newMsg.payload = myArray;

return newMsg;

Yes it's in a function node

Thank you, So I just put that in here like this and I am good to go?

That's what I did.

1 Like

Thank you so much, will let you know in a couple min what happens.

Go figure, this did not solve my issue.

I still got errors on a few attributes (and decided to just delete those) I believe mainly ones with words not numbers if I remember right.

Other than that I'm not anywhere close to the knowledge you might need in this area.

Any body having this issue? I am getting these errors from all 4 hubs. and it is mostly all the nodes, no just this one.

Error: A 400 Bad Request error occurred: {"error":"unable to parse 'main_cpu5minload currentValue=0.3,data=null,dataType="NUMBER",descriptionText=null,deviceId="4071",displayName="Hub Information - Main",name="cpu5Min",type=null,unit=null,value=0.3': invalid number"}

What processing are you doing on the node? A normal payload would look similar to:

{"name":"cpu5Min","currentValue":0.19,"dataType":"NUMBER","value":0.19,"deviceId":"863"}

but you have

...name="cpu5Min",type=null,unit=null,value=0.3': invalid number

None, this is my flow, was working fine, don't understand what changed.

I just don't understand, I put a debug on it and the payload looks good to me?

{ name: "temperature", currentValue: 104, dataType: "NUMBER", value: 104, deviceId: "4071" }