Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions server/myq.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var exports = module.exports = new function () {
* @returns {string}
*/
function getUrl(path) {
return 'https://myqexternal.myqdevice.com' + path + '?appId=' + myQAppId + '&securityToken=' + config.securityToken
return 'https://myqexternal.myqdevice.com' + path + '?filterOn=true&format=json&nojsoncallback=1&appId=' + myQAppId + '&securityToken=' + config.securityToken
}

/**
Expand Down Expand Up @@ -95,10 +95,12 @@ var exports = module.exports = new function () {
url: getUrl('/api/v4/userdevicedetails/get'),
headers: {
'User-Agent': 'Chamberlain/3.73',
'Accept': '*/*',
'BrandId': '2',
'ApiVersion': '4.1',
'Culture': 'en',
'MyQApplicationId': myQAppId
'MyQApplicationId': myQAppId,
'SecurityToken': config.securityToken
}
}, handleGetDeviceResponse)
.on('error', function (e) {
Expand Down Expand Up @@ -344,6 +346,7 @@ var exports = module.exports = new function () {
* @param value
*/
this.processCommand = function (deviceId, command, value) {
console.log(deviceId, command);
doProcessCommand(deviceId, command, value);
};

Expand Down
5 changes: 4 additions & 1 deletion smartapps/aromka/myq-controller.src/myq-controller.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,17 @@ def exec(device, command, value, retry) {
"BrandId": "2",
"ApiVersion": "4.1",
"Culture": "en",
"SecurityToken": atomicState.security.securityToken,
"MyQApplicationId": getMyQAppId()
],
body: [
ApplicationId: getMyQAppId(),
SecurityToken: atomicState.security.securityToken,
MyQDeviceId: device.currentValue('id'),
AttributeName: command,
AttributeValue: value
AttributeValue: value,
Format: json,
Nojsoncallback: 1
]
]) { response ->
//check response, continue if 200 OK
Expand Down