Skip to content

Commit

Permalink
add deCONZ discovering
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane committed Aug 19, 2021
1 parent c1fb9f1 commit b28e0ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion octoprint_phom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,14 @@ def on_api_command(self, command, data):
def on_api_get(self, request):
option = request.args.get('action')
if(option == "discover"):
final_discover = []
r = requests.get("https://discovery.meethue.com/")
return flask.jsonify(r.json())
r_2 = requests.get("https://phoscon.de/discover")
for element in r.json():
final_discover.append(element)
for element in r_2.json():
final_discover.append(element)
return flask.jsonify(final_discover)
elif(option == "isconfigured"):
token = self._settings.get(['hue_token'])
light = self._settings.get(['light_id'])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "Ophom"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.4.0"
plugin_version = "1.4.1"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit b28e0ad

Please sign in to comment.