I think I just got it working by changing the message from "payload" to "entire message"
I had the socket already created and was just copying the rest of the flow from @dan.t.
But thanks for the steps above...didnt know about 2 or 4
@dan.t for contact sensor, are you able to show in grafana both open and closed state? I am only seeing the close state only. I think the code is sending the status for both open and closed events right?
yes, I do get my contact sensors reported correctly. You could temporarily add a debug output to your Node-Red flow and see if it gets reported correctly on your end. Something like this:
@btk, your HE performance monitoring is awesome! Thanks.
One suggestion: I would add a time filter in front of the reboot action to exclude any time between 02:00 am and 03:00 am. HE does it's housekeeping and backups during that time and might be slow responding. You don't want to restart the Hub during a backup.... Happened to me last night
Good idea. I'm adding a bunch of extra logic to this flow like requiring multiple consecutive >30s response times for a reboot. I'll take this into account as well.
Not near a computer right now but will check on it ASAP. I donβt have the need to record a 3 axis device so need to play with it for a bit. Only added it for completeness in the first place.
I changed that section as showen below and still get errors. Any suggestions?
else if(msg.name == "threeAxis") {
var vz = msg.value.split(',');
var x = vz[0];
var y = vz[1];
var z = vz[2];
v.value = {
x: vz[0],
y: vz[1],
z: vz[2]
};
v.isBinary = false;
}
Not yet. For now I just commented out the if section until I can troubleshoot it a bit more. Personally, I could care less about my three axis data in InfluxDB. I only have two sensors that report it right now anyhow.