Adding metadata to device functions / variables to help render client-side UI elements #2692
NicoPowers
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi There!
I am have been using Particle for some customer projects so far, and everything has been great! Now I am building out a custom dashboard, and I was wondering if it would be possible to add some state metadata to device functions and variables to assist with rendering client-side UI elements.
For instance, it would be nice to signify if a function should be represented as a button, switch, text input, number input, etc., along with a predefined set of arguments that would represent enabled/disabled states (for a UI switch in this case). Also, it would be nice if we can point to variables that represent the current value of what functions interact with and what unit of measurement they represent; that way we can effectively define what states our devices have and we can properly render / control our UI components accordingly.
Ideally our firmware would export device states that leverage the defined functions and variables, and we would declare what variable correspond to what functions.
Having a single source of truth in our firmware would make it much easier to build out scalable solutions for different firmware versions, as the UI with render dynamically depending on the function's metadata (this would be a separate property that is returned from the API).
Not sure if this would require a larger effort on the particle console / REST API side of things, but this would be a super neat feature to have.
Thoughts on this?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions