@GizmoThe more I'm getting into things, I'm finding it could be very beneficial if I could somehow store values that my device could read. They could be simple constant name|value pairs. Things like threshold values, boundary values, limit values, IDs, tokens, etc.
For example, lets say I'm logging temp and humidity sensor values to google sheets. In addition to logging, I'm also acting on those sensor readings (firing events, printing on a display, turning on an LED, etc) based on debounce boundaries, value thresholds, etc.
Rather than hard code those values, spreadsheet ID, base URLs, etc, it would be awesome if I could enter such values into Dev Console that my devices code could read at startup, or from a device push event manually trigged from Dev Console.
This way I can fine tune and adjust such settings without having to make a code change and deploy to device. It also allows me to keep ID/Tokens/etc stored centrally (and available to all my devices) and not buried in my devices code.
Think it would be good to have global values (any device in the account can access) and device level values (only the current device can access).
In device, I imagine getting them something like...
// For current device vars
ChipChop.getDeviceVars(); // Get all vars (array)
ChipChop.getDeviceVars("DebounceTimer"); // Get a specific var by name
// For global vars
ChipChop.getGlobalVars(); // Get all vars (array)
ChipChop.getGlobalVars("SomeToken"); // Get a specific var by name
I would probably request them after ChipChop connects. After that point, probably only request them after getting a request to do so from me using the send command to entire device feature for example.
I dont think there would be need to write to the values from device code.
Thanks for hearing me out IoT slayer!