...
- Having the flow check on GPIO-0 can cause reboot failures if the flow is stuck closed.Moving flow check to RX.
Version 2
Changes
- Move Flow sensor to ADC on CH7 in order to free up GPIO-0 or RX/TX.
- Add light control
Schematic
Board Layout
Software
Homekit/Homebridge Integration
...
Code Block |
---|
... { "accessory": "mqttthing", "type": "fan", "name": "hottub", "url": "http://192.168.1.50:1883", "username": "homebridge", "password": "pass", "topics": { "getOn": { "topic": "spa/status", "apply": "return JSON.parse(message).pump > 0 ? true : false;" }, "setOn": { "topic": "spa/command", "apply": "if(message) return 'pumpOnOff 1'; if(message==false) return 'pumpOnOff 0';" }, "getRotationSpeed": { "topic": "spa/status", "apply": "return JSON.parse(message).pump;" }, "setRotationSpeed": { "topic": "spa/command", "apply": "console.log('MESSAGE: ' + message); if(message >50) return 'pumpState 2'; if(message==0) return 'pumpState 0'; return 'pumpState 1';" } } }, ... |
Future
Hardware Changes
Changes
- Move Flow sensor to ADC on CH7 in order to free up GPIO-0 or RX/TX.
- Add light control
Appendix
Pump
Specifications
...