Skip to content

Commit 571a0e3

Browse files
add easter egg (diyhue#998)
* Update discover.py * Update configHandler.py * end wake up * Update v2restapi.py Add behavior instance to clip/v2/resource, to solve problem as in issue 873, now the app shows the automations * wrong response * add all buttons to response * Update discover.py Fix issue where lights with the same mac address but different modelid get the same ip address * update wake-up fix error "Exception while processing the schedule X | 'turn_lights_off_after'" if "turn_lights_off_after" is not specified * fix add light in hue app * Update requirements.txt * Update requirements.txt * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update requirements.txt * Update requirements.txt * Update Dockerfile * Update requirements.txt * Update Dockerfile * revert to old working * Update Dockerfile * Add identify request, non standard gateway, update version and api * add easter egg * Update Credits.py
1 parent 2db6a0b commit 571a0e3

File tree

2 files changed

+154
-0
lines changed

2 files changed

+154
-0
lines changed

BridgeEmulator/HueEmulator3.py

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from flaskUI.restful import NewUser, ShortConfig, EntireConfig, ResourceElements, Element, ElementParam, ElementParamId
1313
from flaskUI.v2restapi import AuthV1, ClipV2, ClipV2Resource, ClipV2ResourceId
1414
from flaskUI.espDevices import Switch
15+
from flaskUI.Credits import Credits
1516
from flaskUI.error_pages.handlers import error_pages
1617
from werkzeug.serving import WSGIRequestHandler
1718
from functions.daylightSensor import daylightSensor
@@ -59,6 +60,8 @@ def request_loader(request):
5960

6061
return user
6162

63+
### Licence/credits
64+
api.add_resource(Credits, '/licenses/<string:resource>', strict_slashes=False)
6265
### ESP devices
6366
api.add_resource(Switch, '/switch')
6467
### HUE API

BridgeEmulator/flaskUI/Credits.py

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
from flask_restful import Resource
2+
3+
class Credits(Resource):
4+
def get(self, resource):
5+
if resource == "packages.json":
6+
response = [
7+
{
8+
"Attributions": [],
9+
"SPDX-License-Identifiers": [
10+
""
11+
],
12+
"SourceLinks": [
13+
"https://github.com/mariusmotea",
14+
],
15+
"licenses": {
16+
"Main Developer & Mastermind of DiyHue":""
17+
},
18+
"Version": "",
19+
"Package": "Marius",
20+
"Website": "https://github.com/mariusmotea"
21+
},
22+
{
23+
"Attributions": [],
24+
"SPDX-License-Identifiers": [
25+
""
26+
],
27+
"SourceLinks": [
28+
"https://github.com/cheesemarathon",
29+
],
30+
"licenses": {
31+
"Github & CI/CD Wizard":""
32+
},
33+
"Version": "",
34+
"Package": "cheesemarathon",
35+
"Website": "https://github.com/cheesemarathon"
36+
},
37+
{
38+
"Attributions": [],
39+
"SPDX-License-Identifiers": [
40+
""
41+
],
42+
"SourceLinks": [
43+
"https://github.com/Mevel",
44+
],
45+
"licenses": {
46+
"Maintainer & Support":""
47+
},
48+
"Version": "",
49+
"Package": "Mevel",
50+
"Website": "https://github.com/Mevel"
51+
},
52+
{
53+
"Attributions": [],
54+
"SPDX-License-Identifiers": [
55+
""
56+
],
57+
"SourceLinks": [
58+
"https://github.com/fisico",
59+
],
60+
"licenses": {
61+
"Designed and developed the user interface":""
62+
},
63+
"Version": "",
64+
"Package": "David",
65+
"Website": "https://github.com/fisico"
66+
},
67+
{
68+
"Attributions": [],
69+
"SPDX-License-Identifiers": [
70+
""
71+
],
72+
"SourceLinks": [
73+
"https://github.com/philharmonie",
74+
],
75+
"licenses": {
76+
"React consultant":""
77+
},
78+
"Version": "",
79+
"Package": "Phil",
80+
"Website": "https://github.com/philharmonie"
81+
},
82+
{
83+
"Attributions": [],
84+
"SPDX-License-Identifiers": [
85+
""
86+
],
87+
"SourceLinks": [
88+
"https://github.com/hendriksen-mark",
89+
],
90+
"licenses": {
91+
"Maintainer & Support":""
92+
},
93+
"Version": "",
94+
"Package": "Mark",
95+
"Website": "https://github.com/hendriksen-mark"
96+
},
97+
{
98+
"Attributions": [],
99+
"SPDX-License-Identifiers": [
100+
""
101+
],
102+
"SourceLinks": [
103+
"https://github.com/diyhue/diyHue/graphs/contributors",
104+
],
105+
"licenses": {
106+
"A big thank you to everyone contributing to this project":""
107+
},
108+
"Version": "",
109+
"Package": "Thank you!",
110+
"Website": "https://github.com/diyhue/diyHue/graphs/contributors"
111+
}
112+
]
113+
return response
114+
elif resource == "hardcoded.json":
115+
response = [
116+
{
117+
"Attributions": [],
118+
"SPDX-License-Identifiers": [
119+
""
120+
],
121+
"SourceLinks": [
122+
"https://github.com/diyhue/diyHue",
123+
],
124+
"licenses": {
125+
"Main diyHue software repo":""
126+
},
127+
"Version": "",
128+
"Package": "DiyHue",
129+
"Website": "https://github.com/diyhue/diyHue"
130+
}
131+
]
132+
return response
133+
elif resource == "rust-packages.json":
134+
response = [
135+
{
136+
"Attributions": [],
137+
"SPDX-License-Identifiers": [
138+
""
139+
],
140+
"SourceLinks": [
141+
"https://github.com/diyhue",
142+
],
143+
"licenses": {
144+
"diyHue repositories":""
145+
},
146+
"Version": "",
147+
"Package": "DiyHue Repositories",
148+
"Website": "https://github.com/diyhue"
149+
}
150+
]
151+
return response

0 commit comments

Comments
 (0)