I am using Blue Iris with some IP cameras around the home. I have some picture-glance cards with the following configuration, these are working properly:
- type: picture-glance
title: Front Door
entities: []
camera_image: camera.front_door
I am wondering how could I send the “camera_image: camera.front_door” to an MQTT Payload.
Any help would be highly appreciated.
My automation would be something like this, but I have no idea what to put into the payload. :
This would require a custom component, which would either post a saved file over mqtt, or added a service to the camera integration. You can take code from https://github.com/robmarkcole/mqtt-camera-streamer
Thank you @robmarkcole! Probably I will write a shell script to save an image and send that image over MQTT. I will post it here once I am done with it.
I almost solved the problem, the only remaining issue is to send the image to Zanzito via MQTT photonotification. I am always getting an “Error receiving image” message in the Zanzito log and not sure how to fix/debug it.
Anyone knows if it is the proper way to send an image to an MQTT topic? I refer to the end of my script below. Thanks in advance!
What I did:
Created a shell command in configuration.yaml. This command is putting together the 3 captured camera snapshot into a short gif image:
So I figured out how you could post the camera image over mqtt. You would create a new service which is a small edit of the camera snapshot service (defined inasync_handle_snapshot_service). The approximate code would be:
Thanks a lot @robmarkcole! You are awesome, I might going to give it a shot.
Actually, I ended up configuring HTML5 Push notifications and using that to send an image notification to my phone. So far it is working great. The only issue that I am creating a gif and it is showing only as an image (the first frame of the gif) in the push notification.