Use MQTT topic as an image source
hmorkemo opened this issue · comments
Showing images in a panel is quite static, and the image files have to be locally stored.
I want to be able to send images from HA to the screen.
One solution to this is in PR #643, but it appears to have limitations due to memory usage and possible loss of OTA upgrades on older screens.
A better solution, I think, would be to have the image src parameter listen to an mqtt topic. (Ref #643, which is a good idea in itself).
Then I could say { id: "p2b10", obj: "img", ... , src: "mqtt:weatherforecast1" }
In HA I would then publish to mqtt { topic: "hasp/panel1/weatherforecast1", payload: theimage }.
The image format should be png or whatever OpenHASP can handle, encoded in a standard way.
I don't have a better way. I am using sending a weather image using automation HA
service: openhasp.push_image
target:
entity_id: openhasp.ovladac3
data:
image: http://1xx.1x.x.xx:8123/local/pocasi/Blesky.png
obj: p1b2
width: 120
height: 120
fitscreen: true