-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This is where we are documenting the set up of the Reading Hydro server. The server is used to host:
- The readinghydro.org website
- The data API that provides the data for the performance charts on the website
- The PostgreSQL database that holds the history of data generated from the turbine activity
- The data collector app that subscribes to the data feeds from MQTT and stores the data in the database
- The MQTT broker that handles the pub/sub method of getting data out of the turbine building
We capture data from:
- The control panel in the turbine building, every 10 minutes. This gives us power generation data, water levels, and a calculated flow rate, as well as information about how the turbine is performing - screw spin speeds, gearbox temperatures, etc.
- An environment sensor in the turbine building, every 10 minutes. This gives us room temperature, humidity, light levels, and importantly from a security perspective it tells us if there is any movement inside the building.
- A smoke detector.
- A door sensor, which detects when the door has been opened or closed - useful for security.

We have installed a Raspberry Pi running Node Red, and this interrogates the PLC every 10 minutes, gathering the latest set of data. It then publishes this data to an MQTT broker.
On the readinghydro.org server we are running a program called hydro-collector, which subscribes to the MQTT feed and stores the data it receives from the Pi into our PostgreSQL database.

The sensors transmit data from time to time. The door sensor sends messages whenever the front door is opened or closed. The smoke detector sends a message when smoke is detected. The environment sensor sends messages every 10 minutes.
Messages are received by any LoRaWAN gateways in the area (there is one on the turbine building) and forwarded onto the network server. The network server validates that the messages have come from a known sensor, decodes the message and publishes it on its MQTT broker.
On the readinghydro.org server we are running a program called hydro-collector, which subscribes to the MQTT feed and stores the data it receives from the Pi into our PostgreSQL database.
The data API is documented and kept up to date here: Data API definition for Reading Hydro and
Reading Hydro Data API
TODO: At some point it would be a good idea to reformat this document and move it into this Wiki