Hi All,
I’m working on adding support for image snapshots for the Ring binding. I know how to download a JPG from the Ring API - but I’ve never worked with an Image channel.
Wondering if there are any good examples of retrieving a JPG and sending it to an Image channel?
Thanks,
Paul
Whilst I’m at it - the ring binding currently uses jetty for http - and returns a string, I guess I need some sort of binary format….
Edit: I have this working now - GitHub - psmedley/openhab-addons at ring-snapshots
Still needs more testing and cleaning up - particular the upgrade of channels.
ubeaut
(Greg)
January 25, 2026, 7:38am
3
I send images via mqtt.
I set up an item as an image type.
I have a script that uses the -f option in mosquitto:
mosquitto_pub -h 192.168.1.164 -t zoneminder/latest -f "$OUTFILEJPG"
AndrewFG
(Andrew Fiddian-Green)
January 25, 2026, 9:21am
4
I am not sure if it is a “good” example but here is one that I am working on. It may give you some ideas. Or you may see something wrong and give me some ideas..
main ← andrewfg:homekit-image
opened 01:37PM - 11 Jan 26 UTC
This PR adds a camera snapshot channel of type 'Image' for IP camera devices.
…
A forum user has kindly tested it and confirmed that it works [here](https://community.openhab.org/t/announce-new-homekit-client-binding/167164/66).
<details>
<summary>Open Topics List (all now completed)</summary>
- [x] The channel delivers a 640x360 image by default. The channel `imageWidth` and `imageHeight` configuration parameters can optionally change this.
- [x] The binding depends on OH Core RefreshType.REFRESH commands, which are not sent by a browser refresh. The user can implement a dummy item and a rule to send refresh commands as shown below.
```java
rule "Trigger refresh when switch is toggled"
when
Item MyRefreshSwitchItem received command
then
// Refresh switch activated, sending REFRESH to image item
MySnapshotImageItem.sendCommand(REFRESH)
end
```
</details>
The JAR file for testing is here:
- [org.openhab.binding.homekit-5.2.0-SNAPSHOT.zip](https://github.com/user-attachments/files/24794919/org.openhab.binding.homekit-5.2.0-SNAPSHOT.zip)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
1 Like
Lolodomo
(Lolodomo)
January 25, 2026, 9:24am
5
You just have to declare a channel accepting Image as item type then you can update your channel like that for example.
if (newState != null) {
updateState(channelId, newState);
}
}
private void updateAlbumArtChannel(boolean allGroup) {
String url = getAlbumArtUrl();
if (url != null) {
// We download the cover art in a different thread to not delay the other operations
scheduler.submit(() -> {
RawType image = HttpUtil.downloadImage(url, true, 500000);
updateChannel(CURRENTALBUMART, image != null ? image : UnDefType.UNDEF, allGroup);
});
} else {
updateChannel(CURRENTALBUMART, UnDefType.UNDEF, allGroup);
}
}
private void updateChannel(String channeldD, State state, boolean allGroup) {
if (allGroup) {
for (String member : getZoneGroupMembers()) {
Note that it uses an util method from OH core framework to download the image.
1 Like