feat: add wifi, room climate, and water level to device status (#157, #192)#389
feat: add wifi, room climate, and water level to device status (#157, #192)#389
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 24 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
device.getStatus now returns:
- wifi: { signalStrength, ssid } from /proc/net/wireless (defaults on non-Linux)
- roomClimate: { temperatureF, humidity, timestamp } from latest bed temp sensor
- waterLevel: { level, timestamp } from latest water level reading
All enrichment is best-effort — null values on failure.
Closes #157, closes #192
- Replace execSync('cat ...') with readFileSync for /proc/net/wireless
- Use spawnSync for iwgetid (no shell layer)
- Flatten wifi fields to wifiStrength/wifiSSID per issue #157 spec
- Return temperatureC (not temperatureF) per issue #192 spec
- Serialize timestamps as unix ms (number) per spec
- Narrow waterLevel.level type to 'low' | 'ok' | null
- Move getWifiInfo() inside enrichment try/catch
5d18760 to
e7aa060
Compare
Summary
device.getStatusnow returnswifiStrength,wifiSSID(from/proc/net/wireless+iwgetid)roomClimate: { temperatureC, humidity, timestamp }from latest bed temp sensorwaterLevelRaw: { raw, calibratedEmpty, calibratedFull, timestamp }from latest water level reading0007addsraw,calibrated_empty,calibrated_fullcolumns towater_level_readingsReview fixes applied
execSync('cat ...')withreadFileSyncfor procfs (no subprocess fork)spawnSyncforiwgetid(no shell layer)wifiStrength/wifiSSIDper Add wifi signal strength to device.getStatus #157 spectemperatureF→temperatureCper Add room climate and raw water level to device status #192 specTest plan
GET /device/statuson Pod and verify wifi/roomClimate/waterLevelRaw fieldsCloses #157, closes #192