130 lines
3.8 KiB
Markdown
Raw Normal View History

2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
2019-07-16 20:01:00 +01:00
# Orvibo B25 Smart Socket Server (Kex)
2017-10-15 13:35:26 +11:00
2019-07-16 20:11:39 +01:00
A server to control the B25 range of wifi Smart Sockets.
2017-10-15 13:35:26 +11:00
2019-07-16 20:01:00 +01:00
This server was largely based on the work done by [Sandy Milne](https://github.com/sandysound).
2019-07-14 15:51:34 +01:00
2017-10-15 13:35:26 +11:00
## Getting Started
2019-07-16 20:01:00 +01:00
To run this server you will need to have Node.js installed. I run v11.
2017-10-15 13:35:26 +11:00
2017-10-23 20:44:32 +11:00
You will need to add the Orvibo PK key to decrypt and encrypt the initial packets.
You can find this using helpful bash script from Grayda [getKey.sh](https://gist.github.com/Grayda/eb48093bcfb96bfeec9c58ea301f2668) (you may have to add www to to url to make it work)
2017-10-23 20:44:32 +11:00
Once you have this key you will need to add it the ``OrviboSettings.js`` file or you can pass it into as part of the settings object when you create the orvibo server object.
2017-10-15 13:35:26 +11:00
For each socket on your network you will need to add its MAC address (colons removed and lower cased) to the plugInfo array as a uid and give it a name field for easier identification.
Because these new sockets don't use UDP packets to communicate like the older versions you will also need to redirect all traffic from the host name ``homemate.orvibo.com``
2017-10-15 13:35:26 +11:00
on TCP port 10001 the computer running the server.
2019-07-14 15:51:34 +01:00
I used an Ubuntu machine running dnsmasq and set this server as my DNS server in my router but depending on your network you might have to do it differently. Most routers will let you modify your DNS settings under the WAN settings.
2019-07-14 15:51:34 +01:00
Make sure to set a static IP address to the computer that will be running the Ubuntu server (In following example, the ip of machine running this server is at 192.168.0.106)
2017-10-15 13:35:26 +11:00
```
server=8.8.8.8
address=/homemate.orvibo.com/192.168.0.106
2019-07-14 15:51:34 +01:00
```
To confirm your dnsmasq is working, when visiting ``homemate.orvibo.com:10001`` from your browser the server should return a response.
2019-07-16 20:11:39 +01:00
You will know things are working when you hit the server in your browser (for Example.js this would be ``http://localhost:3000``) and start seeing your sockets in the array.
2019-07-16 20:11:39 +01:00
Just a note: If you try to add a socket after you've redirected the DNS you will be ale to setup WiFi and use it with this library but your phone will probably timeout when trying to add the device to the official Orvibo server.
2019-07-14 15:51:34 +01:00
2017-10-15 13:35:26 +11:00
2019-07-16 20:11:39 +01:00
### Installing
2019-07-14 15:51:34 +01:00
2017-10-23 20:44:32 +11:00
From Github
2017-10-15 13:35:26 +11:00
Clone the repo and then run
```
2019-07-14 15:51:34 +01:00
npm install
2017-10-15 13:35:26 +11:00
```
2019-07-16 20:01:00 +01:00
to install the dependencies
2019-07-14 15:51:34 +01:00
2017-10-15 13:35:26 +11:00
2019-07-16 20:11:39 +01:00
### Usage
2019-07-14 15:59:05 +01:00
## Docker
2019-07-16 20:11:39 +01:00
Easiest way to use this is to run it in a docker container.
2019-07-14 15:59:05 +01:00
PK and PlugArray can be passed in via enviroment variables.
2019-07-16 20:11:39 +01:00
- orviboPK = 'xxxxx'
- plugArray = 'uid:MACADDRESS,name:PRINTERNAME'
2019-07-14 15:59:05 +01:00
Example run command -
2019-07-16 20:11:39 +01:00
docker run --env orviboPK='OrviboPKkey' --env plugArray='uid:MACADDRESS,name:PLUGNAME' -p 3000:3000 -p 10001:10001 karl0ss/orvibo-b25-server
2019-07-14 15:59:05 +01:00
Docker-Compose example -
2019-07-16 20:11:39 +01:00
orvibo-b25-server:
2019-07-14 15:59:05 +01:00
container_name: orvibo-b25-server
environment:
- PGID=${PGID}
- PUID=${PUID}
- TZ=${TZ}
image: karl0ss/orvibo-b25-server
ports:
- "3000:3000"
- "10001:10001"
restart: unless-stopped
environment:
2019-07-16 20:11:39 +01:00
- orviboPK=OrviboPKkey
- plugArray=uid:MACADDRESS,name:PLUGNAME
volumes:
2019-07-14 15:59:05 +01:00
- /etc/localtime:/etc/localtime:ro
2019-07-16 20:11:39 +01:00
2019-07-14 15:59:05 +01:00
2017-10-15 13:35:26 +11:00
## Configuration
## Confirmed Working Models
A list of Orvibo devices, confirmed by contributors, that work with this project:
2019-07-17 09:07:46 +01:00
| Device Name | Product ID | Confirmed By |
| --- | --- | --- |
| Orvibo Smart Socket (EU/AUS) | B25 | @sandysound |
| Orvibo Smart Socket (US/CAD) | S25 | @wichopy |
| Orvibo Smart Socket (UK/GB) | B25UK | @valchonedelchev |
2019-07-16 20:11:39 +01:00
2017-10-15 13:35:26 +11:00
## Contributing
2019-07-16 20:11:39 +01:00
## Authors
2017-10-15 13:35:26 +11:00
2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
* **Karl Hudgell** - [Karl0ss](https://github.com/karl0ss/)
2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
2017-10-23 20:44:32 +11:00
2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
## License
2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
2017-10-15 13:35:26 +11:00
2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
This project is licensed under the Apache 2.0 License - see the [LICENSE.md](LICENSE.md) file for details
2017-10-15 13:35:26 +11:00
2019-07-14 15:51:34 +01:00
2017-10-15 13:35:26 +11:00
2019-07-16 20:11:39 +01:00
## Acknowledgments
2017-10-15 13:35:26 +11:00
2019-07-14 15:51:34 +01:00
2019-07-16 20:11:39 +01:00
Big thanks to [Grayda](https://github.com/Grayda/) and [insertjokehere](https://github.com/insertjokehere) and [Sandy Milne](https://github.com/sandysound)
2017-10-15 13:35:26 +11:00
2019-07-14 15:51:34 +01:00