asterism-for-domotics v0.10.3
asterism-for-domotics is a Domotics oriented standalone software, based on asterism framework.
NOT cloud based (local & private service). Made in NodeJS & Material interface.
Development progression / Roadmap available here (asterism and plugins)
Prerequisites
- A private server remaining ON to run the background application (Linux like), reachable in a protected network area only (public version with authentication will come later),
- One or more clients to display and control the dashboard via a Chrome browser (tablet, computer, mobile phone...).
- Server part is not compatible with Microsoft Windows OS. Web part is compatible with Google Chrome & Chromium only, >= 71.
As this package uses plugins that need specific settings before installation (third part softs prerequisites), you need to complete these steps first of all:
- Zwave open-zwave library (skip if you don't need it)
Quick install guide
git clone https://www.github.com/gxapplications/asterism-for-domotics.git
This will clone the project. You can modify your settings (used plugins) in the index.js if you want different plugins. Do it before setup step!
npm run setup
This will install without development/test dependencies (will use less disk space). This will install more than 1100 dependencies in about 5 to 15 minutes. A build is done just after (using webpack) to compile asterism and selected plugins (can take several minutes). And then a choice can be made: either to use local HTTP / local self signed HTTPS / full public HTTPS with your own domain name.
npm start
You can start it for test. You should use PM2 for production (for auto-restart, log management, ...) Server will start after setup automatically. But you can restart it directly with this.
Update guide
npm run update
Install on PM2
After playing setup process (npm run setup), you can use PM2 to have a serious production exploitation.
- Install PM2 globally, from npm. Root privileges may be required:
npm install -g pm2
- Optionally install PM2 log-rotate plugin:
pm2 install pm2-logrotate
- Install and save PM2 ecosystem for asterism-for-domotics:
pm2 start pm2.config.js
This will automatically start asterism process.
- Check installation:
pm2 ls
- To start & stop asterism:
pm2 start asterism
pm2 stop asterism
- To auto-start PM2 at OS boot:
pm2 startup
And follow the instructions.
For more details about PM2, see http://pm2.keymetrics.io/docs
Warning: asterism server is statefull: do NOT use multiple instances/cluster (no load balancing available)
Update it from PM2
pm2 pull asterism
This stops the service, updates it from Github, updates dependencies, build webpack files, and then restart the process. This can take several minutes! TODO : test if this line is done: post_update: "npm run update"
Troubleshooting
Allow a Raspberry Pi to use port 80 (without sudo at startup)
sudo setcap 'cap_net_bind_service=+ep' $(which node)
Project under beta testing development
asterism is for now in public testing stage, for 2019. You are welcome to use it and test it. Stable release is scheduled for 2020.
:copyright: 2017-2019 GXApplications. [ Roadmap/Milestones | License ]