---
# System prepended metadata

title: River Station and Center Server
tags: [Acer]

---

---
tags: 'Acer'
---

River Station and Center Server
===
## River Station
#### Tasks
- [ ] build ssh center for prd.xtaiwan.org
- [ ] change rp4 ssh client to prd.xtaiwan.org
- [ ] build dhcpd deamon for camera
- [ ] build ssh tunnel from camera to rp4 local port
- [ ] build rp4 report deamon including radar reading and relay control
#### Components
##### Camera
* Support camera streaming funciton ( RTSP )
* Voltage: 12V
* Interface: Modbus
##### Radar
* Water Level measuring function
* Flow Speed measuring function
* Voltage: 12V
* Interface: Modbus
##### Relay Switch 
* Interface: Modbus
##### Raspberry Pi 4
* build ssh reverse tunnel from camera to local port
* build ssh reverse tunnel from local port to center server
* Take camera snapshot for local image recognition
* Do image recongnition and put result in MongoDB
* Reading water level and water flow speed values and put into MongoDB
* Sync sensor value and relay status with server via mqtt

## Center Server
#### Functions
* SSH Tunnels Service
    * Manage and build ssh tunnels which request from river stations
* Camera Service
    * Get rtsp streamings which from river stations
    * Transfer rtsp streamings into websockets streaming for website usage
* MQTT Broker Service
* Http Service
    * Dashboard
## Structure
![](https://i.imgur.com/7jCkuzo.gif)

