The sdcard and motion_detector sensors look great! I have not tested them out yet - maybe tomorrow when I have some time.
I really like the idea of moving the camera from within HA (when viewing the live stream)! I think that having manual control (up, down, left, right) would be important, especially if I want to see something slightly beyond the camera’s view. Presets would be very nice too.
Keep up the great work on this! I’m excited to see where you take this.
So with some work on the HA UI, the Amcrest camera will be able to load automatically all preset PTZ positions and allow the user to move the camera without any custom script as I showed above. What do you guys think?
@tchellomello I had put off purchasing the cameras because I did not want to really mess with setting all this up but your module is encouraging me to go ahead and get at least on PTZ to play with now.
If I may further add, I really like your implementation of preset positions. Personally, I think this is a much better way to do things. I mean, think about it, just how much are you going to be logging into HA and moving the camera around? I suspect most use cases would involve not doing much with it until some kind of alert came in such as motion detected. Even then, when I logged in to check on the camera, particularly on a mobile device, I dont want to be trying to fine tune movements and zoom levels with my finger, pinching, etc.
It seems like a much better method to predetermine the best coverage areas and zoom levels and just tap on a link and have the camera move there.
So keep it up. When I get my camera, I will be using your module to test things out. I was going to start with the outdoor cameras since it seemed like it would be easier to set those up, but now I will go ahead and get me a PTZ camera. Hopefully, I will have it in a few days and can provide further feedback.
I tried it both with and without sudo and get the following error:
Downloading/unpacking git+https://github.com/tchellomello/python-amcrest@amcrest_simplified_response
Cloning https://github.com/tchellomello/python-amcrest (to amcrest_simplified_response) to /tmp/pip-3syeu2lh-build
Could not find a tag or branch 'amcrest_simplified_response', assuming commit.
error: pathspec 'amcrest_simplified_response' did not match any file(s) known to git.
Complete output from command /usr/bin/git checkout -q amcrest_simplified_response:
----------------------------------------
Cleaning up...
Command /usr/bin/git checkout -q amcrest_simplified_response failed with error code 1 in /tmp/pip-3syeu2lh-build
Storing debug log for failure in /root/.pip/pip.log
Great work! I’m very pleased to see this. I just got a couple Amcrest cameras added last night. Eager to try this out!
I’m not sure how easy it is to implement this, but to add a time graph display on the Motion Sensor to see when there was motion would be a nice addition.
Looking into getting this or Foscam but leaning toward this based on your work and what seems to be more developer support for Amcrest than Foscam. Question, what format is the feed? Does it support audio? Would two-way audio be a possibility via HA?
The graph will be possible using the built-in graphs function available on HA. With the motion_dectector sensor introduced by the PR#5310, we should be able to get a graph about it.
The card will be displayed like this:
Then to have a more robust graph you can export the data to a Grafana database and use graphite to plot your graphs.
Thank you again and let’s make the component even better in the future.
Nice. I’m very happy with my Amcrest cameras and having the possibility to explore their SDK API and bring some functionalities to HA is very awesome.
On the next version 0.37, the feed will be over mjpeg. @colinodell provided an awesome patch that allows it now. Regarding the audio, I’m not sure if HA supports it but that is definitely a cool feature.
@tchellomello This looks to be working great on my IP2M-841, but I don’t get the sensor for my Amcrest IP3M‑954E outdoor bullet cam. I’m really mostly intersted in the motion detection.
I found I forgot to add the other camera under my sensors.yaml, but once I added it there when I restart HA I get (which may have happened before I added that (after upgrading HA to latest version), but I just never noticed it in the logs):
17-01-28 08:43:28 homeassistant.components.sensor: Error while setting up platform amcrest
Traceback (most recent call last):
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
entity_platform.add_entities, discovery_info
File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
value = future.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/amcrest.py", line 78, in setup_platform
add_devices(sensors, True)
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 300, in add_entities
entity.update()
File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/sensor/amcrest.py", line 124, in update
version, build_date = self._data.camera.software_information
File "/home/hass/.homeassistant/deps/amcrest/system.py", line 67, in software_information
version, build_date = ret.content.decode('utf-8').split()
ValueError: need more than 1 value to unpack
After removing the IP3M from sensors.yaml, I get no Amcrest platform error in the log. It seems that motion detection might not be fully supported on the bullet cam?