FUXA icon indicating copy to clipboard operation
FUXA copied to clipboard

MQTT subscription to array

Open jcxjcx123 opened this issue 2 years ago • 9 comments

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? pic1 pic2

jcxjcx123 avatar May 25 '22 07:05 jcxjcx123

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 avatar May 25 '22 19:05 unocelli

@unocelli how can such a script looks like?

Schrolli91 avatar Jun 08 '22 14:06 Schrolli91

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 ;) )

superkalt avatar Jun 08 '22 18:06 superkalt

still need a feature to get data from inside. how can your mentioned script looks like? @unocelli

Schrolli91 avatar Apr 26 '23 10:04 Schrolli91

Hi, you have to define the topic image

and in script you can ask image

unocelli avatar Apr 26 '23 21:04 unocelli

Is there a manual for the script?

jingshui127 avatar Jul 25 '23 00:07 jingshui127

Hi, we have nothing yet. you can try in discord

unocelli avatar Jul 25 '23 18:07 unocelli

i tried this and it gives me a 400 Bad Request error

catalinzeb avatar Feb 19 '24 13:02 catalinzeb

@catalinzeb you have probably not configured correctly

unocelli avatar Feb 23 '24 21:02 unocelli