NicolaiPetri / wiser2mqtt

Exposes Wiser power monitor metrics to MQTT
BSD 2-Clause "Simplified" License
8 stars 4 forks source link

Add support for Home Assistant auto configuration #3

Open NicolaiPetri opened 2 years ago

NicolaiPetri commented 2 years ago

Topic says it all..

Svenfabian commented 2 years ago

Hi again @NicolaiPetri . Maybe a stupid question, but I have RPI4 with HASSIO running. Is this repository made to be installed as a integration to the HASSIO or is the plan to have it running somewhere else on another platform, just to convert the data from Wiser to MQTT? And then to be read from the HASSIO...?

NicolaiPetri commented 2 years ago

Hi @Svenfabian , There are no stupid questions :) I run this docker image on my Raspberry PI 4 where I'm also running home assistant in a docker container. I have not used HASSIO, but if you can run custom containers, then it should work fine.

I use the following script to run it locally (with autostart after reboot) after I have built the image:

#!/bin/sh
docker run -d --name wiser2mqtt --restart=unless-stopped wiser2mqtt:stable
Svenfabian commented 2 years ago

Hi @NicolaiPetri So you have them running as two separate instances, but hosted on the same RPI? I don't know if it is possible to run different containers on my existing setup, when using HASSIO OS. Maybe it's better to run it on a Docker container on my QNAP NAS or on a separate RPI.

NicolaiPetri commented 2 years ago

Yes, I have multiple containers running on same RPI.. I currently have HomeAssistant, Wiser2Mqtt and ZWave2JS running in containers. Besides that I also have Zigbee2Mqtt running, but not yet in container. I have a 4GB Raspberry PI and it has plenty of memory free.

PMPoulsen commented 2 years ago

Hi @NicolaiPetri is there any chance that you will contribute this as a HACS component for home assistant? I am also running HASSIO OS on my NDroid2 and do not have the skills to run this as a docker component (if at all possible).

verydrunk commented 2 years ago

I have little to none experience with docker but I generated a key and tryed it. Now I put it in the development file with IP addresses and build the docker image. But here I'm stuck and I don't get any topics. Actually don't even know if I got it to work.

Can u make a quick guide on how to run this for us noobs?

Inrego commented 2 years ago

I think there's a lot of off-topic comments on this issue. I think it'd be best to create new issues with your questions. Anyway, it's not my repo, just my 2 cents.

To get back on topic: I'm working on a PR which will allow auto-discovery in HA.

Inrego commented 2 years ago

This has been implemented and merged into main branch. So this issue can be closed.