Code Monkey home page Code Monkey logo

Comments (29)

robsonke avatar robsonke commented on June 27, 2024 7

Here you go: https://github.com/robsonke/hassio-addons

Main page:
image

Configuration:
image

Startup log:
image

Do whatever you want with it, my goal is to just have this in Hassio together with all other add-ons. Copy/fork/refer my repo, change the descriptions (they're still very brief), add icons (that would be nice).

from amcrest2mqtt.

brushj avatar brushj commented on June 27, 2024 5

@omayhemo I got it up and running through portainer a little bit ago. Pretty straight forward:

In Portainer select Containers in the left pane > +Add Container
Name: Enter in a name you want to use
Registry: DockerHub
Image docker.io: dchesterton/amcrest2mqtt:latest
Always pull the image: toggle on
Skip Network ports configuration section

Advanced container settings
Network: I set the network to my home assistant instance, user preferences may vary here.
Env: Environment Variables - this is the critical section. The settings below are what I used to get it working with home assistant.
Screen Shot 2021-02-24 at 9 11 29 PM
Click the +add environment variable button for the amount of variables you want to enter. I only needed to add the section outlined in red. The rest were added automatically when I deployed the container.

Restart Policy: Set to unless stopped

Go back up to Actions: Click Deploy this container

from amcrest2mqtt.

dchesterton avatar dchesterton commented on June 27, 2024 2

I've added support for arm7 builds (and other platforms while I was working on it) so you can use my image now if you want 😄

from amcrest2mqtt.

dchesterton avatar dchesterton commented on June 27, 2024 2

Thanks very much for doing this Rob. I will look to merge it into the main repo when I can but I'm snowed under at the moment so it won't be for a while.

from amcrest2mqtt.

GaryOkie avatar GaryOkie commented on June 27, 2024 2

The purpose of amcrest2mqtt was to expose all amcrest/dahua events since the camera integrations did not have this support built in. Now they do. My point was that you can use the updated camera integrations event capability natively and simplify things a bit.

Your issue with the Amcrest integration not supporting doorbell events is no longer the case. You check for the CallNoAnswered event in the same way as you do with amcrest2mqtt, just without needing MQTT . And as to motion events occurring far too much, that could be due to checking for VideoMotion events from the AD110. This is the default for the Amcrest integration's motion binary sensor. On the AD110, look for the "AlarmLocal/Start/Stop" events instead in your automations.

from amcrest2mqtt.

dchesterton avatar dchesterton commented on June 27, 2024 1

It's worth noting that the add-on exposes all events to the amcrest2mqtt/XXX/event topic too so if the built in sensors don't work for you for whatever reason, you can also use them 😀

Personally I prefer to abstract functionality out of Home Assistant and use MQTT as the communication layer between. But I can understand that some prefer the functionality to be built-in. It's good that we have options though! 🙂

from amcrest2mqtt.

GaryOkie avatar GaryOkie commented on June 27, 2024 1

You're absolutely right briodan - the docs for both integrations don't provide much detail at all on how to set up event triggers. Much of this info had to be found haphazardly in the forum. However, the custom Dahua integration does provide the abstraction capability to create binary sensors for doorbell press, etc., using the HASS configuration manager to select the events you want to trigger on.

Daniel - if a HASS user is using a different camera integration, such as ffmpeg or generic, then I fully agree that using MQTT is the best approach to provide the necessary event handling communications. Before your great work providing this, some of us were using python script hacks. But now that amcrest/dahua integrations are transmitting ALL camera events to the HASS bus, there is a duplication of subscribing to these events when using amcrest2mqtt in conjunction. (Core Amcrest is using python-amcrest to subscribe as does amcrest2mqtt, the other integration uses Dahua-VTO library).

The need to handle events with numerous cameras was also a major factor for me in using the core Amcrest integration in a HASS OS build.

It definitely is good to have these options, and have very much appreciated all your work in this.

from amcrest2mqtt.

GaryOkie avatar GaryOkie commented on June 27, 2024 1

@mr-ransel - I actually agree with you that this was not an appropriate place to provide awareness of alternative event handling. I've regretted making these posts here.

My apologies to all.

from amcrest2mqtt.

omayhemo avatar omayhemo commented on June 27, 2024

+1

Or at least document the registry for use in Portainer or the like.

from amcrest2mqtt.

snozzley avatar snozzley commented on June 27, 2024

If it's not too much work, could we get an arm7 build so we can run this on a raspberry pi please?
edit: Ah never mind I figured out how to do it, and have got one hosted here now: snozzley/amcrest2mqtt
Hope that is ok?

Can now have it running on my raspberry pi almost like it's a real hassio addon :)

from amcrest2mqtt.

leonardomrc avatar leonardomrc commented on June 27, 2024

@omayhemo I got it up and running through portainer a little bit ago. Pretty straight forward:

In Portainer select Containers in the left pane > +Add Container
Name: Enter in a name you want to use
Registry: DockerHub
Image docker.io: dchesterton/amcrest2mqtt:latest
Always pull the image: toggle on
Skip Network ports configuration section

Advanced container settings
Network: I set the network to my home assistant instance, user preferences may vary here.
Env: Environment Variables - this is the critical section. The settings below are what I used to get it working with home assistant.

Click the +add environment variable button for the amount of variables you want to enter. I only needed to add the section outlined in red. The rest were added automatically when I deployed the container.

Restart Policy: Set to unless stopped

Go back up to Actions: Click Deploy this container

I already have Portainer running on my HA. I added a Container with all required specifications. The container was deployed and it is now running.

What do I have to do next? What do I have to add to my configuration.yaml file to watch the events?

from amcrest2mqtt.

dereitz avatar dereitz commented on June 27, 2024

I already have Portainer running on my HA. I added a Container with all required specifications. The container was deployed and it is now running.

What do I have to do next? What do I have to add to my configuration.yaml file to watch the events?

I was working through this myself tonight. If you haven't already figured it out, you'll need to setup an MQTT broker (in my case I setup as another docker container). You'll then need to setup the MQTT integration in HA. Assuming you enabled auto discovery, HA will automatically discover your Amcrest and prompt you to add it to a room. It will also add the appropriate entities which you can then add to the HA GUI via the Entity card.

Good luck!

from amcrest2mqtt.

robsonke avatar robsonke commented on June 27, 2024

If you want, I can create a PR for this issue. But I'd like to get some idea of how you would like this to be implemented. Since I believe that the hassio image shouldn't wrap your original container, so it would replace it but that would make your image hassio specific. Wrapping seems to be an option too but in that case I wouldn't know how to get the addon configuration options in.

from amcrest2mqtt.

omayhemo avatar omayhemo commented on June 27, 2024

I'd like it to be obfuscated. Install the Add-On, use the configuration screen to apply the variables, Log screen for trace. No additional containers. You'll get much larger adoption I have little doubt.

from amcrest2mqtt.

dchesterton avatar dchesterton commented on June 27, 2024

Thanks, I'd welcome a PR if you have time 🙂 I definitely don't want the image to be hassio specific. I think it should be possible to pass the configuration options in as environment variables but I haven't looked into it in detail.

from amcrest2mqtt.

robsonke avatar robsonke commented on June 27, 2024

Totally agree on that, but it makes it harder because hassio has base images with everything pre-installed. But I'll look into putting what I need in the wrapping image.

from amcrest2mqtt.

robsonke avatar robsonke commented on June 27, 2024

FYI, I have a working local addon now. I'll wrap it in a repo and give you the option to fork/copy it. I'll try to do that later today.

from amcrest2mqtt.

GaryOkie avatar GaryOkie commented on June 27, 2024

Rob's amcrest2mqtt addon installed easily and is working fine for me... (installed on RasPi4).

from amcrest2mqtt.

Ixian avatar Ixian commented on June 27, 2024

Works for me also. Thanks Rob! Would be nice to see this pulled in to the main repo or even added to the Community Addon section.

from amcrest2mqtt.

trickiegt avatar trickiegt commented on June 27, 2024

Thanks Rob -- I appreciate having it tied to my HA instance for backup purposes and having everything in one place
Thanks dchesterton for the extensive work on creating the app and sharing with everyone

from amcrest2mqtt.

mr-ransel avatar mr-ransel commented on June 27, 2024

Thanks Rob! I've been running yours for awhile on my HA instance, and it's been stable. @dchesterton any chance of getting it centralized/merged in here so we don't have to daisy-chain repos? No rush, just curious how you're schedule's looking :P

from amcrest2mqtt.

GaryOkie avatar GaryOkie commented on June 27, 2024

While I greatly appreciated having amcrest2mqtt supported as an add-on initially, I'm no longer using it.

If the only thing you are using MQTT for is to fetch events from Amcrest or Dahua cameras/doorbell please be advised that it's really no longer necessary. Both the core Amcrest integration and the custom Dahua integration now handle event passing directly in HASS automations.

The ability to access doorbell press events, any motion event, etc., is all now available without requiring MQTT. The custom Dahua integration even has the option to automatically create binary sensors for selected events.

I should add that I had zero problems with amcrest2mqtt, and when it was the only game in town for event handling, it was great.

from amcrest2mqtt.

briodan avatar briodan commented on June 27, 2024

While I greatly appreciated having amcrest2mqtt supported as an add-on initially, I'm no longer using it.

If the only thing you are using MQTT for is to fetch events from Amcrest or Dahua cameras/doorbell please be advised that it's really no longer necessary. Both the core Amcrest integration and the custom Dahua integration now handle event passing directly in HASS automations.

The ability to access doorbell press events, any motion event, etc., is all now available without requiring MQTT. The custom Dahua integration even has the option to automatically create binary sensors for selected events.

I should add that I had zero problems with amcrest2mqtt, and when it was the only game in town for event handling, it was great.

That's not necessarily true for all amcrest cameras. I run an ad110 doorbell camera and neither the AMCREST (cant get doorbell ring events) or DAHUA (motion notification come through every 30 seconds, video feed not working) integrations work well for me. Could be I have not invested the time on it but anything more then 30 minutes is more time then I have. The amcrest2mqtt add-on has been fairly flawless and easy to setup for me.

back to the subject of this thread it would be great though to have it all in one repo, though i have it installed and working so it will be of little benefit to me :).

from amcrest2mqtt.

cc4005 avatar cc4005 commented on June 27, 2024

If the only thing you are using MQTT for is to fetch events from Amcrest or Dahua cameras/doorbell please be advised that it's really no longer necessary. Both the core Amcrest integration and the custom Dahua integration now handle event passing directly in HASS automations.

The ability to access doorbell press events, any motion event, etc., is all now available without requiring MQTT. The custom Dahua integration even has the option to automatically create binary sensors for selected events.

Is AI data available via the Amcrest integration? E.g., I use "human" from my AD410 doorbell cam.

Worth noting, too, that I currently use amcrest2mqtt with Homeseer, not Home Assistant, so it's still a critical tool in my bag as the best (only?) way to get the camera data into my automations. But I'm gradually moving a few things over to Home Assistant.

from amcrest2mqtt.

GaryOkie avatar GaryOkie commented on June 27, 2024

Sure - not just "AI Data", but just like amcrest2mqtt, the HASS Amcrest and Dahua integrations enable ALL events. This definitely includes AD410 human motion events.

See https://community.home-assistant.io/t/amcrest-video-doorbell-ad110-initial-impressions/171290/301?u=garyokie for examples.

And of course if you are happy with the way your setup is now, then "if ain't broke..."

from amcrest2mqtt.

cc4005 avatar cc4005 commented on June 27, 2024

Sure - not just "AI Data", but just like amcrest2mqtt, the HASS Amcrest and Dahua integrations enable ALL events. This definitely includes AD410 human motion events.

See https://community.home-assistant.io/t/amcrest-video-doorbell-ad110-initial-impressions/171290/301?u=garyokie for examples.

And of course if you are happy with the way your setup is now, then "if ain't broke..."

Thank you for the reply and link.

from amcrest2mqtt.

briodan avatar briodan commented on June 27, 2024

The purpose of amcrest2mqtt was to expose all amcrest/dahua events since the camera integrations did not have this support built in. Now they do. My point was that you can use the updated camera integrations event capability natively and simplify things a bit.

Your issue with the Amcrest integration not supporting doorbell events is no longer the case. You check for the CallNoAnswered event in the same way as you do with amcrest2mqtt, just without needing MQTT . And as to motion events occurring far too much, that could be due to checking for VideoMotion events from the AD110. This is the default for the Amcrest integration's motion binary sensor. On the AD110, look for the "AlarmLocal/Start/Stop" events instead in your automations.

not to deviate too much from this thread but the documentation for either integration does not list any information on the type of events you need to monitor for or link to where you can get more information. Like I said I expected this information to be available somewhere just didn't get the time to look it up.

While technically there might not be a need for the add-on as the functionality is already there in integrations, the add-on makes the process transparent from an end user perspective. Not needing to monitor event logs to find the exact one I need or having to write event triggers simplifies things and allows more people to use it.

from amcrest2mqtt.

mr-ransel avatar mr-ransel commented on June 27, 2024

First, I really do appreciate your helpfulness and trying to help people solve for their individual setups @GaryOkie, more people on the internet should be like you, and many of the solutions you pointed out are great for many situations!

But also, when someone asks for an update on if a feature-request will be moved to the primary repo, I am sure you can see that a list of reasons why they should stop using this project and use others is probably not what they were hoping for. That said, I appreciate your recommendations, but this might not be the appropriate venue.

from amcrest2mqtt.

SirGoodenough avatar SirGoodenough commented on June 27, 2024

And another Addon made by someone else... @ikifar2012
https://github.com/ikifar2012/amcrest2mqtt-addon/blob/master/README.md

No need for a community store link for this one, here is your link...
ICYDK, everything in the community store is maintained by Frenck (a Nabu-Casa employee), his are the only ones there. Besides the official ones, all others are repo by repo...

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

https://github.com/ikifar2012/amcrest2mqtt-addon

Perhaps an edit of the main readme pointing out the add-ons that you know about using your software would be handy and you could close this issue...

UPDATE... Did the editing first pass for you, it's in a PR now.

from amcrest2mqtt.

Related Issues (20)

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.