Giter Club home page Giter Club logo

hoppla-sa's Introduction

Philips Hue light control plasmoid for KDE (Stand alone version)

This plasmoid enables you to control Philips Hue light bulbs. The idea of the stand alone version is that it requires no compiled backend and thus can be deployed as is, e.g. via Get Hot New Stuff.

It allows you to

  • Control your lights
    • Turn lights on / off
    • Set the brightness
    • Set the colour or white temperature
  • Control your groups
    • Turn whole groups on / off
    • Set the brightness
    • Set the colour or white temperature
    • Control single lights belonging to the group
  • Use quick actions for your favourite or most used commands
    • Create, modify and use actions, such as turning all lights off or dimming all lights of a room
  • Manage your stuff
    • Search new lights, modify and delete existing ones
    • Create new Groups and Rooms, modify and delete existing ones
    • Create new schedules, modify and delete existing ones
  • Set an alternative connection, including http basic auth
    • Control your lights from outside your home network

License

This software is distributed under the LGPL 2.1 License. See COPYING for details.

Requirements

  • Starting with Version 4.*, at least Plasma 5.21 is needed. Please use older versions for prior plasma releases.
  • Plasma 5 & Qt 5.4+
  • Qt5 Graphical Effects
  • Extra CMake Modules (only for building)

Compile and install

git clone https://github.com/Fuchs/hoppla-sa.git
cd hoppla-sa

Global installation

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr 
make
sudo make install

Local installation (per user)

plasmapkg2 -i package

to install the plasmoid

and

plasmapkg2 -r package

to remove it again.

Control lights from outside your network

You have to set up a public reachable proxy, I recommend apache httpd or nginx / lighttpd over a secured (TLS) connection with basic auth. A possible apache httpd configuration would be

<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerName hue.mydynamicdnsdomain.org
                ProxyRequests On
                <Proxy *>
                   Order deny,allow
                   Allow from localhost
                </Proxy>

                SSLEngine on

                SSLCertificateFile /etc/ssl/certs/apache.pem
                SSLCertificateKeyFile /etc/ssl/private/keys/apache.key

                <Location "/">
                        AuthType Basic
                        AuthName "Restricted Content"
                        AuthUserFile /etc/httpd/some/place/.htpasswd-hue
                        Require valid-user
                </Location>
                # Set IP to your internal hue bridge IP
                ProxyPass / http://192.168.1.1/
                ProxyPassReverse / http://192.168.1.1/
        </VirtualHost>
</IfModule>

where mydyanmicdnsdomain.org is a domain pointing at your public address from your home network. Please read your httpd documentation on how to set it up, especially on how to add basic authentication. Note that due to the higher delay between requests and replies to the bridge, this can lead to the plasmoid being sometimes not up to date about the current state until the next background update occurs. Updates can always be forced with the refresh button.

hoppla-sa's People

Contributors

fuchs avatar ohmybahgosh avatar setre14 avatar vistaus 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hoppla-sa's Issues

Hue Sync

It would be nice to have sync with displayed image on screen. I know it isn't simple but for few people it will be nice feature. Specialy when you watch movie in dark room.

[possible bug?] Manual refresh necessary for up-to-date information

Hi,

I'm on KDE Neon, using the latest version of the plasmoid available from the GUI installer (2.8.something, I think?). I can only get up-to-date information about my lights by manually hitting the "refresh" button.

My assumption is that the "check for status every n seconds" setting in the configuration is meant to set a polling interval for getting up-to-date information, but I might be wrong about that...

If you need any debugging information then let me know (although you may have to tell me where to find it).

Thanks!

P.S. Otherwise love the widget, really good work!

[feature request] set date/time on the bridge

it would be nice to be able to see and change the date and time set on the bridge in case you can't or don't want to connect it to the internet and it doesn't reach a NTP server

this can be done via API as explained in the following page under section "Setting the time"
https://www.drashsmith.com/post/running-philips-hue-lights-locally/

a way to implement this could be to add a date/time field in configuration->bridge to enter the date/time manually and also a checkbox

[ ] synchronize bridge date/time with local computer

that could take the local system time when the widget starts up (and maybe every 24h) and set it on the bridge (i'd take and set UTC to avoid issues with different time zones on local computer and bridge)

and if desired more /config fields can be added to the bridge->configuration tab besides date/time:

"name": "Ash's Lights",
"zigbeechannel": 20,
"dhcp": true,
"ipaddress": "192.168.0.70",
"netmask": "255.255.255.0",
"gateway": "192.168.0.1",
"proxyaddress": "none",
"proxyport": 0,
"UTC": "2016-12-14T23:23:28",
"localtime": "2016-12-14T23:23:28",
"timezone": "Europe/London",
"modelid": "BSB001",

dhcp/ipaddress/netmask/gateway/proxy to set a static IP (i had to use a smartphone just to disable DHCP and set a static IP)

time zone to select the time zone (i guess as per /usr/share/zoneinfo)

and thanks for this great widget! it makes it possible to control phillips hue without a smartphone and looks great

Group icon/title jumps about

When expanding a group, the vertically centered group's icon and text slightly jump up by a couple of pixels. Collapsing the group does not reset the state.

Example after having expanded/recollapsed the groups:
image

Feature idea: Gradually change color temperature according to daytime

Thank you very much for creating this plasmoid! I love it for setting color temperature of my hue lights and switching them on and off.

Do you think it would be possible to add a feature, that would allow the lamps to automatically, gradually fade from cool-white in the afternoon to warm-white in the evening?

For example by reading the current display color temperature from the plasmoid "redshift-control" (https://phabricator.kde.org/source/plasma-redshift-control/) and set the color temperature of the hue lights accordingly?

Error loading QML file

Currently on Kubuntu 20.04, Plasma 5.18.5.... I installed this plugin via Discover app store and receive this error when I place the widget on my desktop

Error loading QML file: file:///home/ecov/.local/share/plasma/plasmoids/ch.fuchsnet.plasma.hoppla-sa/contents/ui/main.qml:20:1: module "QtQml" version 2.15 is not installed

Probably an easy fix but not sure what to do.

"apt-cache search qtml" shows a couple available packages:
python3-pyside2.qtqml
qml-module-qtqml-models2
qml-module-qtqml-statemachine

Do i need to install one of these?

Thank you

Edit: whoops, just noticed you require plasma 5.21

Too easy to delete a group

Hi I was just testing your awesome app.
It works really fine, but just on the first try I immediately deleted 2 Groups by accident.

At first:
For a first time user you are not immediately aware you're actually deleting the group from hue and not only from the plasmoid ( was my first thought)
secondly:
a tooltip when you delete anything is always very much appreciated in ANY application ๐Ÿ‘
And it is really hurting if you delete hue groups which had scenes and everything connected.

Hoppla-sa is sometimes crashes KDE

When i click on some elements of the widget it sometimes crashes KDE:

I reported it to the KDE-Project and was asked to transfer this information to you:

https://bugs.kde.org/show_bug.cgi?id=421238

Nate Graham [email protected] changed:

What |Removed |Added

Summary|Hoppla-sa hue control |Hoppla-sa hue control
|crashes plasmashell |crashes plasmashell in
| |ListModel::setExistingPrope
| |rty()
CC| |[email protected]
Status|REPORTED |RESOLVED
Resolution|--- |DOWNSTREAM

--- Comment #1 from Nate Graham [email protected] ---
Please report this to the developer of that widget. Thanks!

--
You are receiving this mail because:
You reported the bug.

Bluetooth support?

Hello, this plasmoid seems really good, but i don't have a hue bridge
However, my PC has a bluetooth card
I therefore wanted to know if there was any way to use this plasmoid with bluetooth instead of a bridge, or if it was a planned feature

Cutoff color palette

Firstly, i want to thank you for making this beautiful piece of software!

The only problem i have with it is that the color palette in the lights section is cutoff. I attached a gif to demonstrate the problem. Additionally, the upper part of the first entry seems also to be cutoff which i assume might be related.

issue

Hide tray icon if hue is not available

Hi! Thanks for this plasmoid, it's very helpful! :-)

I'm using it in the system tray. If would be great if the icon could be hidden if no hue is available. I'm running it on a notebook and when I'm not at home the plasmoid is useless, obviously.

Should be very easy to implement. basically, you just need

Plasmoid.status: isAvailable ? PlasmaCore.Types.ActiveStatus : PlasmaCore.Types.PassiveStatus

... and a property isAvailable that indicates if a hue is available or not.

Existing schedules not parsable

I just installed hoppla-sa v 2.8.2 on openSuSE Linux Leap 15.1.
When I go to editing an existing schedule generated with the Hue app on Android, I get the message: "Failed to parse the specified action. Read only mode, original values are preserved" (as root) or its German translation as a normal user, and no "Command" information for that schedule entry are displayed.

Uninstall command fails

ArchLinux, latest Plasma:

The uninstall command for a local installation fails here. What did work instead was:

cd package
plasmapkg2 -r .

ID in "Edit command" is not set for Group "all"

If I edit a command in an custom "action" the property ID is not set correctly when group is "0: All lights"
If I choose any other group the ID is set correctly.

Steps to reproduce:

  • create an new action
  • add new command to it
  • change "Target" of the new command to "Groups" and select Group "0: All lights"
  • save

--> ID field of the Command is empty

  • change the group of the new command to any other Group with an ID != 0

--> ID field is set correctly to the group ID

Mouse wheel actions

It would be nice to configure a bulb or group of bulbs to control with the mouse wheel over the tray icon, e.g. for brightness.

UI "issue": not enough space or to much content

Hi @Fuchs,

This issue is an UI issue, not a functional one. Everything seems to work fine, but it is just "not nice" on my system.

The following graphics should explain what is a bit out of the corresponding boxes / grids / lists .... :-)

System I am using:

  • Tuxedo OS 2 (Ubuntu 22.04 based (LTS))
  • KDE Plasma 5.27.5
  • KDE Framework 5.106.0
  • QT 5.15.9
  • Graphic Platform: X11
  • Kernel: 6.2.0

grafik
grafik

Memory leak

Experience a very clearly noticeable memory leak while using this plasmoid on KDE Plasma 5.14.5 / Frameworks 5.54.0 / Qt 5.12.0 running on Arch Linux.

Memory consumption of Plasma Shell just keeps increasing while I have Hoppla (version 2.8.0) running in one of my panels. As soon as I remove it, the memory used stops increasing.

hoppla does not find bridge, when bridge is in different subnet

Steps to reproduce:

  • Bridge with fix IP in subnet 192.168.4.XXX
  • Laptop with Kubuntu 16.10 in subnet 192.168.7.XXX
  • Subnet 192.168.7.XXX can reach any IP in 192.168.4.XXX via http and ICMP --> other Apps like Hue Pro (Android & iOS) and the offical Philips Apps can reach the bridge from subnet 192.168.7.XXX when given exact IP

Strange scroll behaviour

Hi @Fuchs
The current version (of git) has a strange scroll behavior that doesn't work properly. Rather, too many items are listening to the scroll event either mistakenly or incorrectly.

  • The light intensity control listens visually, but has no influence on the light itself.f
  • The tab menu for the individual bulbs, light information, color is turned through

I have included a small screencast that might explain what I meant.

2023-06-02.22-26-15.mp4

Can't find hue bridge on Fedora 36

Hello,

I have installed this extension on many distros and it has always worked flawlessly, but for some reason it can't find my Philips hue bridge on fedora 36, is there maybe a setting I should change? I tried disabling my firewall, using "systemctl stop firewalld," and entering my Philips hue bridge's IP manually, but it still wouldn't work.

Thanks for this great widget.

Action causing plasma crash & restart

Hi Fuchs, Here is the payload for an action that causes plasma to crash & restart. Other, more simpler actions operate without failure.

actionlist={"0":{"userAdded":false,"title":"Switch all lights on","subtitle":"Switches all reachable lights on","icon": "bulb-lightorange.svg","actions":[{"ttype":"groups","tid":"0","payload":"{\\"on\\":true}"}]},"1":{"userAdded":false,"title":"Switch all lights off","subtitle":"Switches all reachable lights off","icon": "bulb-dark.svg","actions":[{"ttype":"groups","tid":"0","payload":"{\\"on\\":false}"}]},"2":{"userAdded":true,"title":"office only","subtitle":"all off but office and entry","icon": "office-rainbow.svg","actions":[{"ttype":"groups","tid":"2","payload":"{\\"on\\":false}"},{"ttype":"groups","tid":"3","payload":"{\\"on\\":false}"},{"ttype":"groups","tid":"4","payload":"{\\"on\\":false}"},{"ttype":"groups","tid":"5","payload":"{\\"on\\":false}"},{"ttype":"groups","tid":"7","payload":"{\\"on\\":false}"},{"ttype":"groups","tid":"8","payload":"{\\"on\\":false}"},{"ttype":"groups","tid":"6","payload":"{\\"on\\":true}"}]}}

I'm somewhat new to gui linux & KDE so I'm unfamiliar with troubleshooting via CLI start. If you can link a howto I'll circle back with that info.

edit: This is the same action that was previously deleted & recreated, as discussed on KDE store. Crash still occurring.

Plasma 6 compatibility

Hey! Hope you don't mind me raising an issue for this, but I wanted to know if you plan on updating this for Plasma 6 at some point, because this applet has integrated itself nicely into my every-day usage on both my desktop and laptop. It's just so convenient ๐Ÿ˜†

No worries if not of course, appreciate this either way.

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.