This repository contains files and source code for a weather station project done in course Internet of Things at university of Oulu.
Listing of folders and their contents
/lib- Libraries needed for Pico to run the weather station/src- Micropython source code for Pico/web- Services that enable the web interface and backend services to process sensor data
NOTE: You need to use this firmware for the Pico in order to get the SSL working correctly
-
Copy the
config.template.pyfile toconfig.py:copy config.template.py config.py
-
Setup HiveMQ Cloud account: https://console.hivemq.cloud/
- Create new account and cluster
- Go to Access Management and add new credentials
- Set permission to PUBLISH_SUBSCRIBE
- Go to Overview and copy the MQTT broker URL
- Go to Web Client tab and connect to the MQTT broker
- Add Topic Subscriptions
- sensors/temperature_in
- sensors/temperature_out
-
Update the
config.pyto reflect your personal configurations.ssid = '' # WiFi name pwd = '' # WiFi password MQTT_BROKER = '' # MQTT broker URL MQTT_PORT = 8883 # Default MQTT port MQTT_USER = '' # MQTT username MQTT_PWD = '' # MQTT password -
Upload the files to Pico.
/libfolder- main.py
- config.py
- Run
main.pywith Thonny IDE or other MicroPython IDE.
