You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find a way to understand when a device is connected or not.
When we use MQTT it is easier. We can understand when the physical is connected or not. But, we need to set up a specific channel or service call for that, so that we can understand the mesage comes from the physical device and not from another MQTT client. As far as the MQTT physical device must be able to update the device (still he is not able to do that), if we add a property he can update, things should be fine.
And about the disconnection, we set the device as disconnected when the client who has updated the connect status, get disconnected. Think more anout and try to simplify. Maybe we can generalize and set the value on connection (theoretically there is a unique physical device) and the same for the disconnection.
For the physical devices connected in other way we need a way common way to understand if a device is or is not connected. This may come in a second moment and we should think if it is needed for devices that can't communicate when they are connected or not.
The text was updated successfully, but these errors were encountered:
We will use this property as a property that the physical device or an app can change, but at first we'll enable it only for the devices connected with MQTT. Actually the Mosca server has two funtions that can be used to check the connection of the device.
// when a client connect (we can check the username)server.on('clientConnected')// when a client disconnect (we can check the saved username)server.on('clientdisconnected')
Find a way to understand when a device is connected or not.
When we use MQTT it is easier. We can understand when the physical is connected or not. But, we need to set up a specific channel or service call for that, so that we can understand the mesage comes from the physical device and not from another MQTT client. As far as the MQTT physical device must be able to update the device (still he is not able to do that), if we add a property he can update, things should be fine.
And about the disconnection, we set the device as disconnected when the client who has updated the connect status, get disconnected. Think more anout and try to simplify. Maybe we can generalize and set the value on connection (theoretically there is a unique physical device) and the same for the disconnection.
For the physical devices connected in other way we need a way common way to understand if a device is or is not connected. This may come in a second moment and we should think if it is needed for devices that can't communicate when they are connected or not.
The text was updated successfully, but these errors were encountered: