Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version
): 0.65.1
Python release (python3 --version
): 3.5.3
Component/platform: Nest Camera
Description of problem: Nest component not playing nicely with Nest Hello doorbell camera
Expected: Hello doorbell camera is detected as a Nest camera an added as an entity.
Problem-relevant configuration.yaml
entries and steps to reproduce:
Traceback (if applicable):
2018-03-10 16:41:04 ERROR (MainThread) [homeassistant.components.camera] nest: Error on device update!
Traceback (most recent call last):
File "/srv/hass/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 188, in _async_add_entity
await entity.async_device_update(warning=False)
File "/srv/hass/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/hass/lib/python3.5/site-packages/homeassistant/components/camera/nest.py", line 77, in update
self._location = self.device.where
File "/srv/hass/lib/python3.5/site-packages/nest/nest.py", line 234, in where
return self.structure.wheres[self.where_id]['name']
KeyError: 'xAyw1dWii-a42GI0bSq-m8WBrVl4MpBnHIDGdWD0CiuJvk3VU_ejJw'
2018-03-10 16:41:04 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: exception=Traceback (most recent call last):
File "/srv/hass/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 188, in _async_add_entity
await entity.async_device_update(warning=False)
File "/srv/hass/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/hass/lib/python3.5/site-packages/homeassistant/components/camera/nest.py", line 77, in update
self._location = self.device.where
File "/srv/hass/lib/python3.5/site-packages/nest/nest.py", line 234, in where
return self.structure.wheres[self.where_id]['name']
KeyError: 'xAyw1dWii-a42GI0bSq-m8WBrVl4MpBnHIDGdWD0CiuJvk3VU_ejJw'
, level=ERROR, message=nest: Error on device update!, source=components/camera/nest.py, timestamp=1520721664.820353>
Additional info: This may end up being more of a feature request than a bug since it is a new product, but it should function just like Nest's other cameras.
Same issue of course, but I've seen a few posts that the Nest Hello isn't in the API yet on various forums. I don't know enough about coding to add it I don't think, but I'm looking through their API to see if I can piece together something functional. I'll let you know if I figure it out! I found the Hello in my API, so I have a start haha.
Well look at that, I figured it out!
"Front Door" as a "Where_id" doesn't exist in the Nest API yet. So when the HASS component looks for the ID, it comes up null, which bombs the adding of the camera. If you change the location of your Nest Hello in the Nest app to "Front Yard", the camera gets pulled into HASS as expected.
Someone could probably add "If where_id not found, continue anyway" or something, but that's above my knowledge right now haha.
That did the trick. I changed the location from front door to entranceway and everything populated after a restart of Hass.
My hello arrives on Monday and once they update the API with Hello (and Guard) support I plan on adding to python-nest and then home assistant.
In the mean time I'll work on getting the PR to fix the where issue merged to home assistant.
Interesting addendum: when I add my Nest Hello (as a camera) to Home Assistant (using either Front Door
or Entryway
as the name), I get this:
馃槅???
Same as above.
@cburgess Since you have familiarity with the Nest API, is it possible Nest is piping in a rickroll for entities it doesn't support?
Wait, are you all being serious or are you just trying to rick-roll me?
This is for real, I was surprised to see it too.
Oh wow umm ok. Thats.... unusual. I haven't added my Nest Hello to home assistant yet (I've been out of town for a few weeks), but it is installed so I can access it via the Nest API.
Can you give me some more details on how you are getting the GIF? Are you trying to watch the camera feed and that comes up? Also what version of home assistant and what is the actual URL of the GIF?
I'll poke around the API tomorrow (I'm traveling today) and see if I can figure out what its doing.
Home Assistant Version: 0.66.0.b2
Yea, trying to watch the camera feed that comes up.
URL (token masked): https://localhost:8123/api/camera_proxy_stream/camera.front_door?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@cburgess: Agreed with @nikechristo, I'm seeing the same thing. I'm on 0.66.0.beta1. I can't see any further than the /api/camera_proxy_stream
URL
Sorry its taken me a bit to respond, but I've been traveling with limited time to debug. The "Rick Roll" is actually a default fall back in python-nest when there is a camera device with no snapshot URL (https://github.com/jkoelker/python-nest/blob/master/nest/nest.py#L1293-L1298). I've tried a number of different where names with my protect and I can't reproduce the issue with python-nest directly or home assistant (using numerous recent tags and dev). Tomorrow (Easter Sunday) I will post a debug script that you all can run to provide me with some more data to see if I can figure out what the underlying issue is. I'm also going to open a new issue for this problem (and cross link it to this one) for troubleshooting since I don't think this is related to the same where issue I previously fixed.
TL;DR - Check back tomorrow for more info.
Cheers
Thanks @cburgess for looking into this , I think I know why it can't find the snapshot URL. Nest seems to have updated the developer console webpage with some new permission options recently. I now see two new permissions for camera - Camera + Images read/write
and Camera + Images read
. When I configured Nest on HA, these weren't there so I had mine set to Camera read/write
. Once I granted the Camera + Images
permission, HA started working. However, it seems to be only snapshots, no live video.
Thanks for all your help, @cburgess. I concur with @nikechristo: when I update permissions, I see snapshots appear!
I had actually suspected we were looking at a permission problem. It seems that we don't handle permission issues in python-nest or HA very well. I'll put some though into how we could improve this. Ideally if something like this were to happen in the future there would some type of warning printed to the log that said you lacked the permissions and stated the missing permission.
I've only set up the Home Assistant this week and have added my Nest camera to it. It's recognized and I can get status changes, but my image is the rickrolling gif mentioned above as well.
HA version: 0.68.0
My nest permissions are Camera + Images read/write
I'm not seeing any helpful messages in the log that might explain why this is happening. As I mentioned above, the nest camera is on of the first devices I've used, so it might be something that could be solved easily with experience.
Update:
When I access the stream directly via
https://XXXXXXXXX/api/camera_proxy/camera.living_room?token=XXXXXXXXXXXXXXXXXXXXXXXXXX
I also see the rickroll gif.
I wonder if changing permissions after the first pairing affected anything. The Nest website says the users will be asked to re-authenticate, but I don't believe there's any mechanism for that in the interface. Also, the keys haven't changed.
Another update: In the Nest iPhone app, confirmations were waiting for me to approve. I approved the latest one, and the camera immediately started showing up. These new indications were not available on the Nest Developer site or in the HomeAssistant UI. I just happened to open the Nest app and found it. I hadn't been on that app and was lucky to find them.
Any updates with this? I can also confirm that I am getting the rick-roll GIF. I have the Camera Read/Write
permission and the binary sensors aren't having any issues.
If it helps, I'm using a DropCam in a room called "Living Room
."
I am interested as well - I have a Next Hello and get Mr.Astley as well.
I have the same problem with my nest cam. Any fix
I suspect @Geekly pinpointed the problem for me at least. There is no mechanism for Nest to re-authenticate us after we change the permissions.
Though, I just realized I can delete the nest.conf
file in the config directory and after a restart it will re-prompt to walk through the authorization flow.
Is the nest hello working in Home Assistant now?
It's working for me.
@Bahnburner , thank you. Did you have to do anything special outside of the Home Assistant Nest docs?
Not really. I had to change the "room" the camera was in from "front door" to "front yard" or something like that due to a bug, but that's since been patched. If you have other nest products, I would also suggest updating your permissions on the nest developer site since they've made some changes to the permissions process recently, and then deleting nest.conf from your hass directory and reconfiguring the component.
Anyone who's done this, is there an event that fires in HASS when the Nest Hello doorbell is rung, or motion? I've currently got the Ring, but am looking to move to Nest Hello soon, but what I like about the ring is that when the doorbell is rung, it triggers an automation in HASS to pause the music in the house for example
Motion yes, ring no.
Thanks for the reply - Is this likely to change soon? Seems a shame that HASS can't react when the doorbell is pushed
Most helpful comment
Interesting addendum: when I add my Nest Hello (as a camera) to Home Assistant (using either
Front Door
orEntryway
as the name), I get this:馃槅???