This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class VavBoxController: | |
''' | |
TODO add in - | |
state machines for sensor reliability | |
air flow PID control for damper | |
integral windup prevention | |
occupancy state for unoc setpoints | |
''' | |
def __init__( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import random | |
import time | |
BASE_URL = "http://localhost:8000" | |
def simulate_sensor_reading(sensor_name): | |
# This function simulates reading a sensor by generating a random value. | |
# Replace this logic with actual sensor reading if integrating with real sensors or systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
I may expand on this so lets say this one is v0.0.1 | |
Bring up the bacpypes3 console with debug | |
$ python3 tester.py --debug | |
run on static IP for UDP port 47820 with passing in Address arg | |
$ python3 tester.py --address 10.7.6.201/24:47820 --debug | |
See all available commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import strawberry | |
from fastapi import FastAPI | |
from strawberry.asgi import GraphQL | |
from typing import Tuple | |
import pandas as pd | |
# Sample DataFrame for Zones | |
zone_data = { | |
'Zone1_Temp': [20, 21, 19], | |
'Zone2_Temp': [22, 23, 21], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openai | |
import json | |
# Example usage of a valve for a job: | |
flow_rate = 5 # GPM | |
delta_p = 3 # PSI | |
specific_gravity = 1 | |
fluid_type = "water" | |
is_three_way = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an Alpine Linux base image for Raspberry Pi | |
FROM arm32v7/alpine:latest | |
# Set the working directory in the container | |
WORKDIR /app | |
# Install necessary packages and dependencies | |
RUN apk --no-cache add python3 python3-dev py3-pip | |
# Install BACpypes and any other required dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import BAC0 | |
import time | |
import random | |
bacnet = BAC0.lite() | |
while True: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.