danielolson13 / wink-mqtt

Enable local-control of a rooted Wink Hub with MQTT
MIT License
31 stars 9 forks source link

Install #1

Closed Mdleal closed 8 years ago

Mdleal commented 8 years ago

Can you point me in the right direction on how to get this working. I have it setup on the wink hub and can run it with node wink-mqtt.js but nothing happens. I have a mosquito working. I changed this line client = mqtt.connect('mqtt://192.168.0.6'); to point to it.

danielolson13 commented 8 years ago

One of two things could be happening. There was a change to the location of the database file on the wink with the latest update. I'll update the code shortly with the new location. Are you running 2.49.0 on your hub? Does your mqtt broker require a login? The other change I just made was to remove the client = mqtt.connect('mqtt://192.168.0.6') and replace it with mqtt.createClient(), so a username and password could be supplied to the MQTT connection.

danielolson13 commented 8 years ago

Code is updated with the new database location for 2.49

Mdleal commented 8 years ago

Yes, running 2.49 and no user/pass for mqtt. I'll grab the latest and let you know. Thank you.

Mdleal commented 8 years ago

Thanks, got it running with running 'node wink-mqtt.js' Should it start automatically on boot? How fast is ur's?

danielolson13 commented 8 years ago

You'll need to put a bash script in the /etc/init.d/ directory to launch at startup. Look at the other daemon scripts in there to get an idea. I can post what I use. Make sure you chmod 755 on the startup script so it's executable.

On Thu, Feb 18, 2016 at 11:21 AM Mdleal notifications@github.com wrote:

Thanks, got it running with running 'node wink-mqtt.js' Should it start automatically on boot? How fast is ur's?

— Reply to this email directly or view it on GitHub https://github.com/danielolson13/wink-mqtt/issues/1#issuecomment-185800019 .

Mdleal commented 8 years ago

cool, Thank you.