I am working on a custom device which will display a snapshot graffic from my Grafana server.
I get the image data and encode it with base64
I can store the image in an attribute of the device.
And when I check device on the device list I can see the image on device properties page in the list of attributes.
But I can't get it to display on my dashboard.
On the dashboard I select the device and then use "attribute" parameter and select the correct attribute name. But it shows "please select an attribute"
I am not sure if I define the device attribute correctly.
I use following code:
attribute "lineqimg", "string"
def displayImage = '<img src="data:image/png;base64,' + encodedImage + '">'
sendEvent(name:"lineqimg", value:displayImage)
I also tried using "image" as attribute type but it did not differ.
attribute "lineqimg", "image"
def displayImage = '<img src="data:image/png;base64,' + encodedImage + '">'
sendEvent(name:"lineqimg", value:displayImage)