Watch your solar invertor by YOURSELF!
Communicate with rs232 part by https://github.com/prajna-pranab/converse
Read data from invertor and send to remote web server.
Collect data with web server log, and send data to web browser.
Browser side chart source code.
npm install
npm run dev
npm run build
- make sure web sever is ready
- Change deploy settings
- Deploy app
Nginx site config example
upstream app {
server 127.0.0.1:7777;
}
server {
listen 80;
return 301 https://your-domain.com;
}
server {
listen 443 ssl;
server_name your-domain.com;
add_header Access-Control-Allow-Origin *;
location ~* \.io {
proxy_pass http://app;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
}
location / {
root /app/yourapp/dist;
}
}
There are some setting you MUST change before execute the deploy action
#!/bin/bash
# change to your server ip
REMOTE_IP_ADDRESS=0.0.0.0
# change to your remote path to deploy app
REMOTE_PATH=~/myapp
Execute
sh ./deploy