diff --git a/README.md b/README.md index 35d14f6..489b196 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Arduino-Home-Thermostat Version 2.0 +# Arduino-Home-Thermostat Version 2.1 10 rooms thermostat diff --git a/app/build app/android/app-debug.apk b/app/build app/android/app-debug.apk index 4bebcb2..2fa50df 100644 Binary files a/app/build app/android/app-debug.apk and b/app/build app/android/app-debug.apk differ diff --git a/app/build app/windows/CordovaApp.Windows10_0.0.1.0_anycpu_debug.appx b/app/build app/windows/CordovaApp.Windows10_0.0.1.0_anycpu_debug.appx index d3b2c2c..a7ad73a 100644 Binary files a/app/build app/windows/CordovaApp.Windows10_0.0.1.0_anycpu_debug.appx and b/app/build app/windows/CordovaApp.Windows10_0.0.1.0_anycpu_debug.appx differ diff --git a/app/src/ardThermostatApp/resources/android/icon/drawable-hdpi-icon.png b/app/src/ardThermostatApp/resources/android/icon/drawable-hdpi-icon.png index fb8449b..2d9f81a 100644 Binary files a/app/src/ardThermostatApp/resources/android/icon/drawable-hdpi-icon.png and b/app/src/ardThermostatApp/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/app/src/ardThermostatApp/resources/android/icon/drawable-ldpi-icon.png b/app/src/ardThermostatApp/resources/android/icon/drawable-ldpi-icon.png index d393cbe..7b4779e 100644 Binary files a/app/src/ardThermostatApp/resources/android/icon/drawable-ldpi-icon.png and b/app/src/ardThermostatApp/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/app/src/ardThermostatApp/resources/android/icon/drawable-mdpi-icon.png b/app/src/ardThermostatApp/resources/android/icon/drawable-mdpi-icon.png index 4f1d2ac..216bd4a 100644 Binary files a/app/src/ardThermostatApp/resources/android/icon/drawable-mdpi-icon.png and b/app/src/ardThermostatApp/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/app/src/ardThermostatApp/resources/android/icon/drawable-xhdpi-icon.png b/app/src/ardThermostatApp/resources/android/icon/drawable-xhdpi-icon.png index 857026a..e8b37d9 100644 Binary files a/app/src/ardThermostatApp/resources/android/icon/drawable-xhdpi-icon.png and b/app/src/ardThermostatApp/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/app/src/ardThermostatApp/resources/android/icon/drawable-xxhdpi-icon.png b/app/src/ardThermostatApp/resources/android/icon/drawable-xxhdpi-icon.png index 6a41dbc..6fdb75b 100644 Binary files a/app/src/ardThermostatApp/resources/android/icon/drawable-xxhdpi-icon.png and b/app/src/ardThermostatApp/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/app/src/ardThermostatApp/resources/android/icon/drawable-xxxhdpi-icon.png b/app/src/ardThermostatApp/resources/android/icon/drawable-xxxhdpi-icon.png index 369d0cd..5bfb5e4 100644 Binary files a/app/src/ardThermostatApp/resources/android/icon/drawable-xxxhdpi-icon.png and b/app/src/ardThermostatApp/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-land-hdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-land-hdpi-screen.png index 32bdc20..98ee8d3 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-land-hdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-land-ldpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-land-ldpi-screen.png index a3caa36..2ccb89b 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-land-ldpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-land-mdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-land-mdpi-screen.png index 08f0e5a..d8ddc24 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-land-mdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-land-xhdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-land-xhdpi-screen.png index c66b9b2..f69dfc9 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-land-xhdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxhdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxhdpi-screen.png index c4e77a7..c39af96 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxhdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxxhdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxxhdpi-screen.png index f636bbd..ebd493b 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-port-hdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-port-hdpi-screen.png index dccb509..ee5bb3d 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-port-hdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-port-ldpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-port-ldpi-screen.png index 25269c7..087f520 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-port-ldpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-port-mdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-port-mdpi-screen.png index 1ddfaf9..b9eb021 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-port-mdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-port-xhdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-port-xhdpi-screen.png index b3c573d..34619af 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-port-xhdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxhdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxhdpi-screen.png index 6728ade..90c110c 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxhdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxxhdpi-screen.png b/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxxhdpi-screen.png index 3677425..e26c09e 100644 Binary files a/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/app/src/ardThermostatApp/resources/android/splash/drawable-port-xxxhdpi-screen.png differ diff --git a/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.html b/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.html index 0c40cfe..9df18d5 100644 --- a/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.html +++ b/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.html @@ -14,14 +14,14 @@ - +
-
{{input.canal}} :
-

{{input.temperature}} \xB0C

-

Offset {{input.offset}}

+ +

{{input.canal}} :

+

Offset {{input.offset}}

+
- - - + +

{{input.temperature.toFixed(2)}} \xB0C

diff --git a/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.scss b/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.scss index 3e15bb1..2d152cc 100644 --- a/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.scss +++ b/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.scss @@ -11,6 +11,18 @@ } } + div.inputContner { + display: inline-block; + } + .tcenter { + justify-content: center; + text-align: center; + } + border-radius: 20px 19px 70px 70px; + -moz-border-radius: 20px 19px 70px 70px; + -webkit-border-radius: 20px 19px 40px 40px; + border: 4px solid #3a7080; + } } } diff --git a/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.ts b/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.ts index 1b468f9..02b44fd 100644 --- a/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.ts +++ b/app/src/ardThermostatApp/src/pages/configs-inputs/configs-inputs.ts @@ -71,6 +71,20 @@ export class ConfigsInputsPage { request: 'unsubscribe' } + plus(chan: number) { + if (this.inputs[chan].offset < 25) { + this.inputs[chan].offset++; + this.changeOffset(chan, this.inputs[chan].offset); + } + } + + minus(chan: number) { + if (this.inputs[chan].offset > -25) { + this.inputs[chan].offset--; + this.changeOffset(chan, this.inputs[chan].offset); + } + } + changeOffset(chan: number, input: number): void { let configChannel = { diff --git a/app/src/ardThermostatApp/src/pages/home/home.ts b/app/src/ardThermostatApp/src/pages/home/home.ts index 6b2b110..aa9ce68 100644 --- a/app/src/ardThermostatApp/src/pages/home/home.ts +++ b/app/src/ardThermostatApp/src/pages/home/home.ts @@ -130,7 +130,9 @@ export class HomePage { }*/ switchChannel(cb: Channel) { //version websocket - let switchCh = cb.canal; + let switchCh = { + canal: cb.canal + } let postMessage = { id: "homeSwitch", diff --git a/app/src/ardThermostatApp/src/pages/load/load.ts b/app/src/ardThermostatApp/src/pages/load/load.ts index ae9eaea..107af80 100644 --- a/app/src/ardThermostatApp/src/pages/load/load.ts +++ b/app/src/ardThermostatApp/src/pages/load/load.ts @@ -23,7 +23,7 @@ export class LoadPage { ionViewDidEnter() { console.log('ionViewDidLoad LoadPage'); - this.statusMessage = "Getting adrresse from storage"; + this.statusMessage = "Getting addresse from storage"; //console.log(this.statusMessage); this.server.getServer().then(()=>{ this.statusMessage = "Got data. Check for server response"; diff --git a/multi_room_thermostat/Backup.ino b/multi_room_thermostat/Backup.ino index 4e3024f..db8d5ee 100644 --- a/multi_room_thermostat/Backup.ino +++ b/multi_room_thermostat/Backup.ino @@ -91,12 +91,6 @@ void restore() { //alarm.prettyPrintTo(Serial); SPAlarm[alarmTag].parseJSON(alarm); - /*byte alarmType = alarm["type"]; ////??? - bool alarmSwitch = alarm["switch"]; - byte wHour = alarm["hour"]; - byte wMin = alarm["minute"]; - SPAlarm.set(alarmTag, alarmType, alarmSwitch, wHour, wMin);*/ - JsonArray& setpoints = alarm["setpoints"]; //setpoints.prettyPrintTo(Serial); diff --git a/multi_room_thermostat/Setup.ino b/multi_room_thermostat/Setup.ino index f963f41..601d1dc 100644 --- a/multi_room_thermostat/Setup.ino +++ b/multi_room_thermostat/Setup.ino @@ -186,3 +186,9 @@ void init_alarmMemory() { //initiane alarm memory matrix to 21C by default } } } + +void blink13() { + static bool state = false; + digitalWrite(13, state); + state = !state; +} diff --git a/multi_room_thermostat/WebCmd.ino b/multi_room_thermostat/WebCmd.ino index 3bcb7f8..f25d26b 100644 --- a/multi_room_thermostat/WebCmd.ino +++ b/multi_room_thermostat/WebCmd.ino @@ -176,7 +176,7 @@ JsonObject& JSONconfigs__Corrected(JsonBuffer& jsonBuffer) { JsonObject& chan_in = jsonBuffer.createObject(); chan_in["offset"] = inChannelID[i].offset; chan_in["canal"] = String(i); - chan_in["temperature"] = inChannelID[i].Ainput; + chan_in["temperature"] = roundToDigit(inChannelID[i].Ainput, 2);//inChannelID[i].Ainput; chan.add(chan_in); } configs["systemTime"] = systemTime(jsonBuffer); diff --git a/multi_room_thermostat/WebSocket.ino b/multi_room_thermostat/WebSocket.ino index cb4620a..d32a468 100644 --- a/multi_room_thermostat/WebSocket.ino +++ b/multi_room_thermostat/WebSocket.ino @@ -102,6 +102,7 @@ void wsRequestHandler(JsonObject& root, int num) { for (int i = 0; i < SWSPC; i++) { //i for request index if ( strcmp(root["id"], wsPutContainer[i].id) == 0 ) { Serial << "found put request: " << wsPutContainer[i].id << endl; + root["data"].printTo(Serial); Serial << endl; wsPutContainer[i].parse(root["data"]); backup(); //store any change data } @@ -166,11 +167,10 @@ void wsSubscribeDataHome() { } void wsParseHomeSwitch(JsonObject& data) { - - //root.prettyPrintTo(Serial); - uint8_t chanId = data["switchCh"]["canal"]; + uint8_t chanId = data["canal"]; outChannelID[chanId].channelSwitch = !outChannelID[chanId].channelSwitch; //if (outChannelID[chanId].channelSwitch) Serial.println("true"); else Serial.println("false"); + wsSubscribeDataHome();//update live data to devices } void wsParseHomePutSetpoint(JsonObject& data) { @@ -178,6 +178,7 @@ void wsParseHomePutSetpoint(JsonObject& data) { byte chanId = data["canal"]; strcpy(inChannelID[chanId].channelName, data["name"]); outChannelID[chanId].sp = data["setpoint"]; + wsSubscribeDataHome();//update live data to devices } //----------------------------------------------------------- diff --git a/multi_room_thermostat/multi_room_thermostat.ino b/multi_room_thermostat/multi_room_thermostat.ino index bfd91ee..ff60932 100644 --- a/multi_room_thermostat/multi_room_thermostat.ino +++ b/multi_room_thermostat/multi_room_thermostat.ino @@ -93,6 +93,8 @@ Interval timerMainRegulator; Interval timerWeeklyAlarm; Interval timerSSROutput; Interval timerWebSocket[WEBSOCKETS_SERVER_CLIENT_MAX]; +Interval led13; +void blink13(); //programable alarm section const byte numAlarm = 10; // set the number of alarm @@ -148,7 +150,8 @@ void setup() { Serial.print("Free memory is: "); Serial.println(freeMemory()); - + pinMode(13, OUTPUT); + led13.interval(2000, blink13); } //----------------------------------------------------------- diff --git a/version_history.md b/version_history.md new file mode 100644 index 0000000..565330b --- /dev/null +++ b/version_history.md @@ -0,0 +1,10 @@ +version history: + +2.1 +-Fix on/off home button +-Change slider to +- button and fix to 2 digit temps on input calibration +-Add led13 flash to track arduino status ok + +Knowed bugs: +-Windows platform seem to not connect with local connection. +-Silder temp adjust setpoint do not display properly on windows. \ No newline at end of file