TheAgentK / tuya-mqtt

Nodejs-Script to combine tuyaapi and openhab via mqtt
MIT License
173 stars 80 forks source link

How i can install it in my OpenHab2 Docker Container ? #38

Closed xsasx closed 3 years ago

xsasx commented 3 years ago

I have OH2 in a docker container - how i can use your stuff in there ?

Trauma commented 3 years ago

Build a container with this repos, run it, connect it to your mqtt broker, done. I can share a docker file if you want.

xsasx commented 3 years ago

@Trauma that would be great ! If this than just the tuya-mqtt without OH2 thats what im searching for !

Trauma commented 3 years ago
FROM node

RUN git clone https://github.com/TheAgentK/tuya-mqtt.git && \
         cd tuya-mqtt && \
         npm install

WORKDIR /tuya-mqtt

COPY config.json .

ENV DEBUG=*

ENTRYPOINT ["node", "tuya-mqtt.js"]

In this example the config is loaded in the container, you could also mount your config in the container at runtime with a host bind volume. Once deployed and connected to the mqtt broker you can use any home automation platform.

tsightler commented 3 years ago

If I ever produce a 3.x version I will include a Dockerfile and perhaps even push an image to Docker Hub. It's a big if though.

member68 commented 3 years ago

So how about that docker? ;)

Trauma commented 3 years ago

You can use this fork, no docs but pretty straight forward... https://github.com/Trauma/tuya-mqtt