Skip to content

boboshko/zarya-meteostation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Version Community Chat

Zarya Meteostation

A homebrew meteo-station based on Iskra JS (in Russian) shield, able of collecting weather data and sending it to server. Works with a specific API.

💫 Chasing a dream.

Preparations

Buy and build a station from the list below. Update its firmware with a help of Espruino Web IDE.

Components

Component Cost in rubles
Iskra JS 1 490 ₽
Slot Shield 580 ₽
Wi-Fi (ESP8266) 850 ₽
Analog thermometer (TMP36) 310 ₽
Real-time clock (DS1307) + Battery (CR1225) 470 ₽ + 90 ₽
Barometer (LPS331AP) 840 ₽
Total 4 630 ₽

Quick start

Launch Espruino Web IDE и and copy all the sketch.js contents. Config the firmware as described below. Delete all the unnecessary comments and upload it to Iskra JS.

Use the table of values at the end of this readme if you have trouble understanding the key-value pairs.

Connecting to Wi-Fi

Change your Wi-Fi network settings in SSID и PSWD keys.

API requests

Authorizing

Change host, port и path parameters in options to connect to the API server. Use Base64-encoded login and password in Authorization.

Unencoded login and password:

Login:Password

Encoded login and password (Base64):

TG9naW46UGFzc3dvcmQ=

A list of services that can help to encode in Base64:

Geolocation

Geolocation is set up manually once when setting up the weather station in sensorsData with City and Street parameters. They are automatically replaced with NULL if being omitted.

Data exchange frequency

The weather station sends request once a minute (60000 ms) and redirects received data to API server immidiately. This can be changed in setTimeout which is used twice in firmware code (strings 57 and 110). It’s recommended to use same value in both places.

Table of parameters

This table explains what the main variables from sketch.js actually are.

Key Value
SSID Wi-Fi network id
PSWD Wi-Fi password
host IP or URL of an API server
port API server’s port
path URL of an API request
Authorization Login and password to access API server (Base64)
station_id ID of your meteostation