HEADS-project / heads_ide

http://heads-project.eu
9 stars 2 forks source link

Kevoree MQTT onTopicAndMsg serialisation #88

Closed kehusa closed 8 years ago

kehusa commented 8 years ago

When receiving messages from MQTTSubClient on port onTopicAndMsg I get the following content: {"topic":"sensor/button","message":{"type":"Buffer","data":[49,48,50]}} The topic part is ok, but I don't understand how to deal with the message part

When receiving messages from MQTTSubClient on port onMsg I get: 102(which is what I expect)

Why is the serialisation different?

brice-morin commented 8 years ago

Is the raw data OK in the code generated from ThingML? Is it still OK just before sending on the Kevoree port?

kehusa commented 8 years ago

ThingML does not make any changes to the message content. It is equal on the MQTTSubClient port and inside the ThingML component.

maxleiko commented 8 years ago

@kehusa do you use the Java or the Javascript version of the MQTTSubClient ?

maxleiko commented 8 years ago

MQTTSubClient v2.0.2 should fix this issue.

kehusa commented 8 years ago

tested and works, thanks