homebridge-connexoon icon indicating copy to clipboard operation
homebridge-connexoon copied to clipboard

Can't control Awning

Open Honigbrot opened this issue 1 year ago • 4 comments

Thanks to the latest update my shutters work perfectly. I tried to also control my Awning (Somfy RTS, same multi-channel remote as my shutters) via homebridge. It works flawlessly in the TaHoma app. However the homebridge plugin produces the following error message when trying to open / close via homebridge:

[26.2.2023, 16:37:03] [My Connexoon Hub] Failed to exec command {
  errorCode: 'UNSUPPORTED_OPERATION',
  error: 'No such command : open on device ogp://2105-5099-3932/9365770 (ogp:Awning)'
}
[26.2.2023, 16:37:03] [My Connexoon Hub] StatusCodeError: 400 - {"errorCode":"UNSUPPORTED_OPERATION","error":"No such command : open on device ogp://2105-5099-3932/9365770 (ogp:Awning)"}
    at new StatusCodeError (/usr/local/lib/node_modules/homebridge-connexoon/node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (/usr/local/lib/node_modules/homebridge-connexoon/node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/homebridge-connexoon/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (/usr/local/lib/node_modules/homebridge-connexoon/node_modules/request/request.js:185:22)
    at Request.emit (node:events:390:28)
    at Request.<anonymous> (/usr/local/lib/node_modules/homebridge-connexoon/node_modules/request/request.js:1154:10)
    at Request.emit (node:events:390:28)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge-connexoon/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (node:events:509:28)
    at IncomingMessage.emit (node:events:402:35) {
  statusCode: 400,
  error: {
    errorCode: 'UNSUPPORTED_OPERATION',
    error: 'No such command : open on device ogp://2105-5099-3932/9365770 (ogp:Awning)'
  },
  options: {
    auth: {
      bearer: 'NmI4MGM3YzY4YzFmNjMyNzY1MzMwOGVhMjlhY2I1NTNjNTQzZjlkNzdhOGMxYWVjNmRhYWY3M2I2YzFhZjNkNQ'
    },
    url: 'https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/exec/apply',
    json: true,
    body: Execution { label: 'Markise - Open - HomeKit', actions: [Array] },
    method: 'POST',
    callback: [Function: RP$callback],
    transform: undefined,
    simple: true,
    resolveWithFullResponse: false,
    transform2xxOnly: false
  },

Honigbrot avatar Feb 26 '23 15:02 Honigbrot

Okay so the problem is that your Awning is an OGP device, which is a slightly different protocol. It does not support the open command on your Awning, which is the method the plugin sends.

After looking at other plugins, it seems that Awnings expect deploy and undeploy commands to be sent instead of open and close.

I currently do not support this obviously but also this would require some effort to implement unfortunately.

I have will mark this ticket as enhancement and try to implement it one day if I have time.

yenoiwesa avatar Mar 18 '23 23:03 yenoiwesa

Wouldn't the optional parameter "command" solve that? Or is there a fundamentally different approach because of the difference in device type?

Honigbrot avatar Nov 23 '23 12:11 Honigbrot

Confirmed it. Just setting the commands in the config works for my OGP Awning:

 "devices": {
                "Markise": {
                    "commands": [
                        "deploy",
                        "undeploy"
                    ]
                }
            }

Honigbrot avatar Nov 26 '23 10:11 Honigbrot

Confirmed it. Just setting the commands in the config works for my OGP Awning:

 "devices": {
                "Markise": {
                    "commands": [
                        "deploy",
                        "undeploy"
                    ]
                }
            }

Have the same issue but this din't solve my problem unfortunately.

jvhooijdonk avatar Jan 18 '24 13:01 jvhooijdonk