Central Heating controller using the real time clock, PHY module for internet, 1-wire interface for temperature sensors, a system log and a configuration file
Dependencies: net 1-wire lpc1768 crypto clock web fram log
/media/uploads/andrewboyson/heating.sch
/media/uploads/andrewboyson/heating.brd
/media/uploads/andrewboyson/eagle.epf
web-this/radiator/web-radiator-script.inc
- Committer:
- andrewboyson
- Date:
- 2020-06-10
- Revision:
- 92:2d1ca4dcbca7
- Parent:
- 91:8b192efd0288
- Child:
- 96:18a3813bb4b5
File content as of revision 92:2d1ca4dcbca7:
"//Radiator script\n" "'use strict';\n" "\n" "let hallTemperature = '';\n" "let programTimerOutput = false;\n" "let radiatorMode = false;\n" "let radiatorOverride = false;\n" "let radiatorPump = false;\n" "let nightSetPoint = '';\n" "let frostSetPoint = '';\n" "\n" "function parse()\n" "{\n" " let lines = Ajax.response.split('\\n');\n" " hallTemperature = Ajax.hexToSignedInt16(lines[0]);\n" " programTimerOutput = Ajax.hexToBit (lines[1], 0);\n" " radiatorMode = Ajax.hexToBit (lines[1], 1);\n" " radiatorOverride = Ajax.hexToBit (lines[1], 2);\n" " radiatorPump = Ajax.hexToBit (lines[1], 3);\n" " nightSetPoint = Ajax.hexToSignedInt16(lines[2], 16);\n" " frostSetPoint = Ajax.hexToSignedInt16(lines[3], 16);\n" "}\n" "function display()\n" "{\n" " let elem;\n" " elem = Ajax.getElementOrNull('ajax-hall-html' ); if (elem) elem.textContent = OneWire.DS18B20ToString(hallTemperature);\n" " elem = Ajax.getElementOrNull('ajax-program-toggle' ); if (elem) elem.setAttribute('dir', programTimerOutput ? 'rtl' : 'ltr');\n" " elem = Ajax.getElementOrNull('ajax-mode-toggle' ); if (elem) elem.setAttribute('dir', radiatorMode ? 'rtl' : 'ltr');\n" " elem = Ajax.getElementOrNull('ajax-override-toggle'); if (elem) elem.setAttribute('dir', radiatorOverride ? 'rtl' : 'ltr');\n" " elem = Ajax.getElementOrNull('ajax-radiator-toggle'); if (elem) elem.setAttribute('dir', radiatorPump ? 'rtl' : 'ltr');\n" " elem = Ajax.getElementOrNull('ajax-night-set-point'); if (elem) elem.value = nightSetPoint;\n" " elem = Ajax.getElementOrNull('ajax-frost-set-point'); if (elem) elem.value = frostSetPoint;\n" "}\n" "\n" "Ajax.server = '/radiator-ajax';\n" "Ajax.onResponse = function() { parse(); display(); };\n" "Ajax.init();\n" ""