Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need your help to create an Agent DVR addon for Home Assistant #507

Open
DivanX10 opened this issue Oct 14, 2022 · 12 comments
Open

Need your help to create an Agent DVR addon for Home Assistant #507

DivanX10 opened this issue Oct 14, 2022 · 12 comments
Labels
enhancement New feature or request

Comments

@DivanX10
Copy link

Your program is great, but there is not enough addon for Home Assistant and I would like Agent DVR to have an addon for Home Assistant. I've learned how to create simple things so far, but I haven't learned how to transfer settings from an addon to a container or mount folders, and I don't understand how to do it. I created the Agent DVR addon and ran into a problem. I do not know how to mount folders from Home Assistant. More precisely, I know how to mount folders in the Docker Container itself, but I don't know how to implement it in the Agent DVR addon. The addon itself is launched and Agent DVR is working properly. Could you help in creating the Agent DVR addon? You can take all the files here

The appearance of the Agent DVR addon
image
image

I was thinking of using Stacks to add Agent DVR to Docker Portainer since it works successfully, but it only works if we manually insert this code into Stacks

image

version: "3.7"
services:
  agentdvr_4.2.9.0:
    image: doitandbedone/ispyagentdvr:4.2.9.0
    container_name: AgentDVR_4.2.9.0
    privileged: true
    restart: always
    ports:
      - "8090:8090"
      - "3478:3478/udp"
      - "50000-50010:50000-50010/udp"
    volumes:
      - /mnt/data/supervisor/homeassistant/AgentDVR/Commands:/agent/Commands
      - /mnt/data/supervisor/homeassistant/AgentDVR/Media:/agent/Media/WebServerRoot/Media
      - /mnt/data/supervisor/homeassistant/AgentDVR/Config:/agent/Media/XML
@DivanX10 DivanX10 added the enhancement New feature or request label Oct 14, 2022
@ispysoftware
Copy link
Collaborator

hello happy to help but i don't use HA myself - if there's something specific you need from my side just ask - you might have more luck asking on HA community instead though

@DivanX10
Copy link
Author

DivanX10 commented Nov 3, 2022

Don't close this topic yet, if you can. Maybe someone knows how to do it and will give an answer here. I will raise this topic on the Home Assistant forum.

@Alex2357
Copy link

Don't close this topic yet, if you can. Maybe someone knows how to do it and will give an answer here. I will raise this topic on the Home Assistant forum.

Please provide the link to HA forum. I also interested in addon.I'm currently trying to get around what cameras & NVR to use. After reading reviews for Swan I started to think I need go open source with a some Chinese NVR and cameras from Ali.

@fsaris
Copy link

fsaris commented Dec 24, 2022

Maybe you can get some inspiration (and help) from https://github.com/alexbelgium/hassio-addons. For example https://github.com/alexbelgium/hassio-addons/tree/master/zoneminder

Would be nice to have agent DVR as add-on for Home Assistant

@ljsquare
Copy link

ljsquare commented Jan 31, 2023

I’m trying to create a HA addon. The only puzzle I have is the persistent of the data (mounting volumes). And I can’t figure out how the settings in XML/config.xml, when they have changed, survive a recreation of the container.
can you explain this, @doitandbedone ?

@ljsquare
Copy link

ljsquare commented Feb 3, 2023

Forget my last comment 😉
I figured it out, I've a working addon for HA.
Add my repository in your addons store and you can install it.

@ispysoftware
Copy link
Collaborator

ispysoftware commented Feb 3, 2023

@ljsquare awesome - if you want to put together some text and screenshots i'll link to it from the website.

@DivanX10
Copy link
Author

DivanX10 commented Feb 3, 2023

Forget my last comment 😉 I figured it out, I've a working addon for HA. Add my repository in your addons store and you can install it.

I can't install your Agent DVR addon. You're doing something right now, right?
image

Do I understand correctly that you are using the share folder and there will be 3 folders there: Config, Media, Commands? If you restart the addon, the settings in Agent DVR will not be erased?

@DivanX10
Copy link
Author

DivanX10 commented Feb 3, 2023

Forget my last comment 😉 I figured it out, I've a working addon for HA. Add my repository in your addons store and you can install it.

I waited, updated the repositories, launched the AgentDVR addon and it doesn't start

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
/run/s6/basedir/scripts/rc.init: 67: /agent/run: not found
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

@ljsquare
Copy link

ljsquare commented Feb 3, 2023

Forget my last comment 😉 I figured it out, I've a working addon for HA. Add my repository in your addons store and you can install it.

I waited, updated the repositories, launched the AgentDVR addon and it doesn't start

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started /run/s6/basedir/scripts/rc.init: 67: /agent/run: not found s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

Correct, there was a little tiny bug in my script (windows/unix LF). That’s now corrected.
If you remove de addon and reinstall it, it will work (at least on my pc it did 😉)

@ljsquare
Copy link

ljsquare commented Feb 3, 2023

Forget my last comment 😉 I figured it out, I've a working addon for HA. Add my repository in your addons store and you can install it.

I can't install your Agent DVR addon. You're doing something right now, right? image

Do I understand correctly that you are using the share folder and there will be 3 folders there: Config, Media, Commands? If you restart the addon, the settings in Agent DVR will not be erased?

Yes/no, de important folders are Media (contains also the config) and Commands. I move them to de default data mount (every addons has this folder) and make a symbolic link to it (agent dvr wants it in its folder). Secondly I add the share mount, so you can use it to save eg. video’s or screenshot. The share folder is available to every service (for example smb addon).

@DivanX10
Copy link
Author

DivanX10 commented Feb 3, 2023

Forget my last comment 😉 I figured it out, I've a working addon for HA. Add my repository in your addons store and you can install it.

I can't install your Agent DVR addon. You're doing something right now, right? image
Do I understand correctly that you are using the share folder and there will be 3 folders there: Config, Media, Commands? If you restart the addon, the settings in Agent DVR will not be erased?

Yes/no, de important folders are Media (contains also the config) and Commands. I move them to de default data mount (every addons has this folder) and make a symbolic link to it (agent dvr wants it in its folder). Secondly I add the share mount, so you can use it to save eg. video’s or screenshot. The share folder is available to every service (for example smb addon).

I installed the AgentDVR addon from here. The settings do not fly off if you stop, start and restart the addon works fine. Icons and design can be taken from me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants