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

Aqualinkd not responding to MQTT commands #33

Closed
tcm0116 opened this issue Dec 26, 2018 · 4 comments
Closed

Aqualinkd not responding to MQTT commands #33

tcm0116 opened this issue Dec 26, 2018 · 4 comments

Comments

@tcm0116
Copy link
Contributor

tcm0116 commented Dec 26, 2018

I've got aqualinkd and mosquitto running on a RaspberryPi and I'm working on a SmartThings integration. However, it looks like aqualinkd is not subscribing to the "set" MQTT topics.

When I start aqualinkd, i see a message in the log indicating "Starting MQTT client to localhost:1883". However, based on net_services.c, I would expect to then see a "MQTT: Connection acknowledged" message, which appears to occur right before it subscribes to the topics. However, I never see the connection acknowledged message. aqualinkd does publish status to mosquitto, so it looks like the connection is good.

Any thoughts on why this may be occurring?

@tcm0116
Copy link
Contributor Author

tcm0116 commented Dec 26, 2018

Disregard. My SmartThings device handler wasn't properly sending the command to my proxy. It appears to be working as expected.

@tcm0116 tcm0116 closed this as completed Dec 26, 2018
@hollapm
Copy link

hollapm commented Aug 12, 2019

@tcm0116 Were you able to integrate with Smartthings, and if so could you share your device handler?

Thanks!

@napertivo
Copy link

I'd be interested in your device handler as well if you would like to share it.

Thanks

@tcm0116
Copy link
Contributor Author

tcm0116 commented Aug 19, 2019

I got the device handlers uploaded to GitHub. You should be able to add the repo to SmartThings and pull the device handlers down. Let me know if you have any issues.

https://github.com/tcm0116/smartthings-aqualink

You'll also need to install the smartthings-mqtt-proxy package via npm on a device on your network. This allows the device handlers and AqualinkD to interact.

https://www.npmjs.com/package/smartthings-mqtt-proxy

Here's the config file I use for the proxy:

---
mqtt:
    # Specify your MQTT Broker's hostname or IP address here
    host: localhost
    # Preface for the topics $PREFACE/$DEVICE_NAME/$PROPERTY
    preface: smartthings

    # Other optional settings from https://www.npmjs.com/package/mqtt#mqttclientstreambuilder-options
    # username: AzureDiamond
    # password: hunter2

    # Don't retain the values, as this can cause AqualinkD to receive old commands when it restarts
    retain: false

    # Port number to listen on
    port: 8080

Ideally, the system that the MQTT proxy is installed on has a static IP address because you need to provide the IP address, the port used by the proxy (8080 is the default), and the MAC address (used as a unique identifier) to the pool controller device handler.

One thing to keep in mind is that the pool controller handler is currently designed to work with my specific pool configuration, which is a pool/spa combo with a heater. If yours is different, we can work on adding some configuration options. I'd like to add the ability to control the pool light and the chlorine generator at some point.

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

No branches or pull requests

3 participants