-
Notifications
You must be signed in to change notification settings - Fork 10
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
Can't get matt-dasher to run #5
Comments
What does your config file look like? |
`mqtt: buttons: |
As I copied the config I noticed the lack of spaces before the button Mac address. I put a couple in and ran with sudo and all seems happy! I can't test right now as I am not at home. |
No joy, I'm afraid. I get to "Waiting for dash buttons to be pressed" but the Pi I am running it on does not seem to be receiving any button presses. I know this to be the case, because I can run the following js script on another machine and get the "Button pushed!" message, but do not get it on the Pi (running 'sudo node code.js') Perhaps this is some kind permissions problem? But I am at a loss as to how to track it down ... code.js:
|
My button broadcasts on udp (as found by running node-dash-button's find_buttons, which reports
I have tried amending server.js, so that the appropriate set up line reads
Still no joy :( However, making the same amendment to the code.js above DOES allow my Pi to see the button! |
OK, I found the problem At it's core the issue is that my Dash button only uses udp. This, combined with the fact that the install managed to find an old version of your code meant that not only did server.js need to be replaced, but also an old and deprecated version of node-dash-button was installed in mqtt-dasher's node_modules. So the steps to me getting it to work were |
Hi
I have installed matt-dasher. but
(1) the install instructions have installed what I suspect to be the previous version of the code (I use a non-standard port and username/password, so this did not work). I manually copied the current code to server.js on my machine
(2) Even after this I cannot get matt-dasher to run. I get the following error:
info: Connecting to MQTT at mqtt://192.168.1.202
/usr/lib/node_modules/mqtt-dasher/server.js:95
winston.info('Listening for %d buttons', Object.keys(config.buttons).length);
^
TypeError: Cannot convert undefined or null to object
at setupButtons (/usr/lib/node_modules/mqtt-dasher/server.js:95:57)
at /usr/lib/node_modules/mqtt-dasher/node_modules/async/dist/async.js:3853:24
at replenish (/usr/lib/node_modules/mqtt-dasher/node_modules/async/dist/async.js:946:17)
at iterateeCallback (/usr/lib/node_modules/mqtt-dasher/node_modules/async/dist/async.js:931:17)
at /usr/lib/node_modules/mqtt-dasher/node_modules/async/dist/async.js:906:16
at /usr/lib/node_modules/mqtt-dasher/node_modules/async/dist/async.js:3858:13
at MqttClient. (/usr/lib/node_modules/mqtt-dasher/server.js:89:13)
at emitOne (events.js:101:20)
at MqttClient.emit (events.js:188:7)
at MqttClient._handleConnack (/usr/lib/node_modules/mqtt-dasher/node_modules/mqtt/lib/client.js:732:10)
Any suggestions? Thanks!
The text was updated successfully, but these errors were encountered: