Use case: synchronization of an asynchronous master system communicating with a network of VSCP nodes #276
-
Hi Åke, Please tell me how, using VSCP Level I messages, to handle the following case:
Maybe you have already included such a case in the protocol, but I can't find it, so please tell me how to solve it. P.S. The solution with MQTT persistent messages, is also not advisable, it will work, but here it will only be a patch, not a real solution for VSCP network. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, as you write persistent messages/event over MQTT can be used as MQTT is one possible transport. But the problem is the same there to if the broker go down. State changes while it is down does not benefit from persistent messages. Best IMHO is to read the current state from the (known) modules at startup on a node that need to know the last state of a node. Normally this is just a standard register read, and it is almost equally fast as reading some local stored values. Another method is to send (CLASS1-CONTROL, VSCP_TYPE_CONTROL_SYNC)[https://grodansparadis.github.io/vscp-doc-spec/#/./class1.control?id=type26] (or some other event of choice) to all nodes on start up and have them report there state. This can be programmed with the decision matrix of a device or be built in the nodes functionality. (CLASS1-CONTROL, VSCP_TYPE_CONTROL_SYNC)[https://grodansparadis.github.io/vscp-doc-spec/#/./class1.control?id=type26] was added to synchronizing measurements in a scenario where you have many nodes that report measurements, and you need to get them as close in time as possible. It works equally well for states. Personally, I use both methods. |
Beta Was this translation helpful? Give feedback.
Hi, as you write persistent messages/event over MQTT can be used as MQTT is one possible transport. But the problem is the same there to if the broker go down. State changes while it is down does not benefit from persistent messages.
Best IMHO is to read the current state from the (known) modules at startup on a node that need to know the last state of a node. Normally this is just a standard register read, and it is almost equally fast as reading some local stored values.
Another method is to send (CLASS1-CONTROL, VSCP_TYPE_CONTROL_SYNC)[https://grodansparadis.github.io/vscp-doc-spec/#/./class1.control?id=type26] (or some other event of choice) to all nodes on start up and have them repo…