Philips Hue

in #coding6 years ago

Seit ich ein LED-Band des Philips-Hue Systems habe, rege ich mich über die Android-App auf. Für meine Zwecke ist die viel zu überladen. Hauptsächlich will ich damit das Licht ein- und ausschalten, und sonst nix. Für Windows schaut es auch nicht wirklich gut aus, auch da habe ich nichts ordentliches gefunden. Also hab ich mir selber was programmiert. Dabei habe ich als erstes festgestellt, dass die REST-API eigentlich richtig gut gemacht ist. Außerdem stellt die Hue Bridge einem ein mächtiges Werkzeug zur rumspielen und rumtesten zur Verfügung, namentlich den „CLIP API Debugger“. Dort kann man alle Befehle direkt an Die Bridge schicken und bekommt die Antwort der Bridge zurück. Das ist etwas, was sich als sehr nützlich erwiesen hat.

Umgesetzt habe ich mir dann meinen „Lichtschalter“, mit C#. Damit hab ich die wenigste Arbeit, die Befehle zu senden.

Diese 4 Zeilen sind genug, um den Befehl an die Bridge zu senden. Hierbei sollte man nur darauf achten, dass die Daten via „PUT“ gesendet werden müssen. Auf diese Weise kann man das Licht ein- und ausschalten, die Farbe ändern, das Licht blinken lassen oder andere Effekte erzeugen. Mit ein paar zusätzlichen Zeilen kann man Beispielsweise das Licht nach dem Ablauf eines Timers blinken lassen. Eine weitere Verwendungsmöglichkeit wäre, dass man Events aus anderen Programmen abfängt und das Licht darauf reagieren lässt. Allerdings ist man hierbei darauf angewiesen, dass die Programme eine Möglichkeit bieten, genau dies zu machen.

Sort:  

Congratulations @gaensebluemchn! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Do not miss the last announcement from @steemitboard!

Congratulations @gaensebluemchn! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Congratulations @gaensebluemchn! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

Congratulations @gaensebluemchn! You received a personal award!

1 Year on Steemit

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @gaensebluemchn! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.29
TRX 0.11
JST 0.033
BTC 63901.15
ETH 3133.40
USDT 1.00
SBD 4.05