Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues about "subscribe" API in WebSocket with Meshblu 4.0.1 #142

Closed
cydemily opened this issue Jan 18, 2017 · 1 comment
Closed

Issues about "subscribe" API in WebSocket with Meshblu 4.0.1 #142

cydemily opened this issue Jan 18, 2017 · 1 comment

Comments

@cydemily
Copy link

Hello,
I met below issues on “subscribe” function in WebSocket protocol by using Meshblu 4.0.1 instead of Meshblu 1.18.4.

Test scenario:

  1. Register devide#1 and device#2 with WebSocket protocol, and add device#1 into device#2’s whitelist.
  2. Device#2 subscribes device#1, and set it online.
  3. Set device#1 online, note that device#2 did not receive any message from device#1.
  4. Set device#2 offline, note that device#2 did not receive any message from device#1.

But I really need device#1 online and offline broadcast message as below to notify other devices about the status of device#1.

Is this a bug or new feature?

Device online broadcast message:
3

Device offline broadcast message:
4

@cydemily
Copy link
Author

cydemily commented Feb 9, 2017

Solved.

solution:

  1. Add device online message:
    ① Found the file: meshblu-core-protocol-adapter-websocket/src/websocket-handler.coffee
    ② Added the setOnlineStatus function.
    ③ In onIdentity function, call setOnlineStatus function.

  2. Add device offline message:
    ① Found the file: meshblu-core-protocol-adapter-websocket/src/websocket-handler.coffee
    ② In onClose function, call setOnlineStatus function.

@cydemily cydemily closed this as completed Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant