Need your help to create an Agent DVR addon for Home Assistant
DivanX10 opened this issue ยท 12 comments
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
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
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
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
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.
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.
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
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 ?
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.
@ljsquare awesome - if you want to put together some text and screenshots i'll link to it from the website.
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?
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?
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
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 ๐)
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?
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).
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?
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