octoblu / meshblu

Meshblu is a cross-protocol IoT machine-to-machine messaging system.
https://meshblu.readme.io/
MIT License
816 stars 181 forks source link

Issues about "update" API in WebSocket / HTTP protocol with Meshblu 4.0.1 #140

Closed cydemily closed 7 years ago

cydemily commented 7 years ago

@chrismatthieu,

I met the issues on update function in WebSocket/Http protocol with Meshblu v4.0.1.

Test environment:

  1. Meshblu v4.0.1 on github. [https://github.com/octoblu/meshblu]

Test scenario:

  1. Register device#1 with WebSocket protocol.
  2. Update the device using UPDATE API to update itself.
  3. Observe that the response message is ["updated",null] after successfully update the device#1 record.
  4. According to WebSocket API doc located in [https://meshblu-websocket.readme.io/docs/update], it should return “config” and “updated” JSON array message without null.

Also, tested device#1 using HTTP protocol to update itself, but I did not receive any response message even updated successfully, whose behavior is different mentioned in meshblu-http API docs. [https://meshblu-http.readme.io/docs/devices]

To verify this issue, I test this APIs with below scenario, and pasted the result. Please help look into it to confirm with this is new feature of existing bug.

Look forward to your reply. Thanks! 1

cydemily commented 7 years ago

Solved.

solution:

  1. Found the file meshblu-core-protocol-adapter-websocket/src/handlers/update-handler.coffee

  2. Only modified the callback of jobManager.do function changed callback null, 'updated' into callback null, 'updated', uuid:query.uuid