arraylabs / pymyq

Python wrapper for MyQ API
MIT License
112 stars 42 forks source link

Yale Smart Lock control via Smart Garage Control #125

Closed wagnerism closed 2 years ago

wagnerism commented 2 years ago

Please let me know if creating an 'issue' here is the right way to request support for additional myQ devices.

Yale has "Smart Locks" that that use interchangeable modules, one of which is myQ compatible. I believe the module uses bluetooth to communicate with the Smart Garage Control hub.

Each Smart Garage Control can simultaneously control up to two garage door openers plus one Smart Lock. A Smart Garage Control is needed for each lock.

I'm rather new to this (especially asyncio) so I'm facing a learning curve should I try to update this myself. With some help I can try to make this work. Here is what I have so far - an example of current output from example.py that shows the Smart Garage Control with two garage doors associated with it. Further queries of the Smart Garage Control may show an additional Device Family: lamp Device Type: lamp association which would likely have functions like "lock" "unlock" and "Current State"

 GarageDoors: 1
      ---------
      Device 1: Garage Door 1
      Device Online: True
      Device ID: CG0000000BA3
      Parent Device ID: GW000000000E
      Device Family: garagedoor
      Device Platform: myq
      Device Type: virtualgaragedooropener
      Firmware Version: None
      Open Allowed: True
      Close Allowed: True
      Current State: closed
      ---------
      Device 2: Garage Door 2
      Device Online: True
      Device ID: CG0000000BA4
      Parent Device ID: GW000000000E
      Device Family: garagedoor
      Device Platform: myq
      Device Type: virtualgaragedooropener
      Firmware Version: None
      Open Allowed: True
      Close Allowed: True
      Current State: closed
      ---------
  ------------------------------
  Gateways: 1
  ------------
      Device 1: Garage Smart Control
      Device Online: True
      Device ID: GW000000000E
      Parent Device ID: None
      Device Family: gateway
      Device Platform: myq
      Device Type: hub
      Firmware Version: 1.9
      Open Allowed: False
      Close Allowed: False
      Current State: None
      ---------
------------------------------
wagnerism commented 2 years ago

Found these locks displayed with print_other in example.py

  Other: 1
  ------------
      Device 1: Front Door Lock
      Device Online: True
      Device ID: LTRON_00000000
      Parent Device ID: GW0000000000
      Device Family: locks
      Device Platform: myq
      Device Type: lockitron
      Firmware Version: M0207L0403
      Open Allowed: False
      Close Allowed: False
      Current State: None
      ---------
------------------------------
ehendrix23 commented 2 years ago

Well, it looks like you're figuring it out. Your pull request look good to me.