Connect your Aranet4 to ESP32 and view measurements in browser or send them to InfluxDB and MQTT server.
- Set up Arduino with ESP32 board library (tested on v1.0.6)
- Install Arduino libraries:
- Compile and flash ESP32
- For image resources SPIFFS also needs to be flashed. Install arduino-esp32fs-plugin and after restarting Arduino IDE use Tools->ESP32 Sketch Data Upload
-
On first boot, Wi-Fi access point will be created. SSID by default is
Aranet4-ESP32 Bridge
and password:Ar@net4Br1dge
. You can change these inconfig.h
file. -
When connected to AP go to http://192.168.4.1 and make sure page opens. Username and password will be required here. By default, username is
admin
and password is blank. You can also change username inconfig.h
file. -
When connected to AP, go to settings: http://192.168.4.1/settings. Enter your Wi-Fi name and password here. After restart, ESP32 will connect to this network.
-
ow you can pair ESP32 with Aranet4. In home screen click
Add new device
or go to http://<ip>/scan. Wait for scan to end (5 seconds) and clickPair device
to start pairing process. -
PIN code dialog should now pop up. Enter PIN code shown on Aranet4 screen and click OK. Your Aranet4 now should be paired with ESP32.
Now in home screen You should see measurements from all paired Aranet4 devices.
If InfluxDB is set up, all measurements will be sent to database right after new measaurement has been made.
If Some measurements have been skipped, since last successful measurement, program will atempt to read and send missed measurements, with adjusted timestamp.
If MQTT client is set up, it will send measurements to server right after new measaurement has been made. Data is sent to following topics:
aranet4bridge/sensor/<deviceid>/co2
aranet4bridge/sensor/<deviceid>/temperature
aranet4bridge/sensor/<deviceid>/pressure
aranet4bridge/sensor/<deviceid>/humidity
aranet4bridge/sensor/<deviceid>/battery
Aranet4 name is used for <deivceid>
. If name is Aranet4 000ABC
, <deviceid>
will be aranet4-000abc
MQTT client will also send Home Assitant MQTT integration compatible discovery message to aranet4bridge/sensor/<deviceid>-<measurement>/config