MQTT payload with base64 encoded image

I’ve got an app that feeds mqtt with a json payload for an event that happen on my camera, and I’ve altered it to now post an image to mqtt. THis is picked up by mqttwarn and posted to pushover…but I thought it would be nice to grab that image and show it in openhab as a “last event” on the camera.

Is there just some magic that will allow me to use that image (base64 encoded) as an image item, or do I need some sort of rule to convert it from base 64 to an image binary for displaying in an item?

I can’t find where in the docs that I read this, but I’m 90% certain the base64 is what the Image Item expects. Maybe I saw that on the forum somewhere. So you should be good to go. Just put the Item on your sitemap using the Image element and your Image Item for the item.

If you get it to work, a brief tutorial would be appreciated. The docs clearly need to be updated.

1 Like