I’ve had the Microtemp MWD5 WiFi thermostat for a couple of years, and a while back I successfully sniffed the communication between the mobile app and the cloud.
It communicates with HTTP POST/GET with json data, and seems simple to create an integration for it.
Is there a similar thermostat integration that would be easier to modify than start from scratch?
I’ve postponed this task for almost a year now, so if anyone else wants to have a go, use my notes below. The main priority is to control it in manual mode and get energy usage from it.
Signin:
POST https://owd5-mh015-app.ojelectronics.com/api/UserProfile/SignIn
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"ClientSWVersion": 1,
"CustomerId": 111,
"Password": "password",
"UserName": "username"
}
HTTP/1.1 200 OK
{
"ErrorCode": 0,
"SessionId": "fXL6a_GsEkODSl0xFXtXRA",
"UserName": "username"
}
GetGroupContents:
GET https://owd5-mh015-app.ojelectronics.com/api/Group/GroupContents?sessionid=fXL6a_GsEkODSl0xFXtXRA&APIKEY=f219aab4-9ac0-4343-8422-b72203e2fac9
HTTP/1.1 200 OK
{
"ErrorCode": 0,
"GroupContents": [
{
"Action": 0,
"BoostEndTime": "1900-01-01T00:00:00",
"ComfortEndTime": "1900-01-01T00:00:00",
"ComfortSetpoint": 2300,
"FrostProtectionTemperature": 500,
"GroupId": 17953,
"GroupName": "Bad",
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2197,
"RegulationMode": 1,
"Schedule": {
"Days": [
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2208
},
{
"Active": true,
"Clock": "07:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1818
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": true,
"Clock": "15:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2175
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1814
}
],
"WeekDayGrpNo": 1
},
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2208
},
{
"Active": true,
"Clock": "07:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1818
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": true,
"Clock": "15:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2175
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1814
}
],
"WeekDayGrpNo": 2
},
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2208
},
{
"Active": true,
"Clock": "07:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1818
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": true,
"Clock": "15:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2175
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1814
}
],
"WeekDayGrpNo": 3
},
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2208
},
{
"Active": true,
"Clock": "07:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1818
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": true,
"Clock": "15:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2175
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1814
}
],
"WeekDayGrpNo": 4
},
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2208
},
{
"Active": true,
"Clock": "07:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1818
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": true,
"Clock": "15:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2175
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1814
}
],
"WeekDayGrpNo": 5
},
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2197
},
{
"Active": false,
"Clock": "09:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1798
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": false,
"Clock": "17:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2000
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1786
}
],
"WeekDayGrpNo": 6
},
{
"Events": [
{
"Active": true,
"Clock": "06:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 0,
"Temperature": 2197
},
{
"Active": false,
"Clock": "09:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 1,
"Temperature": 1798
},
{
"Active": false,
"Clock": "12:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 2,
"Temperature": 2000
},
{
"Active": false,
"Clock": "13:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 3,
"Temperature": 1500
},
{
"Active": false,
"Clock": "17:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 4,
"Temperature": 2000
},
{
"Active": true,
"Clock": "23:00:00",
"EventIsOnNextDay": false,
"ScheduleType": 5,
"Temperature": 1786
}
],
"WeekDayGrpNo": 7
}
],
"ModifiedDueToVerification": false
},
"Thermostats": [
{
"Action": 0,
"AdaptiveMode": false,
"BoostEndTime": "1900-01-01T00:00:00",
"ComfortEndTime": "1900-01-01T00:00:00",
"ComfortSetpoint": 2300,
"CustomerId": 15,
"DaylightSaving": false,
"DaylightSavingActive": false,
"ErrorCode": 0,
"FloorTemperature": 2190,
"FloorType": 2,
"FrostProtectionTemperature": 500,
"GroupId": 17953,
"GroupName": "Bad",
"Heating": false,
"Id": 89037,
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2679,
"MaxSetpoint": 4000,
"MinSetpoint": 500,
"Online": true,
"OpenWindow": false,
"RegulationMode": 1,
"RoomTemperature": 2317,
"SWversion": "1013W212",
"Schedule": {
Same as Schedule section above, I removed this because of the character limit
},
"SensorAppl": 3,
"SerialNumber": "299386",
"ThermostatName": "Gulvvarme",
"TimeZone": 3600,
"VacationBeginDay": "2017-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2017-01-02T00:00:00",
"VacationTemperature": 500
}
],
"VacationBeginDay": "2016-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2016-01-01T00:00:00",
"VacationTemperature": 500
}
]
}
Manual Setpoint:
POST https://owd5-mh015-app.ojelectronics.com/api/Group/UpdateGroup?sessionid=fXL6a_GsEkODSl0xFXtXRA
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"SetGroup": {
"BoostEndTime": "1900-01-01T00:00:00",
"ComfortEndTime": "1900-01-01T00:00:00",
"ComfortSetpoint": 2300,
"ExcludeVacationData": false,
"GroupId": 17953,
"GroupName": "Bad",
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2470,
"RegulationMode": 3,
"Schedule": {
I removed this because of the character limit
},
"VacationBeginDay": "2016-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2016-01-01T00:00:00",
"VacationTemperature": 0
}
}
HTTP/1.1 200 OK
{
"ErrorCode": 0
}
Return to plan:
POST https://owd5-mh015-app.ojelectronics.com/api/Group/UpdateGroup?sessionid=fXL6a_GsEkODSl0xFXtXRA
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"SetGroup": {
"BoostEndTime": "1900-01-01T00:00:00",
"ComfortEndTime": "1900-01-01T00:00:00",
"ComfortSetpoint": 2300,
"ExcludeVacationData": false,
"GroupId": 17953,
"GroupName": "Bad",
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2470,
"RegulationMode": 1,
"Schedule": {
I removed this because of the character limit
},
"VacationBeginDay": "2016-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2016-01-01T00:00:00",
"VacationTemperature": 0
}
}
HTTP/1.1 200 OK
{
"ErrorCode": 0
}
Boost mode:
POST https://owd5-mh015-app.ojelectronics.com/api/Group/UpdateGroup?sessionid=fXL6a_GsEkODSl0xFXtXRA
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"SetGroup": {
"BoostEndTime": "2021-12-29T17:47:00",
"ComfortEndTime": "1900-01-01T00:00:00",
"ComfortSetpoint": 2300,
"ExcludeVacationData": false,
"GroupId": 17953,
"GroupName": "Bad",
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2470,
"RegulationMode": 8,
"Schedule": {
I removed this because of the character limit
},
"VacationBeginDay": "2016-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2016-01-01T00:00:00",
"VacationTemperature": 0
}
}
HTTP/1.1 200 OK
{
"ErrorCode": 0
}
Comfort mode:
POST https://owd5-mh015-app.ojelectronics.com/api/Group/UpdateGroup?sessionid=D0eepWCdFkq6rfiTiNTKCA
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"SetGroup": {
"BoostEndTime": "2021-12-29T17:47:00",
"ComfortEndTime": "2021-12-29T19:00:00",
"ComfortSetpoint": 2175,
"ExcludeVacationData": false,
"GroupId": 17953,
"GroupName": "Bad",
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2470,
"RegulationMode": 2,
"Schedule": {
I removed this because of the character limit
},
"VacationBeginDay": "2016-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2016-01-01T00:00:00",
"VacationTemperature": 0
}
}
HTTP/1.1 200 OK
{
"ErrorCode": 0
}
Eco mode:
POST https://owd5-mh015-app.ojelectronics.com/api/Group/UpdateGroup?sessionid=8t1DR49y90SB2XfCVlsshg
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"SetGroup": {
"BoostEndTime": "2021-12-29T17:47:00",
"ComfortEndTime": "2021-12-29T19:00:00",
"ComfortSetpoint": 2175,
"ExcludeVacationData": false,
"GroupId": 17953,
"GroupName": "Bad",
"LastPrimaryModeIsAuto": true,
"ManualModeSetpoint": 2470,
"RegulationMode": 9,
"Schedule": {
I removed this because of the character limit
},
"VacationBeginDay": "2016-01-01T00:00:00",
"VacationEnabled": false,
"VacationEndDay": "2016-01-01T00:00:00",
"VacationTemperature": 0
}
}
Energy usage:
POST https://owd5-mh015-app.ojelectronics.com/api/EnergyUsage/GetEnergyUsage?sessionid=MniO_4mA8ECJOt3d54Gfwg
Week:
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"DateTime": "2021-12-29T17:04:49",
"History": 0,
"ThermostatID": "299386",
"ViewType": 2
}
{
"EnergyUsage": [
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
}
],
"ErrorCode": 0
}
Month:
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"DateTime": "2021-12-29T17:05:33",
"History": 4,
"ThermostatID": "299386",
"ViewType": 2
}
{
"EnergyUsage": [
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
},
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
},
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
},
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
},
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
}
],
"ErrorCode": 0
}
Year:
{
"APIKEY": "f219aab4-9ac0-4343-8422-b72203e2fac9",
"DateTime": "2021-01-29T17:05:48",
"History": 0,
"ThermostatID": "299386",
"ViewType": 4
}
{
"EnergyUsage": [
{
"Usage": [
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
},
{
"EnergyKWattHour": 0.0
}
]
}
],
"ErrorCode": 0
}
Negotiate (2 steps) (unsure if this is at the start, or if it is needed):
GET https://owd5-mh015-app.ojelectronics.com/ocd5notification/negotiate?clientProtocol=1.3
Response:
{
"ConnectionId": "7fe6ba31-be25-44cb-ac72-6b62e3ce5ecb",
"ConnectionTimeout": 110.0,
"ConnectionToken": "3H5PCkeD1lLHiLvVS0xklpe5apgHYIudkycXcHbUwFv2Qzy/4EFQF8SXwBT7fssqUb4UpnwIGoNsnH63nl1+M/Av2/L3fo/3UinL42Yqphf9Br3fQyeGStSXJ4kirwpc",
"DisconnectTimeout": 30.0,
"KeepAliveTimeout": 20.0,
"LongPollDelay": 0.0,
"ProtocolVersion": "1.3",
"TransportConnectTimeout": 5.0,
"TryWebSockets": true,
"Url": "/ocd5notification"
}
----
GET https://owd5-mh015-app.ojelectronics.com/ocd5notification/connect?transport=serverSentEvents&connectionToken=3H5PCkeD1lLHiLvVS0xklpe5apgHYIudkycXcHbUwFv2Qzy%2F4EFQF8SXwBT7fssqUb4UpnwIGoNsnH63nl1%2BM%2FAv2%2FL3fo%2F3UinL42Yqphf9Br3fQyeGStSXJ4kirwpc&connectionId=7fe6ba31-be25-44cb-ac72-6b62e3ce5ecb
No response