hjdhjd / myq

A complete implementation of the modern Liftmaster / Chamberlain myQ API
Other
125 stars 20 forks source link

Lock Support... #115

Closed shodge12 closed 2 years ago

shodge12 commented 2 years ago

Describe The Problem:

Liftmaster / Yale is now making myQ locks. They are seen in the device listing as device_family "locks".

https://www.myq.com/smart-lock

The api commands sent to them result in errors 400 - bad request... Likely because they are being sent to gdo and door_openers in the address creation. To Reproduce:

locked and unlocked are the read lock_state's. The errors are from the result of sending 'lock' and 'unlock' commands.

Logs:

{
  href: '/accounts/XXXXX/devices/locks/LTRON_XXXXXXXX',
  serial_number: 'LTRON_XXXXXXXX',
  device_family: 'locks',
  device_platform: 'myq',
  device_type: 'lockitron',
  device_model: 'lockitron',
  name: 'Front Door Lock',
  parent_device_id: 'GW33XXXXXXXX',
  created_date: '0001-01-01T00:00:00',
  account_id: 'XXXXXXXX',
  state: {
    lock_state: 'locked',
    locked_direction: 'counterclockwise',
    battery_percentage: '100',
    low_battery: false,
    firmware_version: 'M0207L0404',
    access_key: 'XXXXXXXXXXXXXXXX',
    command_execution: { command: 'getAdvancedConfig', status: 'SUCCESS' },
    broadcast_id: '7a1c373c',
    allow_remote_control: false,
    connectable: true,
    firmware_available: false,
    protocol_version: '2',
    allow_pin_code: true,
    bluetooth_connectability: 'remote',
    lock_type: 'yale',
    lock_model: 'lever',
    printed_serial_number: '54100XXXXX',
    allow_auto_relock: true,
    auto_relock_enabled: false,
    auto_relock_time: 0,
    online: true
  }
myQ API: https://account-devices-gdo.myq-cloud.com/api/v5.2/Accounts/XXXXXXXX/door_openers/LTRON_XXXXXXXX/unlock Error: 400 Bad Request

Screenshots:

hjdhjd commented 2 years ago

Thanks, but nothing new here I'm afraid. 😄 As already noted: myQ locks are unsupported at this time. I'm interested in reverse engineering them but this isn't a priority for me at the moment. If someone wants to do the investigative work, terrific...I will when I get time. I think myQ locks in general aren't a terribly compelling value proposition given the many decent alternatives in the market, but hey, to each their own.

The current myQ lock API hasn't been reverse engineered yet because it appears to be an entirely different API, not what you've shown - which we've already known for years at this point. What you have above is based on the old, deprecated Lockitron locks and happens to somewhat mimic - though unreliably in various tests I and others have conducted over the years - some of the lock state information in the current generation of lock support myQ has. It is unclear if this is a supported consequence or just more tech debt that the Liftmaster/Chamberlain myQ development team haven't gotten around to removing yet.

As far as I've seen, there's a different API used for Yale-based locks...I believe this is a dead end on the myQ side, based on when I last looked at it. But if you've got passion around it...welcome any contributions or insights you can share to benefit the entire community. Yale appears to have their own API, as well as integrations with certain smart home platforms (e.g. August) and it seems what myQ is doing is actually accessing the Yale API somehow - all speculation, just based on my anecdotal testing over the years. There's a good project that's been chasing this for Home Assistant: https://github.com/bdraco/yalexs - it may be useful as an entry point, or may not be.

If we can figure out how to actually execute a lock or unlock command in myQ, then it opens up a whole world of possibilities.

Thanks!

github-actions[bot] commented 1 year ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.