Giter Site home page Giter Site logo

myq-garage's People

Contributors

cbrochar avatar eegregor avatar einstein42 avatar exking avatar knicknic avatar pockybum522 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

myq-garage's Issues

No support for other devices

I was looking through code and saw no support for light modules. I have one installed at my residence and determined looking at Attributes in the JSON file the device ID is 3. I cobbled it into my code along with the option to use ./myq-garage status [device ID] to check individual device statuses. I am NOT an expert coder so take anything I've done with a grain of salt and try not to laugh....I'm learning as I go....I attached my code.
myq-garage_rev.txt

Can we add liftmaster support?

I was wondering if we could add support for liftmaster?
I took a look at https://github.com/luisiam/homebridge-liftmaster2 and they seemed to use the same settings as "Chamberlin" however when identifying devices the filtering is different. I needed to change the filtering from MyQDeviceTypeId (as my type ids were different [17]). I just used the settings from https://github.com/luisiam/homebridge-liftmaster2 that were based off of MyQDeviceTypeName (example "Garage Door Opener WGDO").

`
[(x['MyQDeviceTypeId'],x['MyQDeviceTypeName']) for x in res["Devices"]]

[(17, 'Garage Door Opener WGDO'), (15, 'Gateway WGDO AC')]
`

Making this change seemed to work for opening and closing the door. I did not do extensive testing.

Would there be an problem if we added 17 to the list of MyQDeviceTypeIds? Created a pull request for this change.
#26

What MyQDeviceTypeName values does Chamberlin use (maybe those overlap?). Do you know if these are localized in different countries / languages? I am in USA / English.

Thanks,
Knic

door_instances not finding doors

Hello,

Trying to see what I'm doing wrong. Followed all directions. Login works because I get an authorization error with the wrong creds. When I run just the status arg, I just get a blank line returned. When I step through the code, it doesn't look like door_instances is finding anything, returns an empty list. Not using ISY.

Any help is appreciated.

-LR

Controlling Garage Doors (Multiple)

So I'm having a new problem trying to use this script to control my doors. The last issue I reported was that the control function worked, but the status function did not work with multiple doors. I am now having the exact reverse problem - the status function reports correctly for both doors, but control does not work.

# ./myq-garage.py status
1. South Garage Door is Closed. Last changed at Sun 27 May 2018 09:19:58
2. North Garage Door is Closed. Last changed at Mon 04 Jun 2018 15:15:36

# ./myq-garage.py open "North Garage Door"
North Garage Door not found in available devices.

looks like Chamberlin is blocking us.

I haven't worked on my home automation stuff for a while and decided to jump back in today. Before I stopped working on it, I integrated this awesome repo into my flask app to get a dashboard of all my home network and home automation stuff and it worked great (in the prototype phase that I was in), but today I keep getting a "request denied" response from the login url. It seems that Chamberlin is actively blocking us.

I may be replacing my garage doors with something else.

If anyone knows anything different, please let me know.

Thanks

TonyPNode

Bugs in myq_garage.py

downloaded and encountered numerous little errors. Here is the list

  1. In many places print is missing (). Some places the syntax is correct.
  2. TOKENTTL is read from the config as a string. line 61 should be TOKENTTL = int(config.get('main', 'TOKENTTL')) else line 235 explodes without explicit conversion to int
  3. Line 267 Call to session.post has bad arguments... req=self.session.post(self.authurl, headers=self.headers, json=payload) should be req=self.session.post(self.authurl, headers=self.headers, data=payload).
  4. requests.packages.urllib3.disable_warnings() generates a method error. Commented this out to get to work

Does this still work?

Not really an issue, more of a question. I've had code running against the myQ API and as of a week or so ago (Nov 20ish) the API stopped responding resulting in a 216 Unauthorized. I'm wondering if you've hit the same result.

Support for Multiple Openers

This script doesn't seem to support multiple garage door openers. I have two on my MyQ account (both in the same house), and "status" only pulls for one of them.

# /tmp/myq-garage/myq-garage.py status
North Garage Door is Closed. Last changed at Thu 04 May 2017 14:40:45

screen shot 2017-05-04 at 2 51 28 pm

PyPi?

great script btw...
Any chances of this being added to PyPi?
It would be awesome if we could just import the "MyQ" class.
Also, I'm than willing to contribute code to help make this possible.

Error when trying to run

I'm trying to run this script on Ubuntu and get the following error:

./myq-garage.py status
Traceback (most recent call last):
File "./myq-garage.py", line 38, in
requests.packages.urllib3.disable_warnings()
AttributeError: 'module' object has no attribute 'packages'

Any ideas on what I could be doing wrong?

myq-garage stopped working this week

This is the error (it previously worked perfectly):

2019-10-27 17:57:41,132 INFO ==================================STARTED==================================
2019-10-27 17:57:41,292 ERROR Traceback (most recent call last):
2019-10-27 17:57:41,293 ERROR File "/usr/lib/cgi-bin/myq-garage.py", line 407, in
2019-10-27 17:57:41,293 ERROR gdoor_main()
2019-10-27 17:57:41,293 ERROR File "/usr/lib/cgi-bin/myq-garage.py", line 373, in gdoor_main
2019-10-27 17:57:41,293 ERROR myq = MyQ()
2019-10-27 17:57:41,293 ERROR File "/usr/lib/cgi-bin/myq-garage.py", line 224, in init
2019-10-27 17:57:41,293 ERROR self.read_token()
2019-10-27 17:57:41,293 ERROR File "/usr/lib/cgi-bin/myq-garage.py", line 250, in read_token
2019-10-27 17:57:41,293 ERROR self.login()
2019-10-27 17:57:41,293 ERROR File "/usr/lib/cgi-bin/myq-garage.py", line 270, in login
2019-10-27 17:57:41,293 ERROR print "Login err code: " + req.status_code
2019-10-27 17:57:41,293 ERROR TypeError
2019-10-27 17:57:41,293 ERROR :
2019-10-27 17:57:41,293 ERROR cannot concatenate 'str' and 'int' objects

Is this new API still working?

Trying it locally on my machine, but I'm just getting a "request denied" response when trying to get door status. Anyone else having any luck?

Failure in fetch_device_json

For liftmaster garage door.
Started on 2019/2/27

2019-03-02 23:51:06,931 INFO ==================================STARTED==================================
2019-03-02 23:51:07,595 ERROR Traceback (most recent call last):
2019-03-02 23:51:07,596 ERROR File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 331, in _make_request
2019-03-02 23:51:07,598 ERROR httplib_response = conn.getresponse(buffering=True)
2019-03-02 23:51:07,599 ERROR TypeError
2019-03-02 23:51:07,600 ERROR :
2019-03-02 23:51:07,600 ERROR getresponse() got an unexpected keyword argument 'buffering'
2019-03-02 23:51:07,601 ERROR
During handling of the above exception, another exception occurred:
2019-03-02 23:51:07,601 ERROR Traceback (most recent call last):
2019-03-02 23:51:07,602 ERROR File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 516, in urlopen
2019-03-02 23:51:07,605 ERROR body=body, headers=headers)
2019-03-02 23:51:07,605 ERROR File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 333, in _make_request
2019-03-02 23:51:07,608 ERROR httplib_response = conn.getresponse()
2019-03-02 23:51:07,608 ERROR File "/usr/lib/python3.4/http/client.py", line 1172, in getresponse
2019-03-02 23:51:07,613 ERROR response.begin()
2019-03-02 23:51:07,614 ERROR File "/usr/lib/python3.4/http/client.py", line 351, in begin
2019-03-02 23:51:07,617 ERROR version, status, reason = self._read_status()
2019-03-02 23:51:07,617 ERROR File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
2019-03-02 23:51:07,620 ERROR line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
2019-03-02 23:51:07,620 ERROR File "/usr/lib/python3.4/socket.py", line 371, in readinto
2019-03-02 23:51:07,623 ERROR return self._sock.recv_into(b)
2019-03-02 23:51:07,624 ERROR File "/usr/lib/python3.4/ssl.py", line 745, in recv_into
2019-03-02 23:51:07,628 ERROR return self.read(nbytes, buffer)
2019-03-02 23:51:07,628 ERROR File "/usr/lib/python3.4/ssl.py", line 617, in read
2019-03-02 23:51:07,632 ERROR v = self._sslobj.read(len, buffer)
2019-03-02 23:51:07,632 ERROR ConnectionResetError
2019-03-02 23:51:07,633 ERROR :
2019-03-02 23:51:07,634 ERROR [Errno 104] Connection reset by peer
2019-03-02 23:51:07,634 ERROR
During handling of the above exception, another exception occurred:
2019-03-02 23:51:07,635 ERROR Traceback (most recent call last):
2019-03-02 23:51:07,635 ERROR File "/usr/lib/python3/dist-packages/requests/adapters.py", line 362, in send
2019-03-02 23:51:07,637 ERROR timeout=timeout
2019-03-02 23:51:07,638 ERROR File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 559, in urlopen
2019-03-02 23:51:07,641 ERROR _pool=self, _stacktrace=stacktrace)
2019-03-02 23:51:07,642 ERROR File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 245, in increment
2019-03-02 23:51:07,644 ERROR raise six.reraise(type(error), error, _stacktrace)
2019-03-02 23:51:07,644 ERROR File "/usr/lib/python3/dist-packages/six.py", line 624, in reraise
2019-03-02 23:51:07,648 ERROR raise value.with_traceback(tb)
2019-03-02 23:51:07,648 ERROR File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 516, in urlopen
2019-03-02 23:51:07,651 ERROR body=body, headers=headers)
2019-03-02 23:51:07,652 ERROR File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 333, in _make_request
2019-03-02 23:51:07,654 ERROR httplib_response = conn.getresponse()
2019-03-02 23:51:07,655 ERROR File "/usr/lib/python3.4/http/client.py", line 1172, in getresponse
2019-03-02 23:51:07,660 ERROR response.begin()
2019-03-02 23:51:07,660 ERROR File "/usr/lib/python3.4/http/client.py", line 351, in begin
2019-03-02 23:51:07,663 ERROR version, status, reason = self._read_status()
2019-03-02 23:51:07,664 ERROR File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
2019-03-02 23:51:07,666 ERROR line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
2019-03-02 23:51:07,667 ERROR File "/usr/lib/python3.4/socket.py", line 371, in readinto
2019-03-02 23:51:07,669 ERROR return self._sock.recv_into(b)
2019-03-02 23:51:07,670 ERROR File "/usr/lib/python3.4/ssl.py", line 745, in recv_into
2019-03-02 23:51:07,674 ERROR return self.read(nbytes, buffer)
2019-03-02 23:51:07,675 ERROR File "/usr/lib/python3.4/ssl.py", line 617, in read
2019-03-02 23:51:07,678 ERROR v = self._sslobj.read(len, buffer)
2019-03-02 23:51:07,679 ERROR urllib3.exceptions
2019-03-02 23:51:07,679 ERROR .
2019-03-02 23:51:07,680 ERROR ProtocolError
2019-03-02 23:51:07,680 ERROR :
2019-03-02 23:51:07,681 ERROR ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
2019-03-02 23:51:07,681 ERROR
During handling of the above exception, another exception occurred:
2019-03-02 23:51:07,682 ERROR Traceback (most recent call last):
2019-03-02 23:51:07,682 ERROR File "myq-garage.py", line 397, in
2019-03-02 23:51:07,685 ERROR myq_main()
2019-03-02 23:51:07,686 ERROR File "myq-garage.py", line 365, in myq_main
2019-03-02 23:51:07,688 ERROR device_instances = myq.get_devices()
2019-03-02 23:51:07,689 ERROR File "myq-garage.py", line 311, in get_devices
2019-03-02 23:51:07,691 ERROR res = self.fetch_device_json()
2019-03-02 23:51:07,692 ERROR File "myq-garage.py", line 293, in fetch_device_json
2019-03-02 23:51:07,694 ERROR req = self.session.get(self.enumurl, headers=self.headers, params=payload)
2019-03-02 23:51:07,695 ERROR File "/usr/lib/python3/dist-packages/requests/sessions.py", line 469, in get
2019-03-02 23:51:07,696 ERROR return self.request('GET', url, **kwargs)
2019-03-02 23:51:07,696 ERROR File "/usr/lib/python3/dist-packages/requests/sessions.py", line 457, in request
2019-03-02 23:51:07,698 ERROR resp = self.send(prep, **send_kwargs)
2019-03-02 23:51:07,698 ERROR File "/usr/lib/python3/dist-packages/requests/sessions.py", line 569, in send
2019-03-02 23:51:07,700 ERROR r = adapter.send(request, **kwargs)
2019-03-02 23:51:07,700 ERROR File "/usr/lib/python3/dist-packages/requests/adapters.py", line 407, in send
2019-03-02 23:51:07,701 ERROR raise ConnectionError(err, request=request)
2019-03-02 23:51:07,702 ERROR requests.exceptions
2019-03-02 23:51:07,702 ERROR .
2019-03-02 23:51:07,702 ERROR ConnectionError
2019-03-02 23:51:07,703 ERROR :
2019-03-02 23:51:07,703 ERROR ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.