How to us microflo?

83 views
Skip to first unread message

awgr...@gmail.com

unread,
Mar 11, 2017, 3:49:22 PM3/11/17
to Flow Based Programming
The documentation seems to be out of date: https://github.com/microflo/microflo

Does anyone know how to get microflo running?

Since there is no 0.40 release, I tried to use the master branch.
  1. cloned the github repo, fixup arduino-1.8.1 link.
  2. % npm install && npm test
  3. ino list-models # works
  4. make upload -p /dev/ttyACM1 GRAPH=examples/blink.fbp # works
In chrome, go to http://app.flowhub.io, login. No microflo runtime.

% node microflo.js runtime
crashes with:
Using serial baudrate with auto 9600
...
Using serial port: /dev/ttyACM1
MicroFlo runtime listening at 127.0.0.1:3569
Unknown/unsupported command received 0
events.js:160
      throw er; // Unhandled 'error' event
      ^

branch: master 2f216ac8a435dfba5a2894ecb0b34a77937f4b89 Mon Jan 16 01:52:19 2017 +0100
node: v6.10.0
Ubuntu 14.04, 64bit
arduino ide: 1.8.1
arduino: uno

Jon Nordby

unread,
Mar 16, 2017, 10:55:18 AM3/16/17
to Flow Based Programming
Hey,
yes unfortunately documentation is a bit outdated. Responses to your problems inline:


On Saturday, March 11, 2017 at 9:49:22 PM UTC+1, awgr...@gmail.com wrote:
The documentation seems to be out of date: https://github.com/microflo/microflo

Does anyone know how to get microflo running?

Since there is no 0.40 release, I tried to use the master branch.
  1. cloned the github repo, fixup arduino-1.8.1 link.
  2. % npm install && npm test
  3. ino list-models # works
  4. make upload -p /dev/ttyACM1 GRAPH=examples/blink.fbp # works
After this step, is the board LED blinking around 3 times per second?
 
In chrome, go to http://app.flowhub.io, login. No microflo runtime.
Yeah, that is expected, the Node.js program needs to run first. And then the runtime connection info must be added manually.

 

% node microflo.js runtime
crashes with:
Using serial baudrate with auto 9600
...
Using serial port: /dev/ttyACM1
MicroFlo runtime listening at 127.0.0.1:3569
Unknown/unsupported command received 0
events.js:160
      throw er; // Unhandled 'error' event
      ^


This is suprising. Can you run the following command instead, and check if it helps?

node microflo.js runtime --componentmap build/arduino/src/componentlib-map.json
 

awgr...@gmail.com

unread,
Mar 22, 2017, 6:00:30 PM3/22/17
to Flow Based Programming


On Thursday, March 16, 2017 at 10:55:18 AM UTC-4, Jon Nordby wrote:
Hey,
yes unfortunately documentation is a bit outdated. Responses to your problems inline:

On Saturday, March 11, 2017 at 9:49:22 PM UTC+1, awgr...@gmail.com wrote:
The documentation seems to be out of date: https://github.com/microflo/microflo

Does anyone know how to get microflo running?

Since there is no 0.40 release, I tried to use the master branch.
  1. cloned the github repo, fixup arduino-1.8.1 link.
  2. % npm install && npm test
  3. ino list-models # works
  4. make upload -p /dev/ttyACM1 GRAPH=examples/blink.fbp # works
After this step, is the board LED blinking around 3 times per second?

yes
 

% node microflo.js runtime
crashes with:
Using serial baudrate with auto 9600
...
Using serial port: /dev/ttyACM1
MicroFlo runtime listening at 127.0.0.1:3569
Unknown/unsupported command received 0
events.js:160
      throw er; // Unhandled 'error' event
      ^


This is suprising. Can you run the following command instead, and check if it helps?

node microflo.js runtime --componentmap build/arduino/src/componentlib-map.json

That seems to work. I can now see the runtime in the browser (via  http://app.flowhub.io).

Using serial port: /dev/ttyACM0

MicroFlo runtime listening at 127.0.0.1:3569


I had to use "new runtime register" and manually register, which gave me 2 runtimes. The refresh icon tends to make them disappear.

The terminal (where I ran "node microflog.js...") says this as soon as I open the project:
Unknown NoFlo UI command on protocol 'network': debug { graph: 'main', enable: true, secret: '' }
Unknown NoFlo UI command on protocol 'network': getstatus { graph: 'main', secret: '' }
Unknown NoFlo UI command on protocol 'network': debug { graph: 'main', enable: true, secret: '' }
Unknown NoFlo UI command on protocol 'network': debug { graph: 'main', enable: true, secret: '' }

The run button seems to work.

As soon as I start playing with the graph, e.g. click on an input, the node.js side crashes:

events.js:160
      throw er; // Unhandled 'error' event
      ^


Am I using the right branch of microflo? Master? commit 2f216ac8a435dfba5a2894ecb0b34a77937f4b89

Jon Nordby

unread,
Mar 22, 2017, 6:45:41 PM3/22/17
to flow-based-...@googlegroups.com
On 22 March 2017 at 23:00, <awgr...@gmail.com> wrote:
> The terminal (where I ran "node microflog.js...") says this as soon as I
> open the project:
> Unknown NoFlo UI command on protocol 'network': debug { graph: 'main',
> enable: true, secret: '' }
> Unknown NoFlo UI command on protocol 'network': getstatus { graph: 'main',
> secret: '' }
> Unknown NoFlo UI command on protocol 'network': debug { graph: 'main',
> enable: true, secret: '' }
> Unknown NoFlo UI command on protocol 'network': debug { graph: 'main',
> enable: true, secret: '' }
>
> The run button seems to work.
>
> As soon as I start playing with the graph, e.g. click on an input, the
> node.js side crashes:
> events.js:160
> throw er; // Unhandled 'error' event
> ^
>
> Am I using the right branch of microflo? Master? commit
> 2f216ac8a435dfba5a2894ecb0b34a77937f4b89

master is the right branch, but there has been several fixes since
that commit. Some which were for unhandled exceptions when clicking
edges in Flowhub. So there is a decent chance that doing a git pull to
get to commit 86f7bcd103b62be73ef6830bd936dece4d1b6641 / 0.3.47 will
fix your issue!


--
Jon Nordby - www.jonnor.com

awgr...@gmail.com

unread,
Mar 30, 2017, 3:13:39 PM3/30/17
to Flow Based Programming, jon...@gmail.com
crashes.

% git pull
    at 86f7bcd103b62be73ef6830bd936dece4d1b6641

% npm install && npm test
% make upload GRAPH=examples/blink.fbp
% node microflo.js runtime

Immediately crashes with:

Using serial port: /dev/ttyACM0
MicroFlo runtime listening at 127.0.0.1:3569
events.js:160
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'name' of null
    at responses.NodeAdded (/home/awgrover/dev/thirdparty/microflo-march11/lib/commandstream.coffee:308:66)
    at Object.fromCommand (/home/awgrover/dev/thirdparty/microflo-march11/lib/commandstream.coffee:500:14)
    at DeviceCommunication.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/lib/runtime.coffee:605:38)
    at emitOne (events.js:101:20)
    at DeviceCommunication.emit (events.js:188:7)
    at DeviceCommunication._handleCommandReceived (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:217:10)
    at DeviceCommunication._onCommandReceived (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:207:14)
    at CommandAccumulator.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:176:14)
    at emitOne (events.js:96:13)
    at CommandAccumulator.emit (events.js:188:7)
    at CommandAccumulator.onData (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:51:14)
    at SerialPort.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:174:26)
    at emitOne (events.js:96:13)
    at SerialPort.emit (events.js:188:7)
    at SerialPort.raw (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/parsers.js:7:13)
    at SerialPort._emitData (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/serialport.js:313:18)
    at SerialPort.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/serialport.js:293:14)
    at SerialPort.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/serialport.js:306:7)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:681:17)


% node microflo.js runtime --componentmap build/arduino/src/componentlib-map.json
now immediately crashes with:

Using serial port: /dev/ttyACM0
MicroFlo runtime listening at 127.0.0.1:3569
Unknown/unsupported command received 0

events.js:160
      throw er; // Unhandled 'error' event
      ^

TypeError: responseParser is not a function
    at Object.fromCommand (/home/awgrover/dev/thirdparty/microflo-march11/lib/commandstream.coffee:500:14)
    at DeviceCommunication.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/lib/runtime.coffee:605:38)
    at emitOne (events.js:101:20)
    at DeviceCommunication.emit (events.js:188:7)
    at DeviceCommunication._handleCommandReceived (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:217:10)
    at DeviceCommunication._onCommandReceived (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:207:14)
    at CommandAccumulator.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:176:14)
    at emitOne (events.js:96:13)
    at CommandAccumulator.emit (events.js:188:7)
    at CommandAccumulator.onData (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:51:14)
    at SerialPort.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/lib/devicecommunication.coffee:174:26)
    at emitOne (events.js:96:13)
    at SerialPort.emit (events.js:188:7)
    at SerialPort.raw (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/parsers.js:7:13)
    at SerialPort._emitData (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/serialport.js:313:18)
    at SerialPort.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/serialport.js:293:14)
    at SerialPort.<anonymous> (/home/awgrover/dev/thirdparty/microflo-march11/node_modules/serialport/lib/serialport.js:306:7)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:681:17)
Reply all
Reply to author
Forward
0 new messages