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

problems connecting MQTT server #67

Closed
ronajon opened this issue Nov 20, 2023 · 6 comments
Closed

problems connecting MQTT server #67

ronajon opened this issue Nov 20, 2023 · 6 comments
Assignees

Comments

@ronajon
Copy link

ronajon commented Nov 20, 2023

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

@dlmcpaul
Copy link
Owner

Sorry try adding -e SPRING_PROFILES_ACTIVE=mqtt

@ronajon
Copy link
Author

ronajon commented Nov 20, 2023

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

@dlmcpaul
Copy link
Owner

Hmm, the mqqt resource is not being instantiated. I will look further.

@dlmcpaul
Copy link
Owner

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 :-(

@ronajon
Copy link
Author

ronajon commented Nov 21, 2023

got it working with the MQQT prefix :)

@ronajon ronajon closed this as completed Nov 21, 2023
@dlmcpaul
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants