TheMrBooyah / hassio-dirigera-client

4 stars 0 forks source link

How to make the configuration #12

Closed spieter closed 1 year ago

spieter commented 1 year ago

How do i make the configuration for a different mqtt host. Where do i put the correct server name/ip ?

TheMrBooyah commented 1 year ago

In the configuration screen you can change the mqtt-host and mqtt-port values to where your MQTT is running. The default values are for usage with the MQTT server Home assistant provides.

spieter commented 1 year ago

I am not using home assistant, but use openhab. And i want to try and use this to publish the state to MQTT and then have openhab use that. Thank you for your reponse.

I found out i could start dirigera-client-mqtt with parameters to add my config.

java -jar dirigera-client-mqtt.jar --dirigera.hostname="dirigera-name-or-ip" --dirigera.port=8443 --dirigera.mqtt.hostname="mqtt-host" --dirigera.mqtt.port=1883

i even created a docker (Container on my QNAP) to run this.

sudo docker create \ --name=dirigera \ --interactive \ --tty \ --restart unless-stopped \ -e "LANG=en_US.UTF-8" \ -e "LANGUAGE=en_US:en" \ -e "LC_ALL=en_US.UTF-8" \ -e "TZ=Etc/UTC" \ -e "JAVA_HOME=/usr/lib/jvm/zulu17" \ -v "/share/CACHEDEV1_DATA/Container/Dirigera-Api/:/etc/dirigera-api/" \ azul/zulu-openjdk:17 \ /bin/sh -c /etc/dirigera-api/dirigera-docker.sh

diriger-docker.sh contains the following: cd /etc/dirigera-api/ java -jar /etc/dirigera-api/dirigera-client-mqtt.jar --dirigera.hostname="dirigera-name-or-ip" --dirigera.port=8443 --dirigera.mqtt.hostname="mqtt-host" --dirigera.mqtt.port=1883