Closed ronajon closed 11 months ago
Sorry try adding -e SPRING_PROFILES_ACTIVE=mqtt
i get an error with the above settings
2023-11-21T00:14:36.175+01:00 ERROR 7 --- [ scheduling-1] com.hz.services.OutputManager : Failed to collect data from Enphase Controller - Error creating bean with name 'mqttService' defined in class path resource [com/hz/services/MqttService.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'mqttClient' defined in class path resource [com/hz/configuration/MqttConfig.class]: Failed to instantiate [org.eclipse.paho.client.mqttv3.IMqttClient]: Factory method 'mqttClient' threw exception with message: Please configure the mqtt settings
Hmm, the mqqt resource is not being instantiated. I will look further.
Ok, I seem to have mispelt the configuration properties
try
docker run --rm -e TZ=Europe/Amsterdam -e ENVOY_BEARER_TOKEN=xxx -e ENVOY_CONTROLLER_HOST=192.168.110.80 -e ENVOY_MQQTRESOURCE_HOST=192.168.110.250 -e ENVOY_MQQTRESOURCE_PORT=1883 -e ENVOY_MQQTRESOURCE_TOPIC=enphase -e SPRING_PROFILES_ACTIVE=mqtt -p 8080:8080 dlmcpaul/enphasecollector:latest
The properties are prefixed with MQQT instead of MQTT. At least I got the profile prefix right :-(
got it working with the MQQT prefix :)
Ah good. I will likely have to fix the spelling for the next release so keep an eye out unless I can alias them or something.
Let me know how it goes using mqtt and I will update the documentation as well.
i've tried the docker commandline and add parameters for connection to a MQTT server, unfortunately in my MQTT server i don't see a new topic appearing ?
docker run --rm -e TZ=Europe/Amsterdam \ -e ENVOY_BEARER_TOKEN=xxx \ -e ENVOY_CONTROLLER_HOST=192.168.110.80 \ -e ENVOY_MQTTRESOURCE_HOST=192.168.110.250 \ -e ENVOY_MQTTRESOURCE_PORT=1883 \ -e ENVOY_MQTTRESOURCE_TOPIC=enphase \ -p 8080:8080 \ dlmcpaul/enphasecollector:latest