Skip to content

Commit 0bc8ca2

Browse files
committed
Release 2.4.2
1 parent bd4b7d7 commit 0bc8ca2

11 files changed

+48
-17
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 2.4.2 (2017-01-30)
4+
5+
* Existing action commands can now be edited
6+
* Fix a bug that prevented weekly schedules to be filled correctly
7+
* Fix a bug that prevented action editor from loading an "off" state correctly
8+
* Workaround a plasma bug that makes configuration unavailable
9+
* Update tooltip as soon as data is initially available
10+
311
## 2.2.0 (2017-01-28)
412

513
* ActionEditor now can load existing actions, thus you can modify existing schedule commands

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ It allows you to
1515
* Set the brightness
1616
* Set the colour or white temperature
1717
* Control single lights belonging to the group
18-
* Actions
19-
* Use some global actions, such as turning all lights on or off
20-
* Set an alternative connection, including http basic auth
21-
* Control your lights from outside your home network
22-
* You need to set up a proxy (e.g. apache httpd) reachable from the outside
18+
* Use quick actions for your favourite or most used commands
19+
* Create, modify and use actions, such as turning all lights off or dimming all lights of a room
2320
* Manage your stuff
2421
* Search new lights, modify and delete existing ones
2522
* Create new Groups and Rooms, modify and delete existing ones
2623
* Create new schedules, modify and delete existing ones
24+
* Set an alternative connection, including http basic auth
25+
* Control your lights from outside your home network
2726

2827
## License
2928

TODO.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Nice to have features for next release (3.*)
22

3-
* Auto-discover Hue bridge without relying on Philips (ssdp discovery needs to be implemented, can't be done in pure qml/js)
3+
* Auto-discover Hue bridge without relying on Philips (ssdp discovery can't be done in pure qml/js)
44
* Scenes support
55
* Sensors support
6+
* Better error handling (unauthorized / unavailable mid-command)

package/contents/code/hue.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ var useAltConnection = false;
2020
var initialized = false;
2121
var altConnectionEnabled;
2222
var noConnection = false;
23-
var debug = false;
23+
var debugMode = false;
2424

2525
// INIT
2626

2727
function dbgPrint(msg) {
28-
if(!debug) {
28+
if(!debugMode) {
2929
return;
3030
}
31-
print('[Hoppla-Hue] ' + msg)
31+
else {
32+
print('[Hoppla-Hue] ' + msg)
33+
}
3234
}
3335

3436

@@ -70,6 +72,7 @@ function getHueConfigured() {
7072
var auth = plasmoid.configuration.authToken
7173
if(!base || !auth) {
7274
// something went terribly wrong here
75+
dbgPrint("Can't access configuration");
7376
return false;
7477
}
7578
if (!base.trim() || !auth.trim()) {
@@ -2142,9 +2145,6 @@ function getHueIp (callback) {
21422145
request.send();
21432146
}
21442147

2145-
function dbgPrint(msg) {
2146-
print('[Hoppla] ' + msg)
2147-
}
21482148

21492149
/**
21502150
* Ignore me, I am here because extracting strings for i18n is stupid

package/contents/ui/FullRepresentation.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ FocusScope {
348348

349349
function fetchAllDone() {
350350
busyOverlay.opacity = 0;
351+
// Done to initially set the tooltip
352+
checkHueConnection(updatedConnection, true);
351353
}
352354

353355
/**
@@ -429,7 +431,7 @@ FocusScope {
429431
var actionItems = JSON.parse(plasmoid.configuration.actionlist);
430432
}
431433
catch(e) {
432-
debugPrint("Failed to parse actionlist json: " + json);
434+
debugPrint("Failed to parse actionlist json: " + actionItems);
433435
return;
434436
}
435437

package/contents/ui/configActions.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ Item {
196196

197197
Button {
198198
id: btnAddAction
199+
anchors {
200+
right: parent.right
201+
}
199202
text: i18n("Add new action")
200203
onClicked: addAction()
201204
}

package/contents/ui/configGroups.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ Item {
221221

222222
Button {
223223
id: btnAddGroup
224+
anchors {
225+
right: parent.right
226+
}
224227
text: i18n("Add new group")
225228
onClicked: addGroup()
226229
}

package/contents/ui/configLights.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ Item {
192192

193193
Button {
194194
id: btnAddLight
195+
anchors {
196+
right: parent.right
197+
}
195198
text: i18n("Add new light")
196199
onClicked: addLight()
197200
enabled: true

package/contents/ui/configSchedules.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ Item {
197197

198198
Button {
199199
id: btnAddSchedule
200+
anchors {
201+
right: parent.right
202+
}
200203
text: i18n("Add new schedule")
201204
onClicked: addSchedule();
202205
}

package/contents/ui/main.qml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,28 @@ import "hue.js" as Hue
2525

2626
Item {
2727
id: hopplaApplet
28-
property bool debug: false
28+
property bool debugMode: false
2929

3030
Plasmoid.toolTipMainText: i18n("Hue Light Control")
3131
Plasmoid.icon: "im-jabber"
3232

3333
Plasmoid.compactRepresentation: CompactRepresentation { }
3434
Plasmoid.fullRepresentation: FullRepresentation { }
3535

36+
Component.onCompleted: {
37+
// We need to init here, otherwise there is a strange plasma bug
38+
// which can lead to plasmoid.configuration being unavailable,
39+
// thus the plasmoid failing badly.
40+
initHueConfig();
41+
}
42+
3643
function debugPrint(msg) {
37-
if(!debug) {
44+
if(!debugMode) {
3845
return;
3946
}
40-
print('[Hoppla] ' + msg)
47+
else {
48+
print('[Hoppla] ' + msg)
49+
}
4150
}
4251

4352
function initHueConfig() {

package/metadata.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ X-KDE-PluginInfo-Name=ch.fuchsnet.plasma.hoppla-sa
1818
X-KDE-PluginInfo-Category=System Information
1919
X-KDE-PluginInfo-Author=Christian Loosli
2020
X-KDE-PluginInfo-Email[email protected]
21-
X-KDE-PluginInfo-Version=2.0.0
21+
X-KDE-PluginInfo-Version=2.4.2
2222
X-KDE-PluginInfo-Website=https://github.com/Fuchs/hoppla-sa
2323
X-KDE-PluginInfo-License=LGPL

0 commit comments

Comments
 (0)