diff --git a/src/ui/Domo/docs/lights.txt b/src/ui/Domo/docs/lights.txt new file mode 100644 index 00000000..6efd6234 --- /dev/null +++ b/src/ui/Domo/docs/lights.txt @@ -0,0 +1,54 @@ +curl -v http://192.168.1.6:8081/v1/capabilities/lights +* Hostname was NOT found in DNS cache +* Trying 192.168.1.6... +* Connected to 192.168.1.6 (192.168.1.6) port 8081 (#0) +> GET /v1/capabilities/lights HTTP/1.1 +> User-Agent: curl/7.35.0 +> Host: 192.168.1.6:8081 +> Accept: */* +> +< HTTP/1.1 200 OK +< Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept +< Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS +< Access-Control-Allow-Origin: * +< Cache-Control: no-store, no-cache, must-revalidate, max-age=0 +< Connection: close +< Content-Type: application/json; charset=utf-8 +< Pragma: no-cache +< +{ + "Lights" : [ + { + "id" : 1, + "interruptor" : 0, + "name" : "Bureau JB", + "sender" : 12797322, + "speach_name" : "bureau", + "state" : true, + "zone" : "" + }, + { + "id" : 2, + "interruptor" : 1, + "name" : "Salon", + "sender" : 12797322, + "speach_name" : "salon", + "state" : false, + "zone" : "" + }, + { + "id" : 3, + "interruptor" : 2, + "name" : "Sapin", + "sender" : 12797322, + "speach_name" : "sapin", + "state" : false, + "zone" : "" + } + ], + "id" : "/v1/capabilities/lights", + "response_code" : 200, + "status" : "OK" +} + +* Closing connection 0 diff --git a/src/ui/Domo/package.json b/src/ui/Domo/package.json index 1843709f..956686b7 100644 --- a/src/ui/Domo/package.json +++ b/src/ui/Domo/package.json @@ -16,6 +16,7 @@ "fastclick": "^1.0.6", "font-awesome": "^4.6.1", "vue": "^1.0.21", + "vue-resource": "^0.7.0", "vue-router": "^0.7.13", "vux": "0.0.116" }, diff --git a/src/ui/Domo/src/components/Light.vue b/src/ui/Domo/src/components/Light.vue new file mode 100644 index 00000000..4ceed585 --- /dev/null +++ b/src/ui/Domo/src/components/Light.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/ui/Domo/src/components/Lights.vue b/src/ui/Domo/src/components/Lights.vue index c85f25fc..d5e43f00 100644 --- a/src/ui/Domo/src/components/Lights.vue +++ b/src/ui/Domo/src/components/Lights.vue @@ -1,6 +1,107 @@ + diff --git a/src/ui/Domo/src/main.js b/src/ui/Domo/src/main.js index a4c5c390..ddac009d 100644 --- a/src/ui/Domo/src/main.js +++ b/src/ui/Domo/src/main.js @@ -1,5 +1,6 @@ import Vue from 'vue' import Router from 'vue-router' +import VueResource from 'vue-resource' import App from './App' @@ -13,6 +14,7 @@ import Settings from './components/Settings' const FastClick = require('fastclick') FastClick.attach(document.body) +Vue.use(VueResource) Vue.use(Router) Vue.config.devtools = true