* Support Philips Hue APIv2 and refactoring

* Fix MDNSBrower - if timeout during host resolvment occurs

* Hue API v2 - Migrate database

* Fix macOS build

* Handle network timeout before any other error

* Address CodeQL findings

* Clean-up and Fixes

* Only getProperties, if username is available

* Option to layout by entertainment area center

* Fix Wizard

* Fix Nanoleaf, add user auth token wizard

* Nanoleaf fixes and enhancements

* Consider rotated panel layouts

* Corrections

* Layout corrections and filter for non LED panels

* Add LED test effect lightening up LEDs in sequence

* Align rotation value to 15 degree steps

* Align rotation value to 15 degree steps

* Skip non LED panels

* Fix Rotation and refactoring

---------

Co-authored-by: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
LordGrey
2023-10-15 17:04:51 +02:00
committed by GitHub
parent cd22d4454d
commit b1e68a3572
13 changed files with 825 additions and 240 deletions

11
effects/ledtest-seq.json Normal file
View File

@@ -0,0 +1,11 @@
{
"name" : "Led Test - Sequence",
"script" : "ledtest-seq.py",
"args" :
{
"sleepTime" : 0.5,
"smoothing-custom-settings" : false,
"smoothing-time_ms" : 500,
"smoothing-updateFrequency" : 20.0
}
}

39
effects/ledtest-seq.py Normal file
View File

@@ -0,0 +1,39 @@
import hyperion
import time
# Get parameters
sleepTime = float(hyperion.args.get('sleepTime', 0.5))
def TestRgb( iteration ):
switcher = {
0: (255, 0, 0),
1: (0, 255, 0),
2: (0, 0, 255),
}
return switcher.get(iteration, (127,127,127) )
ledData = bytearray(hyperion.ledCount * (0,0,0) )
i = 0
while not hyperion.abort():
if i < hyperion.ledCount:
j = i % 3
rgb = TestRgb( j )
ledData[3*i+0] = rgb[0]
ledData[3*i+1] = rgb[1]
ledData[3*i+2] = rgb[2]
i += 1
else:
if i == hyperion.ledCount:
ledData = bytearray(hyperion.ledCount * (0,0,0) )
i += 1
else:
i = 0
hyperion.setColor (ledData)
time.sleep(sleepTime)

View File

@@ -0,0 +1,56 @@
{
"type":"object",
"script" : "ledtest-seq.py",
"title":"edt_eff_ledtest_seq_header",
"required":true,
"properties":{
"sleepTime": {
"type": "number",
"title":"edt_eff_sleeptime",
"default": 0.5,
"minimum" : 0.01,
"maximum": 1,
"step": 0.01,
"append" : "edt_append_s",
"propertyOrder" : 1
},
"smoothing-custom-settings" :
{
"type" : "boolean",
"title" : "edt_eff_smooth_custom",
"default" : false,
"propertyOrder" : 2
},
"smoothing-time_ms" :
{
"type" : "integer",
"title" : "edt_eff_smooth_time_ms",
"minimum" : 25,
"maximum": 600,
"default" : 200,
"append" : "edt_append_ms",
"options": {
"dependencies": {
"smoothing-custom-settings": true
}
},
"propertyOrder" : 3
},
"smoothing-updateFrequency" :
{
"type" : "number",
"title" : "edt_eff_smooth_updateFrequency",
"minimum" : 1.0,
"maximum" : 100.0,
"default" : 25.0,
"append" : "edt_append_hz",
"options": {
"dependencies": {
"smoothing-custom-settings": true
}
},
"propertyOrder" : 4
}
},
"additionalProperties": false
}