@jkandasa Actually without going in edit you don't have anything telling you if this GW uses ack. Enabled / disabled would be enough for me.
Posts
-
RE: MyController 1.2.0-SNAPSHOT version with major provider changes and supports for ack
-
RE: Your suggestions to choose naming for "sensor" and "variable"
@jkandasa Maybe I misunderstood the meaning of this class, but what about "message" instead of "field"?
-
RE: MyController 1.2.0-SNAPSHOT version with major provider changes and supports for ack
You're super-quick!!!
I updated the version, and now the issue is fixed.
For the time being everything is running fine, I'll let it run for a pair of days and let you know if I find any issue.By the way, I suggest adding something in this page to expose the ack flag status:
-
RE: Your suggestions to choose naming for "sensor" and "variable"
@skywatch source and value looks very good to me!
-
RE: automatic backup
I can confirm that with 23 hours the scheduler works perfectly now!
Thanks a lot! -
RE: notification on node down status
@jkandasa I managed to get the result using a slightly different approach. I saved previous node state in a repository variable, then looped over the nodes list and compared actual state with previous one, sending en email only when state changes.
I'm not a java programmer, so any suggestion on the code is more than welcome:
var myImports = new JavaImporter(java.io, java.lang, java.util,java.lang.Object, org.mycontroller.standalone.utils.McUtils); with(myImports) { var options = new HashMap(); options.put("orderBy", "Eui"); options.put("order", "asc"); options.put("pageLimit", new Long(-1)); // -1 to list all the nodes var nodes = mcApi.node().getAll(options); var nodesVar = mcApi.variable().get("Nodes state"); var nodesOU = JSON.parse(nodesVar.value); var nodesOD = JSON.parse(nodesVar.value2); var nodesU = []; var nodesD = []; var subject = "[MyController] Nodes status"; var messageU2D = ""; var messageD2U = ""; var message = ""; for (i = 0; i < nodes.data.length; i++) { var nodeStatus = new Object(); nodeStatus['key'] = nodes.data[i].getGatewayTable().getId() + '-' + nodes.data[i].getEui(); nodeStatus['state'] = nodes.data[i].getState(); if (nodeStatus['state'] == "UP") { nodesU.push(nodeStatus['key']); var prevState = ""; for (j = 0; j < nodesOU.length; j++){ if (nodesOU[j] == nodeStatus['key']) prevState = "UP"; } if (prevState != "UP") messageD2U += nodes.data[i].getEui() + " : " + nodes.data[i].getName() + " : " + mcApi.utils().friendlyTime(nodes.data[i].getLastSeen()) + "<BR>"; } if (nodeStatus['state'] == "DOWN") { nodesD.push(nodeStatus['key']); var prevState = ""; for (j = 0; j < nodesOD.length; j++){ if (nodesOD[j] == nodeStatus['key']) prevState = "DOWN"; } if (prevState != "DOWN") messageU2D += nodes.data[i].getEui() + " : " + nodes.data[i].getName() + " : " + mcApi.utils().friendlyTime(nodes.data[i].getLastSeen()) + "<BR>"; } } if (messageU2D != ""){ message += "Nodes DOWN: <BR>"; message += messageU2D; } if (messageD2U != ""){ message += "Nodes UP: <BR>"; message += messageD2U; } if (message != "") // mcApi.operation().sendPushbulletNote(null, "abc@xyz.com", null, subject, message); mcApi.operation().sendEmail("abc@xyz.com", subject, message); nodesVar.value = JSON.stringify(nodesU); nodesVar.value2 = JSON.stringify(nodesD); nodesVar.save(); }
-
RE: Unique index or primary key violation: "CONSTRAINT_4B_INDEX_4 ON PUBLIC.METRICS_DOUBLE_TYPE_DEVICE
@jkandasa it's probably related to some gateway issue, probably connected to the issue I asked here
I made a hard restart of the gateway and now the error disappeared.
Thank you! -
RE: Communication between 2 pi each running mycontroller
@skywatch you could probably exchange messages thru MQTT queues, but being you I'd really invest my energies understanding how to use 2 gateways, since this is the standard way and you'll probably get more support for the community.
By the way, I have 4 gateways in my home (due to connectivity issue caused by concrete walls) and I never had issues with that in MyController. -
RE: Frequent errors related to Ethernet Gateways
@jkandasa I restart MyController Raspberry regularly (scheduled once per week), I tried doing that manually but nothing changed.
No changes on the router, but you made me remember I recently re-uploaded the sketches of my gateways and in this way I upgraded their mysensors library version.
I'll try downgrade one of them and see if this helps.