hobbyquaker / mqtt-dmx-sequencer

Control DMX devices via Art-Net by MQTT. Includes a simple sequencer. πŸ’‘πŸŽ¬
MIT License
23 stars 5 forks source link

Broker not using the sequencer? #1

Closed TheFonix closed 7 years ago

TheFonix commented 7 years ago

Hey @hobbyquaker So if i lay out what I'm trying to do, I have OLA a DMX node running ARTNET and I'm trying to get a light turn on from my iPhone to the OLA Artnet node, Through homebridge sending MQTT to your mitt-dmx-sequencer.

When ever i try to run mqtt-dmx-sequencer i just get this back:

artnet.data[0] = [];
               ^

TypeError: Cannot set property '0' of undefined
    at Object.<anonymous> (/usr/local/lib/node_modules/mqtt-dmx-sequencer/index.js:22:16)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

I have had no issues getting the connection between homebridge and the MQTT broker but i can't for the life of me figure out how this sequencer is meant to work, is there an npm start for it or something like that, because right now its just sitting around with all of its config in order looking pretty, any help would be amazing!

Im currently running Ubuntu 16.04 Server LTS with node version v7.4.0 and NPM version 4.1.2. I have check through MQTT.fx that the information is getting to the broker and it is, its just an issue between the broker and the sequencer.

TheFonix commented 7 years ago

I've found that when removing artnet.data[0] = []; and data: artnet.data[0], i can start the application without any issues but i cant seem to forward any on/off data from the MQTT broker without those parameters

TheFonix commented 7 years ago

Update! when removing artnet.data[0] = []; and data: artnet.data[0], trying to stop any sequence no longer works, its almost as if the sequencer see's nothing beyond the scene or sequence name

hobbyquaker commented 7 years ago

Oh - I think I broke this with that change here: https://github.com/hobbyquaker/artnet/commit/1a8065cafe54fc8ad17ebef73d256ced99ae3623 Never realized it until now, sorry. A quick workaround: go to the mqtt-dmx-sequencer directory and do npm install artnet@0.0.3. I will fix this asap, this will need changes in the underlying artnet lib... Sorry for inconvenience

TheFonix commented 7 years ago

No worries thanks for the reply! Love your work by the way!

TheFonix commented 7 years ago

npm install artnet@0.0.3 did not fix the issue sadly it still gives me the error, but i receive this error while trying to run the command

root@MQTT-DMX-B:/usr/local/lib/node_modules/mqtt-dmx-sequencer# npm install artnet@0.0.3
npm ERR! Linux 4.4.0-62-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "artnet@0.0.3"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2

npm ERR! Cannot read property 'target' of null
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/local/lib/node_modules/mqtt-dmx-sequencer/npm-debug.log

EDIT: after updating both node and NPM it now simply throws

mqtt-dmx-sequencer@1.0.0 /usr/local/lib/node_modules/mqtt-dmx-sequencer
└── artnet@0.0.3  invalid
hobbyquaker commented 7 years ago

hmm can you try again pls with artnet@1.0.2 ?

TheFonix commented 7 years ago

That succeeds but then brings back the original error

TypeError: Cannot set property '0' of undefined
hobbyquaker commented 7 years ago

hmm.. Will have to find some more time for this, can't promise, but I will try to do this tomorrow evening.

TheFonix commented 7 years ago

That would be amazing!

TheFonix commented 7 years ago

if its of any help, after clearing everything out and starting again with an updated version node and npm and reinstalling the mqtt-dmx-sequencer package and the art net package i now get

var artnet = require('artnet')({
                              ^

TypeError: require(...) is not a function
    at Object.<anonymous> (/usr/lib/node_modules/mqtt-dmx-sequencer/index.js:8:31)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3
hobbyquaker commented 7 years ago

Just published v1.1.0 - this should fix this issue.

TheFonix commented 7 years ago

Yep that seems to have fixed everything! Thanks