helgeerbe / picframe

Picture frame viewer for raspi, controlled via mqtt and automatticly integrated as mqtt device in homeassistant.
MIT License
113 stars 32 forks source link

Synching several Picture Frames #418

Open sapnho opened 2 days ago

sapnho commented 2 days ago

It's Sunday morning, a bit rainy outside.. time for some new ideas around PictureFrame!

I wonder how it could be achieved that two or three frames, running in the same house/network, all running Pi3D PictureFrame, would show the same pictures at the same time?

All the photos can be synched across the different Pis but it would take a Master Pi3D PictureFrame Pi telling the Slave installations which picture to show.

Is that even possible with our architecture?

paddywwoof commented 2 days ago

At the moment the random list uses an sqlite function but if it was done using python then the seed could be stored and accessed by other RPis. I thought about this as a way to allow picframe to pick up from where it stopped but it could work for your Idea too. There would also need to be a sequence number and synchronisation time passed, possibly using v simple socket communication

helgeerbe commented 1 day ago

I think picframe has nearly everything on board. I would use the mqqt home assistant interface.

Übersicht_–_Home_Assistant
  1. Picframe slaves should subscribe to the master picframe image update message.
  2. on message trigger next.
  3. on image load, if slave read image from url
    
    from PIL import Image
    import requests

im = Image.open(requests.get(url, stream=True).raw)


4. on metadata read, if slave, take data from mqtt message.

Advantage is, that you don't have to deal with synchronize your image pool. What's on master picframe will be displayed on slaves.