Hello,
Thank you for developing this script and making it public. It's very helpful.
I've been experimenting with it on my rasberry pi with the most simple configuration ever; I just added my username/password for my MyQ account and it works for my Chamberlain garage door opener!
But, as others have recently reported, I have a problem where after sometime the script no longer returns results (e.g. ./myq_garage.py status returns nothing). I need to delete /tmp/myqtoken.json for it to work again.
I first installed it last night, but by this morning I needed to remove /tmp/myqtoken.json for it to work again.
Then this morning once I got it working, 2 hours later when I attempt to use it again, it wasn't working.
I have not yet done testing to see how long I can get it to work for.
/tmp/myqtoken.json is getting created by the standard linux user which I'm using when I run the myq-garage.py from the command line.
When it's not working, deleting that file appears to make it work again.
I have attempted to change the config.ini's TOKENTTL value from 60 to 50, but that had no effect.
Shouldn't the token be getting deleted after 60 (or 50) minutes? Why do I have to manually delete it? What changes would you guys recommend so that this script can be reliably called when needed?
Thank you!
Also, below, is my log this morning when it wasn't working. The time is a little screwy on my system due to UTC offset. Here is what these times break down to if it helps.
7:00 and 8:00 hour: Over night when I was not using this script or the garage door. When I went to bed it was working.
10:00 hour: When I found it wasn't working this morning and needed to delete the token file to make it work again. Deleted the token file about 10:30.
11:00 to 12:00: When I left the plugin working and went to work.
12:29: Arrived at work to find the plugin no longer working.
13:01: Deleted the token file and the script was working again.
2017-03-27 00:07:12,432 INFO ==================================STARTED================================== 2017-03-27 00:07:13,487 INFO Garage Door is Closed. Last changed at Sun 26 Mar 2017 23:52:22 2017-03-27 00:07:13,558 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 00:07:13,561 ERROR Traceback (most recent call last): 2017-03-27 00:07:13,562 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:07:13,565 ERROR gdoor_main() 2017-03-27 00:07:13,567 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 00:07:13,569 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:07:13,571 ERROR TypeError 2017-03-27 00:07:13,572 ERROR : 2017-03-27 00:07:13,574 ERROR 'NoneType' object is not iterable 2017-03-27 00:07:52,759 INFO ==================================STARTED================================== 2017-03-27 00:07:53,908 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 00:07:53,911 ERROR Traceback (most recent call last): 2017-03-27 00:07:53,913 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:07:53,915 ERROR gdoor_main() 2017-03-27 00:07:53,917 ERROR File "./myq-garage.py", line 391, in gdoor_main 2017-03-27 00:07:53,919 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:07:53,921 ERROR TypeError 2017-03-27 00:07:53,923 ERROR : 2017-03-27 00:07:53,924 ERROR 'NoneType' object is not iterable 2017-03-27 00:07:59,447 INFO ==================================STARTED================================== 2017-03-27 00:08:00,421 INFO Garage Door is Opening. Last changed at Mon 27 Mar 2017 00:07:55 2017-03-27 00:08:00,487 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 00:08:00,490 ERROR Traceback (most recent call last): 2017-03-27 00:08:00,492 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:08:00,494 ERROR gdoor_main() 2017-03-27 00:08:00,496 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 00:08:00,499 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:08:00,500 ERROR TypeError 2017-03-27 00:08:00,502 ERROR : 2017-03-27 00:08:00,503 ERROR 'NoneType' object is not iterable 2017-03-27 00:08:04,022 INFO ==================================STARTED================================== 2017-03-27 00:08:04,945 INFO Garage Door is Opening. Last changed at Mon 27 Mar 2017 00:07:55 2017-03-27 00:08:05,014 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
2017-03-27 00:08:05,016 ERROR Traceback (most recent call last): 2017-03-27 00:08:05,018 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:08:05,021 ERROR gdoor_main() 2017-03-27 00:08:05,023 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 00:08:05,025 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:08:05,027 ERROR TypeError 2017-03-27 00:08:05,028 ERROR : 2017-03-27 00:08:05,030 ERROR 'NoneType' object is not iterable 2017-03-27 00:08:07,852 INFO ==================================STARTED================================== 2017-03-27 00:08:08,803 INFO Garage Door is Opening. Last changed at Mon 27 Mar 2017 00:07:55 2017-03-27 00:08:08,869 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 00:08:08,871 ERROR Traceback (most recent call last): 2017-03-27 00:08:08,873 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:08:08,875 ERROR gdoor_main() 2017-03-27 00:08:08,877 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 00:08:08,880 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:08:08,881 ERROR TypeError 2017-03-27 00:08:08,883 ERROR : 2017-03-27 00:08:08,884 ERROR 'NoneType' object is not iterable 2017-03-27 00:08:11,034 INFO ==================================STARTED================================== 2017-03-27 00:08:12,023 INFO Garage Door is Open. Last changed at Mon 27 Mar 2017 00:08:09 2017-03-27 00:08:12,092 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 00:08:12,095 ERROR Traceback (most recent call last): 2017-03-27 00:08:12,096 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:08:12,099 ERROR gdoor_main() 2017-03-27 00:08:12,101 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 00:08:12,103 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:08:12,105 ERROR TypeError 2017-03-27 00:08:12,106 ERROR : 2017-03-27 00:08:12,108 ERROR 'NoneType' object is not iterable 2017-03-27 00:08:15,108 INFO ==================================STARTED================================== 2017-03-27 00:08:16,053 INFO Garage Door is Open. Last changed at Mon 27 Mar 2017 00:08:09 2017-03-27 00:08:16,130 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 00:08:16,132 ERROR Traceback (most recent call last):
2017-03-27 00:08:16,134 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 00:08:16,136 ERROR gdoor_main() 2017-03-27 00:08:16,138 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 00:08:16,141 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 00:08:16,143 ERROR TypeError 2017-03-27 00:08:16,144 ERROR : 2017-03-27 00:08:16,146 ERROR 'NoneType' object is not iterable 2017-03-27 10:32:39,220 INFO ==================================STARTED================================== 2017-03-27 10:32:47,251 INFO ==================================STARTED================================== 2017-03-27 10:32:51,102 INFO ==================================STARTED================================== 2017-03-27 10:33:21,730 INFO ==================================STARTED================================== 2017-03-27 10:41:55,218 INFO ==================================STARTED================================== 2017-03-27 10:43:12,552 INFO ==================================STARTED================================== 2017-03-27 10:43:14,650 INFO Garage Door is Open. Last changed at Mon 27 Mar 2017 00:08:09 2017-03-27 10:43:15,098 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 10:43:15,101 ERROR Traceback (most recent call last): 2017-03-27 10:43:15,103 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 10:43:15,106 ERROR gdoor_main() 2017-03-27 10:43:15,108 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 10:43:15,110 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 10:43:15,112 ERROR TypeError 2017-03-27 10:43:15,114 ERROR : 2017-03-27 10:43:15,116 ERROR 'NoneType' object is not iterable 2017-03-27 10:49:25,594 INFO ==================================STARTED================================== 2017-03-27 10:49:26,651 INFO Garage Door is Closed. Last changed at Mon 27 Mar 2017 10:43:50 2017-03-27 10:49:26,721 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 10:49:26,723 ERROR Traceback (most recent call last): 2017-03-27 10:49:26,725 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 10:49:26,727 ERROR gdoor_main() 2017-03-27 10:49:26,729 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 10:49:26,731 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 10:49:26,733 ERROR TypeError 2017-03-27 10:49:26,734 ERROR : 2017-03-27 10:49:26,736 ERROR 'NoneType' object is not iterable 2017-03-27 12:29:54,301 INFO ==================================STARTED================================== 2017-03-27 13:00:53,882 INFO ==================================STARTED================================== 2017-03-27 13:01:06,165 INFO ==================================STARTED================================== 2017-03-27 13:01:07,272 INFO Garage Door is Closed. Last changed at Mon 27 Mar 2017 11:20:00 2017-03-27 13:01:07,427 ERROR Caught Exception in isy_get_var_id: ('Connection aborted.', gaierror(-2, 'Name or service not known')) 2017-03-27 13:01:07,430 ERROR Traceback (most recent call last): 2017-03-27 13:01:07,431 ERROR File "./myq-garage.py", line 407, in <module> 2017-03-27 13:01:07,434 ERROR gdoor_main() 2017-03-27 13:01:07,435 ERROR File "./myq-garage.py", line 380, in gdoor_main 2017-03-27 13:01:07,438 ERROR id, varname, init, value = isy_get_var_id(inst.name) 2017-03-27 13:01:07,440 ERROR TypeError 2017-03-27 13:01:07,441 ERROR : 2017-03-27 13:01:07,443 ERROR 'NoneType' object is not iterable