Software running on an ESP32 to report measurements taken from atlas sensors
it pushes collected measurements to an InfluxDB bucket
Install the Arduino IDE
Copy the all libraries from /libraries to your Arduino's library location, usually at ~/Documents/Arduino/libraries
cp -R ./libraries/* ~/Documents/Arduino/libraries
or create a symlink 😏
ln -fs /Users/<user>/autoponico/arduino/libraries /Users/<user>/Documents/Arduino/libraries
Open the .ino file with Arduino IDE, compile and happy upload 🔥
Note
To update from webapp, generate the .bin file from Arduino IDE, rsync it to the ws-server and send command management update from webapp, it will tell the Arduino to download that file and apply updated firmware.
pingphcal_lowcal_midcal_highcal_clearread_ph
ec: bypass AT commands to Atlas sensor eg:ec RsendsRto sensor serialcontrolph_upph_downph_setpointph_autoec_upec_downec_setpointec_autoinfo
managementrebootupdatewifi: Set SSID and password:management wifi <SSID>,<password>info
influxdbinfoGet influxdb infoupdatePass the entire object{"enabled": "true", "url": "", "org": "", "bucket": "", "token": ""}
kalmaninfo
NodeJS program using typescript to handle websockets between webapp and Arduino boards
Move to dir cd ./ws-server
Install packages yarn install
Run with env (cat .env | xargs) nodemon main.ts
For production, run with env (cat prod.env | xargs) ts-node main.ts
Note
sudo snap install --classic certbot sudo certbot certonly --standalone -d autoponico-ws.tucanorobotics.co
The webapp dashboard controls Tasmota devices via MQTT. Each device must be configured to connect to the ws-server MQTT broker.
Go to https://tasmota.github.io/install/ and flash Tasmota if needed
- Host: IP of the machine running ws-server
- Port:
1883 - Topic: Must match one of the defined device topics:
fresas,valvula-tanque,luz-cannabis,main-pump - Full Topic:
%prefix%/%topic%/
Apply via Console (http://<device-ip>/cs):
Template {"NAME":"Sonoff Basic R4","GPIO":[0,0,0,0,224,0,544,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0],"FLAG":0,"BASE":1}
Module 0
GPIO mapping: GPIO4 = Relay1, GPIO6 = LED1, GPIO9 = Button1.
For other devices, find your template at templates.blakadder.com.
NextJS bootstraped app, check webapp/README.md for more info