{"id":48777060,"url":"https://github.com/bbartling/py-bacnet-stacks-playground","last_synced_at":"2026-04-13T13:07:02.893Z","repository":{"id":334985235,"uuid":"1143659459","full_name":"bbartling/py-bacnet-stacks-playground","owner":"bbartling","description":"Another AI generated course work in Python for 20 minute daily challenges in the Python BACnet stacks with BAC0 and bacpypes3.","archived":false,"fork":false,"pushed_at":"2026-04-10T14:39:15.000Z","size":280,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-04-10T16:15:33.324Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbartling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-27T21:12:03.000Z","updated_at":"2026-04-10T14:39:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bbartling/py-bacnet-stacks-playground","commit_stats":null,"previous_names":["bbartling/py-bacnet-stacks-playground"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bbartling/py-bacnet-stacks-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbartling%2Fpy-bacnet-stacks-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbartling%2Fpy-bacnet-stacks-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbartling%2Fpy-bacnet-stacks-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbartling%2Fpy-bacnet-stacks-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbartling","download_url":"https://codeload.github.com/bbartling/py-bacnet-stacks-playground/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbartling%2Fpy-bacnet-stacks-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-13T13:07:02.204Z","updated_at":"2026-04-13T13:07:02.876Z","avatar_url":"https://github.com/bbartling.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Py BACnet Stacks Playground\n\n[![Discord](https://img.shields.io/badge/Discord-Join%20Server-5865F2.svg?logo=discord\u0026logoColor=white)](https://discord.gg/Ta48yQF8fC)\n\n\n\n## **Applied Python + BACnet + Edge Automation for HVAC Controls Technicians, IoT Practitioners, and Building-Systems Tinkerers**\n\nWelcome to the **Py BACnet Stacks Playground** — a hands-on, applied repository that starts with Python fundamentals and direct BACnet scripting, then evolves into **AI-assisted edge automation demos**.\n\nThe early *vibe code* apps stay grounded in **Python, BAC0, and BACpypes3**, where you build practical tools by directly interacting with BACnet devices—reading values, writing commands, inspecting priority arrays, and understanding real control behavior in the field.\n\nFrom there, the project naturally expands into **VOLTTRON-based edge workflows**, where lightweight agents, platform services, and supervisory logic run continuously on a Raspberry Pi or edge gateway—bringing your scripts closer to real-world building automation deployments.\n\n---\n\n### 🤖 AI-Assisted Workflows (New Direction)\n\nThis repository also doubles as **model context for AI-assisted development**, enabling tools like Open Claw to:\n\n* Bootstrap environments (e.g., VOLTTRON installs, BACnet apps) automatically\n* Generate and refine BACnet scripts and edge agents\n* Assist with debugging, testing, and system setup\n* Orchestrate multi-step workflows across the stack\n\nThe goal is simple:\n👉 let AI handle the repetitive, time-consuming setup and glue code\n👉 while you focus on **control logic, system behavior, and engineering insight**\n\n---\n\n### 🚀 Where This Is Headed\n\n* Python → BACnet fundamentals → real device interaction\n* Edge deployment → VOLTTRON agents → continuous operation\n* AI integration → faster builds, smarter workflows, less manual setup\n\nUltimately, this repo becomes a **playground for building smarter buildings faster**—combining:\n\n* Hands-on HVAC controls knowledge\n* Open protocols like BACnet\n* Edge computing\n* And AI-driven development workflows\n\n\n---\n\n## Who This Is For\n\n- **HVAC controls technicians** who want to automate scans, collect data, and build simple tools\n- **IoT practitioners** working with building automation\n- **Anyone** who knows BACnet from the field and wants to code it in Python and play around with AI!\n\n---\n\n\n## What You Will Learn\n\n### Python (Applied Comp Sci 101)\n\n- Variables, arithmetic, strings, lists, dictionaries\n- Conditionals, loops, functions, modules, file I/O\n- Error handling with `try`/`except`\n- Simple algorithms: linear search, min/max, basic sorting\n- Basic objects and instances (no advanced OOP)\n\n**Scope:** Strings, lists, and dictionaries only. No advanced Python practices of list/dictionary comprehensions. No advanced data structures. See the `lessons` directory for the daily mini challenges and some of the YouTube videos demo theory lectures.\n\n---\n\n## Open Claw Model Routing Prompt\n\nJust drop this prompt right into Open Claw—it’s helped me avoid hitting API limits. I think it encourages the framework to use simple, low-cost models for easier tasks, while reserving more advanced (and expensive) models only for the tasks that truly require deeper reasoning.\n\n\n```text\n## Model Routing Policy\nWhen analyzing test results, classify each task before processing:\nSIMPLE (use primary model):\n- Pass/fail test results\n- HTTP status code errors (404, 500, timeout)\n- Missing UI elements or broken selectors\n- Test environment setup failures\n- Syntax errors or import failures\nCOMPLEX (use thinking model)\n- Unexpected behavior that passed but shouldn't have\n- Race conditions or timing-dependent failures\n- Security vulnerabilities\n- Performance degradation patterns\n- Failures that span multiple components or files\nDefault to SIMPLE unless the test result shows ambiguous or multi-layered behavior.\nAlways classify first, then process. Never use the thinking model for a task that fits the SIMPLE list.\n\n```\n\n\n---\n\n\n## Vibe Code Checkpoints\n\n| Checkpoint   | What to Build                                                                                                                                       | When       |\n| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |\n| **1**        | **BAC0 + bacpypes3 basics:** read `present-value`, write to a point, write null (release), understand commandable objects + priority levels         | **Week 1** |\n| **2**        | **RPM apps (BAC0 + bacpypes3):** ReadPropertyMultiple across devices, log to CSV, implement daily rotation (`csv` module)                           | **Week 2** |\n| **3**        | **Priority Array tools:** read + parse `priority-array`, inspect overrides, understand control authority                                            | **Week 3** |\n| **4**        | **BACnet server apps:** mini device, schedule/calendar objects, weather server using OpenWeatherMap                                                 | **Week 4** |\n| **5**        | **Device discovery tools:** Who-Is / I-Am scanning, device enumeration (BAC0 + bacpypes3)                                                           | **Week 5** |\n| **6**        | **COV monitoring apps:** subscribe to Change-of-Value, stream live updates from devices                                                             | **Week 6** |\n| **7**        | **Open Claw + VOLTTRON bootstrap:** auto-provision VOLTTRON on edge (e.g., Raspberry Pi), build a simple BAS/BMS-style GUI (lightweight “vibe app”) | **Week 7** |\n| **8**        | **Advanced BAS web app:** React frontend + Caddy reverse proxy, clean API layer, evolve Week 7 into a more production-style UI                      | **Week 8** |\n| **9 (TODO)** | **Rust BACnet stack:** integrate rusty-bacnet with Python bindings, rebuild key apps using Rust backend                                             | **Future** |\n| **(TODO)**    | **Protocol debugging:** Wireshark + Linux tooling, inspect BACnet/IP traffic, validate and troubleshoot all apps built                              | **Final**  |\n\n---\n\n### Notes / Direction\n\n* Week 7–8 is where things get **really interesting** → agentic workflows + real BAS-style UI\n* Open Claw becomes your **automation layer** (bootstrapping, testing, orchestration)\n* React + Caddy introduces **real-world web architecture patterns**\n* Rust + Wireshark = **next-level protocol + performance understanding**\n\n\n---\n\n## Weekly Outline\n\n### Week 1 — Fundamentals \u0026 First BACnet App  \n*Part I: Variables, operators, strings, numbers, booleans, input/output, lists*\n\n- **Day 1 — Installing Python \u0026 Pip (BACnet Ready):** Set up Python, pip, BAC0, bacpypes3.\n- **Day 2 — Variables \u0026 Arithmetic:** Store values, arithmetic, operator precedence.\n- **Day 3 — Working with Strings:** Create, concatenate, index, slice strings.\n- **Day 4 — Numbers, Booleans \u0026 Comparisons:** Numeric types, comparisons, truthiness.\n- **Day 5 — User Input \u0026 Output:** `input()`, type conversion, f-strings.\n- **Day 6 — Introducing Lists:** Create, index, slice, append, `len()`.\n- **Day 7 — List Operations \u0026 Methods:** append, extend, insert, remove, sort, copy.\n\n**Checkpoint 1:** BAC0 app — read, write, write null release.\n\n---\n\n### Week 2 — Control Structures \u0026 Data Collection  \n*Part II: Loops, conditionals, functions, files*\n\n- **Day 8 — For Loops \u0026 Range:** Iterate over lists/strings/ranges, `enumerate()`.\n- **Day 9 — Conditionals \u0026 While Loops:** `if`/`elif`/`else`, `while`, sentinel loops.\n- **Day 10 — String Methods: Split, Join \u0026 Case:** `split()`, `join()`, case conversion.\n- **Day 11 — Introducing Dictionaries:** Keys, values, add, retrieve, membership.\n- **Day 12 — Looping over Dictionaries:** `items()`, `keys()`, `values()` (no comprehensions).\n- **Day 13 — Tuples \u0026 Sets (Light):** Immutable tuples, sets for membership (optional).\n- **Day 14 — Loops \u0026 Sentinels:** `break`, `continue`, common loop patterns.\n\n---\n\n### Week 3 — Functions, Modules \u0026 Files  \n*Part II continued: Reusable code, modules, file I/O*\n\n- **Day 15 — Writing Functions:** Define functions, parameters, return, docstrings.\n- **Day 16 — Modules \u0026 the Standard Library:** `math`, `random`, organising code.\n- **Day 17 — Reading \u0026 Writing Files:** `open()`, `with`, read/write text and CSV.\n- **Day 18 — Handling Errors:** `try`/`except`, robust programs.\n- **Day 19 — Week 3 Review:** CSV of sensor readings, statistics, error handling.\n- **Day 20 — Built-in Functions:** `min()`, `max()`, `sorted()`, `sum()`, `zip()` (no comprehensions).\n- **Day 21 — Slicing \u0026 String Formatting:** Advanced f-strings, slicing.\n\n**Checkpoint 2:** BAC0 app — collect data, save to CSV, rotate logs per day.  \n**Checkpoint 3:** bacpypes3 read/write/release app.\n\n---\n\n### Week 4 — Data Structures \u0026 Discovery  \n*Part III: Lists, dicts, file I/O*\n\n- **Day 22 — Working with Nested Data:** Lists of dicts, dicts of lists (loops only, no comprehensions).\n- **Day 23 — Random \u0026 Math:** `random`, `math` for simulations.\n- **Day 24 — any(), all() \u0026 Simple Patterns:** Boolean checks on collections.\n- **Day 25 — Documentation \u0026 help():** Docstrings, comments, `help()`.\n- **Day 26 — Week 4 Review:** Nested data, built-ins, loops.\n- **Day 27 — What Is an Algorithm?:** Steps, efficiency, problem decomposition.\n- **Day 28 — Linear Search:** Implement and analyse linear search.\n\n**Checkpoint 4:** BACnet discover → CSV (Who-Is, object list, properties).\n\n---\n\n### Week 5 — Algorithms \u0026 BACnet Servers  \n*Part IV: Simple algorithms, objects, final project*\n\n- **Day 29 — Finding Min \u0026 Max:** Compute smallest/largest in a list.\n- **Day 30 — Counting Occurrences:** Frequency tables with dictionaries.\n- **Day 31 — Sorting Lists:** Basic sorting, `sort()` and `sorted()`.\n- **Day 32 — String Algorithms:** Substring search, prefixes, suffixes.\n- **Day 33 — Membership \u0026 Searching:** `in`, sets, dict lookups.\n- **Day 34 — Aggregating Data:** Sums, averages, simple statistics.\n- **Day 35 — Final Project:** Web weather station BACnet server.\n\n**Checkpoint 5:** Mini BACnet device + mini schedule/calendar device.  \n**Final Project:** Open Weather Map API → BACnet server.\n\n---\n\n### Week 6 — Bonus: Operations  \n*Troubleshooting \u0026 deployment*\n\n- **Day 36 — Playing with a Mini BACnet Device:** Run mini-device-revisited.py, read/write, simple control logic.\n- **Day 37 — Scheduling with a Mini BACnet Calendar Device:** Run mini-schedule-calendar-device.py, read schedule/calendar.\n- **Day 38 — Troubleshooting BACnet with Wireshark:** Capture BACnet/IP with tcpdump, inspect in Wireshark.\n- **Day 39 — Deploying a CSV Scraper with systemd:** systemd service for auto-start and restart.\n- **Day 40 — Containerising Your Scraper with Docker:** Docker container, restart policies.\n\n---\n\n\n## License\n\nMIT License — use, remix, share forward. Built for the BAS community.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbartling%2Fpy-bacnet-stacks-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbartling%2Fpy-bacnet-stacks-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbartling%2Fpy-bacnet-stacks-playground/lists"}