Custom widgets/values?

Is it possible to send custom values to a value widget? As in not a pin value per-se but something interpreted or otherwise supplied by the device? I want to set up a relay box for my raspberry pi’s and it would be nice to be able to have the same device controlling the relays occasionally poll the pis when they are on to return basic information such as uptime, system-load, free disk (basic nagios type stuff) so I could see it in the same app that controls the power (below each button)

If there’s not an existing way to do it, having not dove into the source code yet does anyone have a suggestion on where I might start looking to customize it myself?

Yes. You can send any value to the widget.

You may use HTTP API for example.

The documentation is always a good start :stuck_out_tongue_winking_eye:


Virtual Pin data types
The actual values are sent as strings, so there are no practical limits on the data that can be sent.
However, remember the limitations of the platform when dealing with numbers. For example the integer on Arduino is 16-bit, allowing range -32768 to 32767. You can interpret incoming data as Integers, Floats, Doubles and Strings:

param.asInt();
param.asFloat();
param.asDouble();
param.asStr();

You can also get the RAW data from the param buffer:

param.getBuffer()
param.getLength()