Hi,
I’m trying to subscribe to MQTT topic with BC_RADIO_SUB_PT_STRING payload type, but callback function is never called. When I send same message, but change type to _INT, it is called just fine. And all other topics I use (int and float) are working fine. Am I doing something wrong?
This for some reason doesn’t work even though it is valid JSON payload.
PS: I would really appreciate some SDK documentation, where I could just read such critical details along with some examples… it would save me hours of experimentation, reverse engineering SDK code, googling and banging my head on desk with frustration
Using individual topic endpoints for all values is not really an option for me, as there will be like 10+ possible values in JSON payload and 10 configuration endpoints (I have 9 PWM channels and using “0”-“8” instead of “-” in topic name configures individual channel, while “-” propagates configuration to all channels). That would require 100+ topic subscriptions just for configuration and more complex configuration provisioning implementation. And some values are arrays to complicate things even more.
I would like to be able to use standard JSON libraries for preparing message payload, so if I got it right, I have following options:
tunnel JSON payload through JSON string value by having some translation service forwarding messages from lets say “node-json/#” to “node/#” using base64 or escaping and create library for decoding it in firmware,
patch bcg to skip JSON validation for string values,
patch bcg and SDK to add support for BC_RADIO_SUB_PT_JSON payload type,
I guess I have to go with option 2 (even though I don’t like it), as option 1 would increase text+bss memory usage in firmware and is more error prone. And I don’t have neither knowledge nor time for implementing option 3.
BTW, is there some official way to request implementation of option 3?