helgeerbe / picframe

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

Problem with MQTT #402

Open meirmark opened 1 month ago

meirmark commented 1 month ago

Hello. I installed the picframe program on a Raspberry Pi 3B and everything works fine, when I enabled the mqtt and reboot the pi the computer starts up and instead of showing a picture, the screen is black and nothing happens. I don't know LINUX at all and I copied and pasted according to the instructions on : https://www.thedigitalpictureframe.com/how-to-build-the-best-raspberry-pi-digital-picture-frame-with-bookworm-and-pi3d-picframe-2024-edition/

Please help.

Stef-007 commented 1 week ago

Hello meirmark, I have exactly the same problem following these instructions with the same Pi 3B

Whenever I change the settings use_mqtt to True it stops working. If I put is back to False everything works

Did you find any solution allready for this problem or know of another place where we can find information?

I was allready in contact with Wolfgang (who whrote the instructions) but he has no experience with Android he says

use_mqtt: True server: "xxx.xxx.x.xxx" port: 1883
login: ""
password: "" tls: "" device_id: "picframe"
device_url: ""

Can anyone assist please

Stef-007 commented 1 week ago

I did find a comment on a closed issue from June 17th someone suggested this as a solution, but this means a complete reinstallation... are there other ways to fix it?

"I 'solved' this by rebuilding my image using these instructions: https://www.thedigitalpictureframe.com/how-to-build-the-best-raspberry-pi-digital-picture-frame-with-bookworm-and-pi3d-picframe-2024-edition/

previously I was using Wayland rather than X11. I now can run MQTT w/o issue."

meirmark commented 1 week ago

Hi Steph. I have no news about MQTT, my need was to change the directory that is displayed and in the end I do it with HTTP and it works great for me. Paddy helped me a lot (thanks again).

Stef-007 commented 1 week ago

Hello Meirmark,

thanks for your reply, probaly syntax error somewhere that is solved but now I want to do exactly the same as you (change directories with an Android phone. I installed Mosquitto on the picframe,followed instructions (on the digitalpictureframe.com page) and installed different MQTT clients on my phone. Whatever I do I can't establish any communication.

Can anyone give me some detailed instruction on how to proceed?

Can this also work with HTTP? Change directories with the phone is the main goal...

meirmark commented 1 week ago

As far as I understand HTTP only works on the local network and won't work outside the home.

Stef-007 commented 1 week ago

For the time being if it works on the local network is allready great! Could anyone support me with that?

paddywwoof commented 1 week ago

Hi @Stef-007 I'm not sure why your MQTT isn't working. I set it up on our home picture frame ages ago and it did work, but it's so long ago that I no longer have the phone so can't tell you what app I used. I swapped over to the html interface partly so anybody in the house with any kind of mobile phone can access the picture frame without having to install an App.

In the configuration.yaml file you need to set the line use_http: True and I would keep use_mqtt: False just in case there is some kind of conflict. If you keep all the other options as default you will be able to get a super cut-down web page on your local network with the IP of the RPi and port 9000 i.e. type 192.168.0.123:9000 into the address bar of your phone browser, replacing 123 with whatever yours is. The web page should be self explanatory.

PS update picframe to the latest version as there is a fix in that to allow you to update the subdirectory back to nothing i.e. ""

Stef-007 commented 1 week ago

Hi Paddy, thanks a lot.

This works as a charm and is exacly what I needed, much appreciated!

Still curious if anyone can sort out how to make it work with MQTT so it can be also be used remotely...

Stefan

helgeerbe commented 1 week ago

Hi @Stef-007, did you set up a mqtt broker like mosquitto? mqtt is not a direct communication protocol. It requires always a broker, where an application can subscribes to topics, or can publish messages to topics?

When you setup the broker, you have to create also a username and password. This has to be set in picframes configuration.yaml.