Coder Social home page Coder Social logo

plasma-homeassistant's People

Contributors

korapp avatar toasteruwu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plasma-homeassistant's Issues

Suggestion: Persistent items

Would it be possible to have items be more persistent? So that when you delete a widget where the items are in, those items would not get deleted as well? As it is, its quite easy to delete a widget and not realize that those items you spent quite a bit of time to configure, would disappear as well.

Refresh after items added

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).

Enhancement Ideas: Widget Functionality and Layout Improvements

Hello,

First and foremost, I want to express my gratitude for creating this fantastic widget.


I've noticed a couple of things and have some feedback:

  1. Currently, I can only use one widget at a time, as the other one keeps on spinning, even though both are configured with the same URL and Token.
    In case I need to use a different token per widget(?), this should be documented somewhere.
  2. It would be fantastic if we could resize widget 2️⃣/3️⃣, similar to how we can with widget 1️⃣ (or if the height of the widget is being automatically adjusted based on the number of entities).
    As you can see, I currently only need to control two entities, so there's a considerable amount of wasted space.
  3. I'd appreciate the ability to change the view so that all my entities span the entire width, mirroring the layout in 1️⃣, rather than creating a horizontal stack as seen in 3️⃣.
    image
    image

For the README:

Use
1) Enter the URL of the Home Assistant instance
2) Create Long Lived Access Token on your Home Assistant Profile page (https://<your_ha_address>/profile) and put it in the plasmoid configuration
3) Add entities

Maybe add a 4) step: "reboot", "login / logout" or kquitapp5 plasmashell && kstart5 plasmashell since I had to do one of those things in order to make my entities appear.

Kind regards,
Moritz

[Bug] Item settings disappear when changing identity id in home assistant

Describe the bug
User changes identity id of a device (in my case a light group) in Home Assistant. When trying to modify corresponding item in the plasmoid settings all fields are empty, forcing user to re-enter those, and not just the identity id. In addition toggle action doesn't work afterwards, clicking item's button in the widget does nothing. You have to uncheck Action in item settings, save it and re-check the action again and save.

To Reproduce

  1. In Home Assistant change identity id of a light group (or possibly any device's identity id?)
  2. Open plasmoid's settings
  3. Modify settings of item whose identity was changed

Expected behavior
After changing identity id in Home Assistant, I expected that I could modify settings of light.olohuoneen_kattovalaisinryhmä item and just change its identity id to its new value, without need to set all the other fields too.

Also after I had updated item's settings I expected that clicking item's button would toggle the light group, but nothing happened.

Screenshots
Plasmoid settings after changing identity id of light.olohuoneen_kattovalaisinryhmä to light.olohuoneen_kattovalaisin in Home Assistant:
settings-bug

Settings of old item are missing:
item-settings-bug

Final settings after re-entering them and changing the identity id:
final-settings

Desktop (please complete the following information):

  • Distribution: NixOS 23.11
  • KDE Plasma 5.27.10
  • KDE Frameworks 5.112.0

[Bug] Error after first install and use

Describe the bug
I added the widget via KDE Discover and added the widget to my homescreen. I get this error:

file:///home/mctom234/.local/share/plasma/plasmoids/com.github.korapp.homeassistant/contents/ui/main.qml:13:25: Type FullRepresentation unavailable

file:///home/mctom234/.local/share/plasma/plasmoids/com.github.korapp.homeassistant/contents/ui/FullRepresentation.qml:66:28: Cannot assign object of type "Action" to property of type "Action_QMLTYPE_115*" as the former is neither the same as the latter nor a sub-class of it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Discover
  2. Click on freshly (first) install the plasmoid
  3. Add the widget to the homescreen
  4. See error

Expected behavior
Whatever the widget should do on the first use

Desktop (please complete the following information):

  • Distribution: Arch 6.8.6-zen1
  • KDE Plasma 6.0.3
  • KDE Frameworks 6.1.0

Additional context
Maybe I am just missing some configuration steps. I am happy about every hint 😄

[Bug] Widget does not fully initialize if wallet not unlocked when plasmashell starts.

Describe the bug
If your KDE Wallet does not unlock at login when plasmashell starts and loads the widget, the widget will display "Configure" until plasmashell is restarted. e.g. plasmashell --replace in Krunner.

To Reproduce
Steps to reproduce the behavior:

  1. Configure your default wallet to require user interaction in order to unlock (e.g. PGP Encryption with a physical GPG key)
  2. Login to your user account.
  3. Unlock your default KDE wallet.

Expected behavior
Once the wallet is unlocked, the widget will be able to obtain the access token for Home Assistant, authenticate, and display the entities configured to be displayed.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Distribution: KDE neon 5.27
  • KDE Plasma 5.27.10
  • KDE Frameworks 5.113.0
  • Qt 5.15.11

Additional context
I have not tried using classic blowfish encryption with a password.

Displaying only spinner, can't add entities

I've inputted my HA address and API key, but when I try to add entities -- they are not getting saved (or the list is displayed empty)
The widget itself is showing only a spinner

Here's couple of messages from journalctl

plasmashell[1250]: qml: Unsupported WebSocket scheme: file
plasmashell[1250]: qml: Messages can only be sent when the socket is open.

What could be causing this?
Thank you

Light Toggle creates Strobe effect

I added my first entry after getting the qt5-websockets installed and rebooting.

The entity is my Desk lamp, and I added the option to Toggle it:
image

After hitting Apply, it turned the light off...paused about 1 second...back on...then off then on then off then on then off then on then went into strobe mode. Thank you for proving to me that I can somehow strobe my Cost Feit light! ⚡ While this is a great effect for Halloween, I'm afraid it won't work for daily use. :)

Also, I noticed that If I change the action to Turn On/Turn Off (either way), it overrides my current setting in Home Assistant, for example, Having it set to Turn On, only allowed my light to be set to 6%. Manually turning it off and on in the Home ASsistant Dashboard, it changed it from 100% to 6% so your app is assuming Master Control by presumably sending a stream of instructions when the action is selected.

Doesn't work on KDE6

Plasmoid fails to load on OpenSUSE Tumbleweed running Plasma 6

qt6-websockets-devel-6.6.2-1.1.x86_64
libqt5-qtwebsockets-devel-5.15.13+kde2-1.1.x86_64
  • Distribution: OpenSUSE Tumbleweed
  • KDE Plasma: 6.0.2
  • KDE Frameworks: 6.0.0
  • QT Version: 6.6.2

[Feature request] Plasma 6 compatibility

This Widget was written for an unknown older version of Plasma and is not compatible with Plasma 6.
Please contact the widget's author for an updated version.

module "QtWebSockets" is not installed

On GNU/Debian 12 - Bookworm I get the following message.

_file:///home/jaap/.local/share/plasma/plasmoids/com.github.korapp.homeassistant/contents/ui/main.qml:29:5: Type WsClient unavailable

file:///home/jaap/.local/share/plasma/plasmoids/com.github.korapp.homeassistant/contents/ui/WsClient.qml:2:1: module "QtWebSockets" is not installed_

libqt5websockets5. libqt5websockets6. qml-module-qt-websockets, qml-module-qtwebsockets, qml6-module-qtwebsockets are installed.

Plasma-homeassistant is installed with plasma widgets installer.

[Bug] Failed to create WebSocket client

Describe the bug
A clear and concise description of what the bug is.
image
I get the above error, even though I have the right QtWebsockets lib installed per instructions.

Output of zypper se:

❯ zypper se libQt6WebSockets6
Loading repository data...
Reading installed packages...

S  | Name              | Summary                 | Type
---+-------------------+-------------------------+--------
i+ | libQt6WebSockets6 | Qt 6 WebSockets library | package

I've tried configuring the widget to see if it makes a difference, but it does not make the error go away. The problem also persists after a full system reboot.

To Reproduce
Steps to reproduce the behavior:

  1. Install OpenSUSE Tumbleweed
  2. Add widget through Plasma store
  3. Add widget to destkop

Expected behavior
Widget shows me the configured entities.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
System info:

  Kernel: 6.8.1-1-default arch: x86_64 bits: 64
  Desktop: KDE Plasma v: 6.0.2 Distro: openSUSE Tumbleweed 20240319

QWebSocketPrivate::processHandshake: Unhandled http status code: 404 (Not Found).

Describe the bug
After installation, I created a token on my HA instance and input the details. When attempting to load, I get a spinning cog on the 'items' menu and nothing loads, as well as the following error on a banner: QWebSocketPrivate::processHandshake: Unhandled http status code: 404 (Not Found).

To Reproduce
Steps to reproduce the behavior:

  1. Install the plasmoid through 'Get new plugins'
  2. input the required information

Expected behavior
The plasmoid to get information from my HA instance

Desktop (please complete the following information):
Operating System: Arch Linux
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.7.0-zen3-1-zen (64-bit)
Graphics Platform: Wayland

Additional context
I'm sure I'm missing something painfully obvious. I can access HA by posting the same URL in a browser without issue.

KDE 6?

Now that the beta is out, have you given any thought to setting it up for KDE 6? I am testing KDE 6 Beta 1 in a VM And so far, it looks like they are now limiting their Plasma widgets to those compatible with QT6 now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.