Private Sub mqtt_MessageArrived (Topic As String, Payload() As Byte)
If selected_device_id=Topic Then
Dim obj() As Object=rser.ConvertBytesToArray(Payload)
Dim case_type As String=obj(0)
If case_type="im_online" Then
DateTime.DateFormat="yyyy-MM-dd HH:mm:ss"
Dim date_now As String=DateTime.Date(DateTime.Now)
sql1.ExecNonQuery2("UPDATE tbl_location SET datetime_online=? WHERE device_id=?",Array As String(date_now,Topic))
End If
End If
End Sub