i´ve programmed a heating control with node.js, running on an arduino yun and it works just fine. A parent-process communicates with a server and forks a child-process, which is doing the control. I use fork(), the johnny-five lib and the firmata-sketch.
When i boot the Yun, ssh onto it and start the parent-process (server.js) with "node server.js", everything is working fine. Now i wanted to start the parent process with an init-script. The connection is established and the child-process is forked (i get an event if it is) but the board is closing afterwards and i cannot control the heater. These are my logs from the web-panel of the yun:
Nov 26 10:49:47 YunA user.info sysinit: Socket open
Nov 26 10:49:47 YunA user.info sysinit: Status: IO
Nov 26 10:49:47 YunA user.info sysinit: Status: IO
Nov 26 10:49:55 YunA user.info sysinit: 1448531395493 Connected /dev/ttyATH0
Nov 26 10:50:00 YunA user.info sysinit: 1448531400890 Repl Initialized
Nov 26 10:50:01 YunA user.info sysinit: >> Ready
Nov 26 10:50:01 YunA user.info sysinit: Parent got message: app started
Nov 26 10:50:01 YunA user.info sysinit: waiting...
Nov 26 10:50:01 YunA user.info sysinit: Status: IO
Nov 26 10:50:01 YunA user.info sysinit: 1448531401651 Board Closing.
Nov 26 10:50:02 YunA authpriv.info dropbear[1586]: Child connection from 192.168.0.100:60051
Nov 26 10:50:02 YunA authpriv.info dropbear[1586]: Exit before auth: Exited normally
Nov 26 10:50:05 YunA authpriv.info dropbear[1587]: Child connection from 192.168.0.100:60055
Nov 26 10:50:05 YunA authpriv.info dropbear[1587]: Exit before auth: Exited normally
The Status: IO are incoming events from the server. "app started" is sent via process.send() and the parent-process sends an event to the server which answes with another IO Status. The the board is closed and i can´t do anything.
Any ideas how to fix this? Thanks in advance :)