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

DahuaVTO2MQTT Outdated #27

Open
liamstears opened this issue Sep 6, 2024 · 4 comments
Open

DahuaVTO2MQTT Outdated #27

liamstears opened this issue Sep 6, 2024 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@liamstears
Copy link

I love the idea of being able to have DahuaVTO2MQTT as an add on but this is using an old outdated repo from elad, would it be possible to update and use the latest code from his gitlab? https://gitlab.com/elad.bar/DahuaVTO2MQTT

@troykelly troykelly self-assigned this Sep 6, 2024
@troykelly
Copy link
Owner

It's a great idea - it's just a matter of time I'm afraid.

@liamstears
Copy link
Author

It's a great idea - it's just a matter of time I'm afraid.

I'm guessing its not just a case of updating the dockerfile using parts from the dockerfile on his gitlab then?

```dockerfile
FROM python:3.12-alpine
MAINTAINER Elad Bar <[email protected]>

WORKDIR /app

COPY . ./

RUN apk update && \
    apk upgrade && \
    apk add curl && \
    pip install -r /app/requirements.txt

ENV DAHUA_VTO_HOST=vto-host
ENV DAHUA_VTO_USERNAME=Username
ENV DAHUA_VTO_PASSWORD=Password
ENV MQTT_BROKER_HOST=mqtt-host
ENV MQTT_BROKER_PORT=1883
ENV MQTT_BROKER_USERNAME=Username
ENV MQTT_BROKER_PASSWORD=Password
ENV MQTT_BROKER_TOPIC_PREFIX=DahuaVTO
ENV MQTT_BROKER_CLIENT_ID=DahuaVTO2MQTT
ENV EXPORTER_PORT=9563

RUN chmod +x /app/DahuaVTO.py
RUN echo "{ \"version\": \"$(date +'%Y.%m.%d').$(( $(date +"%s") - $(date -d "$today 0" "+%s") ))\" }" > /app/data/version.json

HEALTHCHECK --interval=30s --timeout=3s CMD wget --spider http://127.0.0.1:${EXPORTER_PORT}/metrics

EXPOSE ${EXPORTER_PORT}

ENTRYPOINT ["python3", "/app/DahuaVTO.py"]

@troykelly troykelly added the help wanted Extra attention is needed label Sep 6, 2024
@troykelly
Copy link
Owner

Oh noooo.... If only it were that simple :-D

In four years the container environment for addons has significantly changed. This will be a complete rework, from scratch.

Nothing like the work @elad-bar has done to create the code - but unless their container is built on the hassio addon's container base - there's a fair bit to do to get it to be a HA Addon.

@troykelly
Copy link
Owner

@liamstears sorry I wasn't thinking last night - have you seen https://github.com/myhomeiot/DahuaVTO ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants