Let's create a smart home, without giving anyone access to our house 😊.
Open-source server to control IoT devices in a local home network.
In this project, I came to solve a number of troublesome. first of all, anyone who uses a number of smart devices (smart IR, smart socket, or anything like that) of different companies knows the problem of dealing with a number of different applications, hold 10 applications for each home appliance that each is completely different in the interface and operations and authentication, it's a very annoying thing and in addition, the servers, some of which are small Chinese companies, do not always work well, so there is no external access, and there is no normal and clear message about why it does not work.
And the biggest thing is a security issue, I don't want to trust any company code/server in my home. I want to use open-source only. when I can make sure that no one tracks me or any other malicious code runnig in my home. also, I want to block all of my Chinese devices from communicating any server outside my local network.
As a solution to these problems this project consolidates all the smart home appliances into one simple and clear and easy to access API. and it runs on a computer (or any other device that can run node.js, tested on Windows 10 and Linux Ubuntu) at home and does not require connection to the internet to work properly.
The logic and design of the server is that there are several types of devices in the world, such as a lighting device, an AC device etc, and for each physical device its own module that realizes the capabilities that the device of its kind enables,(and the advanced options that each company realizes in a different way like timing, thrown), and on all devices there is a switch component with on\off option.
This structure enables the creation of a separate server and a collection of modules that enable communication by implementing preset methods for each device type (such as the OOP interface).
Minimal page (only 5 kb of resources should be transferred !!!) for old phones or very slow networks.
Link to the minimal page exist in the settings 'light version' section, or just navigate to [server-ip/host]/light-app/index.html
.
- Casanet server:
- Dashboard:
- Purpose: The dashboard app (frontend) to control the IoT devices (using casanet server API).
- Technologies: Angular (using angular material).
- Remote server:
- Purpose: Forward API requests from the wide internet to the local casanet servers.
- Technologies: Node.js (using TypeScript + TSOA + PostgreSQL).
- Remote dashboard:
- Purpose: Management dashboard for the remote server admin (using remote server API)
- Technologies: Vue.js (using vue material).
- RF commands repository:
- API (for local and remote server):
- Technologies: Swagger.
The UI built to be multi-Language support.
Current Languages supported:
- English
- Hebrew
Any support for other languages will be welcome.
- Run casa-net server in a home network see documentation.
- Run casa-net remote server in cloud service see documentation.
The server needs to run on local home network, so how to access it via internet?
Make sure that the address in your home is public and redirect ports in home router to the computer that running casa-net server.
(DDNS is recommended for easy access to home address).
The casa remote server is built for it, casanet-remote run on cloud service and used to redirect API requests to the local server.
-
Orvibo (aka wiwo)
- S20 (socket). link
-
Broadlink
-
Yeelight
-
Tuya (aka smart life)
-
Mi (aka xiaomi)
-
Tasmota
-
IFTTT module. module use documentation..
- Toggle.
- Switch.
-
MQTT module. module use documentation.
- Toggle.
- Switch.
- Air-conditioning.
- Light
- Temperature.
- Color.
- Roller.
-
Mock (for testing only)
- Toggle demo.
- Switch demo
- Air-conditioning demo.
- Light demo.
- Temperature light demo.
- Color light demo.
- Roller demo.
Yes, it is possible and will be welcome, see modules.
-
Buy new supported smart devices or use the
mock
brand. -
Connect it to local network via official app.
-
Say hello to the new minion and change the current status ;)
-
Enjoy.
To watch full API specs use swagger UI and put https://raw.githubusercontent.com/casanet/casanet-server/master/backend/swagger.yaml
in explorer input.
** Minion is a logic device in the system, meaning that a device is a physical device and minion is a logic device that uses a physical device to switch home kit status. For example, an IR transmitter can be one physical device for a few minions, one to central AC control and second for secondary AC control so in it will be two totally different minions that use one physical device.
The IFTTT ecosystem is great ;). Now, invoking trigger when a minion turned on/off or turning on/off minion when any IFTTT trigger invoked is possible.
The integration is using WebHooks API.
Receiving invoked triggers allow only if casa-net server accessible via public internet or via a remote server.
Invoking trigger when a device turned on/off the local server require an internet connection.
See step by step instraction to use IFTTT.
- Finish UI of casanet local server.
- Faster boot time for the angular dashboard app.
Feel free to open an issue with a bug report or feature to develop for the next version.
For any suggestion or help feel free to contact me.
Although there is no way to run the server in a docker container because the app should scan the real local network. I made a Linux image for several devices.
- Orange Pi One H3 512MB based
Armbian_5.83
Debian_stretch
. - Orange Pi Zero H2 512MB based
Armbian_5.83
Debian_stretch
. - Orange Pi Zero H2 512MB based
Armbian_5.83
Debian_stretch
.- (With hotspot SSID:
CASANET
pass:casanet-is-the-best?
.
- (With hotspot SSID:
Username: root
\ casanet
Password: casa-net
.
All configured to run the server on boot in port 80.
The server runs on tmux window named "casanet".
- Logo and UX consulting Ofek Avergil.
Shared with ❤️ by kastnet.
The version 1 of the project placed in here, maintaining for security and fatal bugs fixes only.