korapp / plasma-homeassistant

Add Home Assistant to your plasma desktop
GNU General Public License v3.0
54 stars 4 forks source link

Refresh after items added #13

Closed GrumpyMeow closed 6 months ago

GrumpyMeow commented 6 months ago

Hi! I just came across your widget. Good job! It took me some effort to get the widget working. As i use nixos i installed two nixos packages and had to reboot afterwards.

environment.systemPackages = with pkgs; [
    ...
    qt6.qtwebsockets
    libsForQt5.qt5.qtwebsockets
  ];

After adding some items to the widget, i noticed that the buttons didn't appeared until i restarted Plasma. I think some refreshing implementation might be needed.

Btw. i had the plan to develop my own widget and implement Voice Assistant (which i probably never would have complete).

jhakonen commented 6 months ago

Huh, looks like we both struggled with this. I'm using nixos as well and encountered same issues. In my case I only installed libsForQt5.qt5.qtwebsockets didn't need that qt6 version. Then kept trying to remove/re-add and even uninstall/reinstall the plasmoid, but it just kept showing that error about missing websockets library. Eventually tried rebooting, which then fixed it. I did notice afterwards that README.md says that you are supposed to restart plasma or re-login, but at the time forgot to check the readme.

Stumbled also on that plasmoid widget not showing items after adding initial items to it. Just kept showing that Configure button. Definitely something goes wrong there.

Would it be possible to catch that missing websocket library error and show user a more friendlier error message that would instruct them which library to install and what to do in order to reload the plasmoid?

korapp commented 6 months ago

Please check if the problem still occurs in v0.3.0.

Would it be possible to catch that missing websocket library error and show user a more friendlier error message that would instruct them which library to install and what to do in order to reload the plasmoid?

This would require me to know the name of the QtWebSockets package for each existing distribution. For now, an information and a link to the requirements will have to do.

GrumpyMeow commented 6 months ago

Sufficient solution.