mirror of
https://github.com/karl0ss/orvibo-b25-server-kex.git
synced 2025-04-29 12:53:40 +01:00
commit
ebb04d5c08
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"docker.defaultRegistryPath": "karl0ss"
|
||||
}
|
2
index.js
2
index.js
@ -45,7 +45,7 @@ orvibo.startServer();
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
let sockets = orvibo.getConnectedSocket();
|
||||
// let sockets = [{name: "Plug1", state: 1, uid: "222222"},{name: "Plug2", state: 0, uid: "111111"}]
|
||||
// let sockets = [{name: "Plug1", state: 1, uid: "222222", modelId: "f8b11bed724647e98bd07a66dca6d5b6"},{name: "Plug2", state: 0, uid: "111111", modelId: "f8b11bed724647e98bd07a66dca6d5b6"}]
|
||||
|
||||
if (req.query.uid != undefined) {
|
||||
orvibo.toggleSocket(req.query.uid);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "orvibo-b25-server-kex",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"description": "A server to control the Orvibo B25 range of smart sockets",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -36,6 +36,12 @@ body {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.socket-image {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
|
||||
.button-off {
|
||||
background-color:#fc0000;
|
||||
-moz-border-radius:28px;
|
||||
|
BIN
server/images/b25.jpg
Normal file
BIN
server/images/b25.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 73 KiB |
BIN
server/images/b25UK.jpg
Normal file
BIN
server/images/b25UK.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
@ -8,6 +8,13 @@ block content
|
||||
else
|
||||
each socket in sockets
|
||||
div.socket
|
||||
case socket.modelId
|
||||
when 'f8b11bed724647e98bd07a66dca6d5b6'
|
||||
div.socket-image(style=`background: url('/images/b25UK.jpg') top center
|
||||
no-repeat; background-size: cover;`)
|
||||
//- when '123'
|
||||
//- div.socket-image(style=`background: url('/images/b25.jpg') top center
|
||||
//- no-repeat; background-size: cover;`)
|
||||
h2.socket-name
|
||||
| #{socket.name}
|
||||
h2.socket-name
|
||||
|
Loading…
x
Reference in New Issue
Block a user