Skip to content

Simple BACnet API IoT app for demand response on client side or building.

Notifications You must be signed in to change notification settings

bbartling/demand-response-research

Repository files navigation

demand-response-research

Building side research project with open ADR

make virtual env

python -m venv drenv

activate virt env

. drenv/bin/activate

pip install python packges

pip install bacpypes3 openleadr ifaddr

Linux service notes

# 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:

[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

# 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

# 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

About

Simple BACnet API IoT app for demand response on client side or building.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published