feat: docs: create BOM and wiring guide for data center monitoring kit#8
feat: docs: create BOM and wiring guide for data center monitoring kit#8Kasionchen wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e411e0. Configure here.
|
|
||
| # Step 5: Parse data | ||
| humidity = (data[0:16].count(1) / 16) * 100 | ||
| temperature = ((data[16:32].count(1) / 16) * 100) - 40 |
There was a problem hiding this comment.
DHT22 bit parsing uses count instead of reconstruction
High Severity
The DHT22 data parsing logic is fundamentally incorrect. It counts the number of 1-bits in the 16-bit sequences (data[0:16].count(1)) instead of reconstructing the actual integer values from the bit array. The DHT22 protocol encodes humidity and temperature as 16-bit integers (divided by 10), so the bits need to be assembled positionally (e.g., shifting and OR-ing). Counting 1-bits loses all positional information and produces completely wrong sensor readings for virtually all real-world values.
Reviewed by Cursor Bugbot for commit 6e411e0. Configure here.
| return float('inf') | ||
| # Vcc = 5V, RL = 10K (load resistor) | ||
| # Rs = ((5V - Vout) / Vout) * RL | ||
| Rs = ((3.3 - voltage) / voltage) * 10.0 |
There was a problem hiding this comment.
Resistance formula uses wrong Vcc voltage constant
Medium Severity
The read_resistance method uses 3.3V in the voltage divider formula, but the comment on the preceding line and the wiring documentation both specify the MQ-2 sensor is powered by 5V. The formula Rs = ((Vcc - Vout) / Vout) * RL requires the actual supply voltage of the sensor circuit (5V), not the ADC reference voltage. Using 3.3V systematically underestimates Rs, producing inaccurate PPM readings that could miss dangerous smoke levels.
Reviewed by Cursor Bugbot for commit 6e411e0. Configure here.
|
|
||
| # Use smoke curve as general indicator | ||
| if ratio < 0.5: | ||
| return 0 |
There was a problem hiding this comment.
Smoke sensor returns zero at dangerous gas concentrations
High Severity
The read_ppm method returns 0 when ratio < 0.5, but a low Rs/Ro ratio corresponds to high gas concentration (sensor resistance drops as gas increases). This means at the most dangerous smoke levels—when the ratio falls below 0.5—the driver reports 0 PPM ("all clear"). This is a safety-critical inversion: the sensor goes silent precisely when danger is highest. The subsequent clamp on line 72 already bounds extreme values; this early-return guard silently discards them instead.
Reviewed by Cursor Bugbot for commit 6e411e0. Configure here.
| bit = pin.value() | ||
| data.append(bit) | ||
| while pin.value() == 1: | ||
| pass |
There was a problem hiding this comment.
DHT22 bit-reading loops lack timeout, risk infinite hang
Medium Severity
The two while pin.value() == 0: pass and while pin.value() == 1: pass loops in the bit-reading phase have no timeout protection. If the DHT22 sensor disconnects, stalls, or sends a stuck signal mid-read, the monitoring system enters an unrecoverable infinite loop. The initial response wait (line 40–43) correctly uses a timeout, but the 80 subsequent busy-wait loops within the data phase do not. For a 24/7 unattended monitoring system, this means a single sensor glitch permanently hangs the device.
Reviewed by Cursor Bugbot for commit 6e411e0. Configure here.


Description
Create the complete hardware kit documentation for the data center night shift monitoring scenario (replaces $48,000/yr operator with $88 kit).
Changes Made
Bounty Information
Cost Summary
Files Added
kits/dc-guardian/README.md- Overview and use casekits/dc-guardian/BOM.md- Complete parts list with purchase linkskits/dc-guardian/WIRING.md- Connection diagram and assembly instructionskits/dc-guardian/skill.yaml- PicoClaw skill configurationkits/dc-guardian/alerts.yaml- Alert thresholds and escalation ruleskits/dc-guardian/drivers/dht22.py- Temperature/humidity sensor driverkits/dc-guardian/drivers/mq2_smoke.py- Smoke/gas sensor driverkits/dc-guardian/drivers/water_leak.py- Water leak sensor driverNote
Low Risk
Mostly additive kit documentation and example configuration files; risk is low, limited to potential confusion/breakage if the newly added MicroPython drivers/configs are treated as production-ready.
Overview
Adds a new
kits/dc-guardianhardware kit package with end-to-end setup materials for data-center environmental monitoring.Includes a BOM with purchase links, wiring/assembly guide, PicoClaw
skill.yaml, and analerts.yamldescribing thresholds/escalation plus webhook/SMS hooks, along with initial MicroPython sensor drivers fordht22,mq2_smoke, andwater_leakfor on-device testing.Reviewed by Cursor Bugbot for commit 6e411e0. Bugbot is set up for automated code reviews on this repo. Configure here.