FUXA
FUXA copied to clipboard
MQTT subscription to array
Hi!
When I subscribe to a topic using MQTT, I find that the parsed content is an object, which is actually a string. Is there a problem with the data format?
Hi, the problem is the array...currently is not supported. there is a work around that is a bit tricky: you can make the subscription as a raw (string) and then make a script that converts and assigns to tags on the FUXA server
@unocelli how can such a script looks like?
hi,
why don't you use nodered to bridge the gap? read in the json´s, break them up into small bits and output them again with a own topic.
it doesn't matter to the broker whether he has to process 1000 or 10000 messages (per second ;) )
still need a feature to get data from inside. how can your mentioned script looks like? @unocelli
Hi, you have to define the topic
and in script you can ask
Is there a manual for the script?
Hi, we have nothing yet. you can try in discord
i tried this and it gives me a 400 Bad Request error
@catalinzeb you have probably not configured correctly