https://github.com/bbartling/demand-response-research
Simple BACnet API IoT app for demand response on client side or building.
https://github.com/bbartling/demand-response-research
Last synced: 10 months ago
JSON representation
Simple BACnet API IoT app for demand response on client side or building.
- Host: GitHub
- URL: https://github.com/bbartling/demand-response-research
- Owner: bbartling
- Created: 2023-08-12T18:40:39.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2024-03-11T16:20:55.000Z (about 2 years ago)
- Last Synced: 2025-05-25T14:47:18.756Z (about 1 year ago)
- Language: Python
- Size: 323 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# demand-response-research
Building side research project with open ADR
### make virtual env
```bash
python -m venv drenv
```
### activate virt env
```bash
. drenv/bin/activate
```
### pip install python packges
```bash
pip install bacpypes3 openleadr ifaddr
```
### Linux service notes
```bash
# make systemd file
$ cd /etc/systemd/system
### edit file
$ sudo nano adr_client.service
```
### Edit systemd file contents with nano and make sure to set your paths and `WorkingDirectory`:
```bash
[Unit]
Description=ADR Client Service
After=network.target
[Service]
User=dr
ExecStart=/home/dr/drenv/bin/python /home/dr/dr_app/app.py --name Slipstream --instance 3056672 --debug
WorkingDirectory=/home/dr/dr_app/
[Install]
WantedBy=multi-user.target
```
### Start the linux service
```bash
# Start linux service
$ sudo systemctl enable adr_client.service
# Start linux service
$ sudo systemctl start adr_client.service
# Check status
$ sudo systemctl status adr_client.service
# Tail logs
$ sudo journalctl -fu adr_client.service
```
### Commands if you need to restart the service if some change in the script or config was made
```bash
# stop linux service
$ sudo systemctl stop adr_client.service
# Reload if app code needs to be changed
$ sudo systemctl daemon-reload
# Restart linux service
$ sudo systemctl restart adr_client.service
```