-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json object return type #25
Comments
The MQTT server can already store arbitrary JSON objects in arbitrary topics. For this, the retain flag of the message must be set. The payload must be structured as follows: Another idea is to use a CCU system variable of type string to store and retrieve a stringified JSON object. |
MQTT retain would require to set it up once on startup. Thus I would have the necessity of a startup routine which holds the configuration. I want to keep the ui config (and ideally the broker IP, too) out of the react app. I would appreciate the "string" variable path. For this I dont need the mqtt access, as the config might be big (currently I fetch it on load initially and create a device tree context with paths similar to the mqtt topics. So the value updates are done on mqtt websocket receive. |
This is already all possible as follows: When loading the application, the configuration can be read out from a specific system variable via HTTP-GET, e.g. on the address If the web application is provided by the CCU-Jack itself, the host name does not have to be configured. The web application can be copied into the subdirectory |
Thanks for clarification (and the web app path tip). For the record: Placing JSON in a string variable can cause code (JS) injection if someone is able to set the variable. Sparetime is rare but it works currently this way... |
Hi,
may be I missed it - I would like to use some variable as complex JSON object. That means in contrast to the measurements and status values, I'd like to save a config for my webui within a variable.
This together with MQTT websockets (currently I use twistd+autobahn on localhost for testing) would move on my own LCARS like GUI (attachment). I would use it for the configuration of the GUI on load.
BR
Plurax
The text was updated successfully, but these errors were encountered: