#/ subscription is enable

4 years 4 months ago #3333 by maesa
Replied by maesa on topic #/ subscription is enable
Additional info (tested on another module):
If I use the default MQTT topic, i.e. /Db/56[..]22/4/Sensor.Parameter1, everything is fine.
If I use the same value as custom MQTT topic, i.e. /Db/56[..]22/4/Sensor.Parameter1, everything is fine.
If I change this custom MQTT topic, e.g. replacing the "/4/" with a "/E/" giving /Db/56[..]22/E/Sensor.Parameter1, then my client is disconnected.

Note that even if I give a fully custom MQTT topic to a module (e.g. /MyTopic) to which I can then publish but not listen, the standard MQTT Topic is still working, i.e. /Db/56[..]22/1/Sensor.Parameter1 (if I suppose that my module number is 1).

So, I assume that, in your code, as soon as you find /XX/YY/ZZ/ that is 32 characters long, you interpret ZZ as a module ID and (according to my tests) you do not actually take XX and YY into account... Is this correct ?

Please Log in or Create an account to join the conversation.

4 years 4 months ago #3335 by EasyIoT
Replied by EasyIoT on topic #/ subscription is enable
EasyIoT Cloud is build that way, that it always displays data posted to Sensor.ParameterX in user interface widget. If you combine more data in one parameter it wont be displayed correctly. If you want to post more data wit one post use REST API and function set parameter values. With this function you can send more parameter data with one call.

Regarding MQTT API - it will be soon simplified - topic prefix /Db/[instance id] will be removed. You will be able to use also your own topic, /# or /mytopic/#

Please Log in or Create an account to join the conversation.

4 years 4 months ago #3336 by maesa
Replied by maesa on topic #/ subscription is enable

EasyIoT wrote: Regarding MQTT API - it will be soon simplified - topic prefix /Db/[instance id] will be removed. You will be able to use also your own topic, /# or /mytopic/#


Great. Will you also allow /mytopic/subtopic/# ?
Let us know when implemented, so we can update our code accordingly...

Please Log in or Create an account to join the conversation.

4 years 4 months ago #3360 by EasyIoT
Replied by EasyIoT on topic #/ subscription is enable

maesa wrote:

EasyIoT wrote: Regarding MQTT API - it will be soon simplified - topic prefix /Db/[instance id] will be removed. You will be able to use also your own topic, /# or /mytopic/#


Great. Will you also allow /mytopic/subtopic/# ?
Let us know when implemented, so we can update our code accordingly...


We updated server. Topic prefix /Db/[instance id] is no more needed. Also you do not need myMqtt.subscribe("/Db/InstanceId"); any more. In all programs simply remove /Db/[instance id] in topic. Program example with new MQTT is here iot-playground.com/blog/2-uncategorised/...mqtt-api-v1-improved
Also you can use any custom topic. Just be careful to enter custom topic in parameter configuration.

Please Log in or Create an account to join the conversation.

Time to create page: 0.234 seconds

Forum latest

  • No posts to display.