{"id":3565,"date":"2018-10-09T11:08:43","date_gmt":"2018-10-09T09:08:43","guid":{"rendered":"https:\/\/moe.it.slotshaven.dk\/wp\/?p=3565"},"modified":"2018-10-09T11:08:43","modified_gmt":"2018-10-09T09:08:43","slug":"phillips-hue","status":"publish","type":"post","link":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/phillips-hue\/","title":{"rendered":"Phillips Hue"},"content":{"rendered":"\n<p>Her skal vi se p\u00e5 hvordan man styrer automation lys-systemet Phillips Hue via systemets eget API. I sidste ende bliver vi i stand til at kontrollere belysning med javascript, baseret p\u00e5 de input vi har lyst til at bruge.  <\/p>\n\n\n<p>https:\/\/developers.meethue.com\/documentation\/getting-started<\/p>\n<p>Find din egen ip-adresse<\/p>\n<p>win: ipconfig \/ mac: ifconfig<\/p>\n<p>Find hue-bridge adresse:<\/p>\n<p>Kig i app&#8217;en under bridge info<\/p>\n<p>Brugernavn: f\u00e6lles &#8211; f\u00e5 det p\u00e5 tavlen<\/p>\n<h2>API: Phillips Hue REST<\/h2>\n<p>Phillips Hue arbejder som et s\u00e5kaldt REST API. Det vil sige at man har nogle helt fast vedtagne regler for hvordan man skriver kommandoer til den bridge, som kontrollerer lamperne.<\/p>\n<blockquote>\n<p>Representational State Transfer (REST) is an architectural style that defines a set of constraints to be used for creating web services. Web services that conform to the REST architectural style, or RESTful web services, provide interoperability between computer systems on the Internet. REST-compliant web services allow the requesting systems to access and manipulate textual representations of web resources by using a uniform and predefined set of stateless operations. Other kinds of web services, such as SOAP web services, expose their own arbitrary sets of operations.<\/p>\n<p>https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer#RESTful_web_services<\/p>\n<\/blockquote>\n<p><a href=\"https:\/\/developers.meethue.com\/documentation\/getting-started\">Du kan f\u00f8lge intro-guiden her &#8211; men beslut f\u00f8rst hvem der styrer hvilke p\u00e6rer<\/a><\/p>\n<p>Dern\u00e6st kommer vi til selve api&#8217;et. Bem\u00e6rk at du skal oprette en brugerkonto for at se med. Her kan du se alle de mulige ting du kan g\u00f8re fra din bridge.<\/p>\n<p><a href=\"https:\/\/developers.meethue.com\/philips-hue-api\" target=\"_blank\" rel=\"noopener noreferrer\">Phillips Hue API<\/a><\/p>\n<h2>Phillips hue med node.js og p5.js<\/h2>\n<p><a href=\"https:\/\/minhaskamal.github.io\/DownGit\/#\/home?url=https:\/\/github.com\/simmoe\/digidaktik\/tree\/master\/sockets\/jshue\">Hent filerne her og pr\u00f8v selv\u00a0<\/a><\/p>\n<ol>\n<li>Start med at finde din hub&#8217;s ip og skriv den ind i filen osc-single-lamp.js<\/li>\n<li>k\u00f8r npm install fra terminalen<\/li>\n<li>k\u00f8r node bridge.js fra terminalen<\/li>\n<li>se om du kan f\u00e5 fat i din p\u00e6re<\/li>\n<li>se om du kan f\u00e5 wekinator forbundet med scriptet<\/li>\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>Her skal vi se p\u00e5 hvordan man styrer automation lys-systemet Phillips Hue via systemets eget API. I sidste ende bliver vi i stand til at kontrollere belysning med javascript, baseret p\u00e5 de input vi har lyst til at bruge. https:\/\/developers.meethue.com\/documentation\/getting-started Find din egen ip-adresse win: ipconfig \/ mac: ifconfig Find hue-bridge adresse: Kig i app&#8217;en &#8230; <a title=\"Phillips Hue\" class=\"read-more\" href=\"https:\/\/digitalteknik.slotshaven.it\/wordpress\/phillips-hue\/\" aria-label=\"Read more about Phillips Hue\">L\u00e6s mere <\/a><\/p>\n","protected":false},"author":3,"featured_media":3574,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[28,37],"class_list":["post-3565","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-den-fysiske-verden","tag-api","tag-hue"],"_links":{"self":[{"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/posts\/3565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/comments?post=3565"}],"version-history":[{"count":0,"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/posts\/3565\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/media?parent=3565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/categories?post=3565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalteknik.slotshaven.it\/wordpress\/wp-json\/wp\/v2\/tags?post=3565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}