-
Notifications
You must be signed in to change notification settings - Fork 35
Can't get base station mode #43
Comments
It's working for me. If you do "arlo.base_stations", does it list only one base station? Some Netgear routers can act as Arlo base stations, and the "base = arlo.base_stations[0]" line will only work properly if the first one is the one you want. |
I've done the test. I've only one base station listed. |
After some tests, it seems to be a thread issue. When the action is sent to arlo server, the code is waiting thrue two loops. During this wait, the thread watching the event queue isn't running so no event is dispatched. Once the waiting loop is finished, i can see the thread getting events and the 'modes' result event. Tested multiple times on another raspberry 3 but with Jessy desktop: |
@arasium can you test it again on the latest version to check if the issue is still happening? |
Hi @tchellomello, I checked it out yesterday (running on RPI) and get the "None" result on each execution. Only one base station identified. |
Is this active with the latest release? I just did some work to modes. |
hi all. Now, after the Update there is only ['schedule'] shown. The Version I used before was from July2017 Is there any chance to get the modes back? Cheers |
I encountered this a few times while trying to figure out how to make schedule work correctly. In previous versions, I believe empty list was the result. What actually happened is the other modes were not retrieved from the arlo api. 'schedule' is special and not returned from the server. Probably need to add some robustness around some of the api calls to better indicate failures such as this. Is it doing it all the time for you? If it is, out of curiosity, what happens if you call basestation->update() before retrieving modes? |
Yes, I have tried several times and the result is unfortunately always "schedule". |
Ok I just remembered something I encountered that had this same result. Try this:
|
ok, The test-script:
|
You shouldn't have had to call update, it was just something to try. I ran the following with pyarlo 0.1.2:
And got: |
well, I added the update command only on the basis of your advice :-) Now I downgrade pyArlo from 0.1.3 to 0.1.2 but still the same failure. Maybe there is any other reason . . . Basestation or firmware?! or do you have any other ideas, what I can try out to get my mode switching back? |
Same firmware here, but my hardware is the 4000 model. I'm not sure that would have anything to do with it since they would standardize their api away from different model numbers at this level (at least I would think). Might try increased logging to see if anything falls out. Note: DON'T POST the output as it will contain your username and password. try:
The last couple of lines should be something like:
Note that 200 response from the GET. Does yours have that? |
yes, the response is everytime ok (200)
|
I'll look at this closer this evening. I want to make sure those log lines are representative of what I thought they were last night. |
Didn't get an opportunity to look in depth but I do believe I had the wrong lines in mind. I'll try to look tomorrow evening. In the mean time could you revert to the version you previously had working and make sure it retrieves the modes properly for you? |
Please still validate the previous version you had still works. I was referencing the wrong lines. You'll have to search up into the output some with the debug logging enabled. Search for the area containing (these are incomplete lines): pyarlo.base_station - Action body: {'action': 'get', 'from': 'some_guid_web', 'properties': None, 'publishResponse': False, 'resource': 'modes', ^ This line indicates that the code is about to query the api for the list of modes. Check to make sure that post return code is 200. |
Then I searched for Unfortunately, I do not know how to install an older version. |
Now I got it: Here is the result:
what did I expect? with pyArlo 0.0.6 I got: with pyArlo 0.0.7 I got:
with pyArlo 0.0.8 I got:
with pyArlo 0.0.9 I got: with pyArlo 0.1.0 I got: with pyArlo 0.1.1 I got: with pyArlo 0.1.2 I got: with pyArlo 0.1.3 I got: I am now back with the productive system to 0.0.6, so that my cameras automatically switch again when I come to home, or the patio door is opened. Unfortunately, the new features are gone. Incidentally, I got a 4000 basestation in the meantime. No difference to the 3000 (concerning this topic) Is there anything that I can do to help? |
This is great information. I'll have a look at it tonight if I can. edit: No longer tied to my earlier PR |
I have more info now that I've looked at the code. It looks like it really wasn't doing anything in v0.0.6, those modes: ['schedule', 'armed', 'disarmed', 'custom'] are all hard-coded in that version. |
With the latest version, what does this result in? print(base.get_available_modes()) should be a list of dictionaries containing the modes and rules for each mode.
|
Tried with pyarlo 0.1.2
|
I wasn't sure if I understood correctly.
|
I was wondering about the 0.1.2. It looks like for some reason it isn't retrieving modes within the specified wait. Currently it will wait 5 seconds for the response before continuing and silently failing. Try the following with v0.1.2 and post the result.
|
with pyArlo 0.1.2:
|
Ok, its definitely not getting responses when expected. Out of curiosity can you successfully get/set modes or other properties? |
Yes, with the 0.1.2 I can switch from any mode to the 'Schedule' mode. What do you think of making the waiting time more dynamic? |
I found a little solution for me by using the old pyArlo 0.0.6 In the file "const.py" I change the following lines:
with
The names of the mode assignment correspond exactly to what is entered in the arloAPP. This works without delay and I do not need a scheduler anymore, because my smarthome knows exactly whether I'm at home or not, whether I have barbecue in the garden or if my motorcycle is in the garage etc. |
Ok, sorry I haven't gotten a chance to look at the master branch in a few days. Hopefully we can resolve this. |
@Berjler are you still hitting this problem with the latest version? |
Hi,
I can get the base station mode (I see the update in my mobile App) but base.mode (like in the sample) return an empty result even if I set it just before.
I'm on a raspberry with raspbian jessie lite with Python 2.7.9
The text was updated successfully, but these errors were encountered: