I have a plugin that used to work fine that someone abandoned (https://github.com/garrettwp/mios-universal-devices-isy-plugin)
The plugin connects to an ISY994i controller and enumerates the devices on that controller (this works on both vera and openLuup)
It then has a daemon that runs and listen for events coming from the ISY (i think it binds to the ISY for state changes but i am not sure and it may be the thing that sends data to thge ISY). On a real vera the ‘running’ status shows as running, in the device UI. But shows as disconnected (it needs to show connected to receive events) - it sends events to the ISY just fine (like set brightness level)
In openLuup it never shows as running.
In the openLuup i see the following over and over again.
2016-03-08 20:40:30.195 luup_log:4: ISYController: debug: Daemon is not running. Starting daemon.
2016-03-08 20:40:30.196 luup_log:4: ISYController: debug: Starting ISY Event Daemon.
This is accompanied by my root console on pi echoing:
/bin/sh: 0: Can’t open /etc/rc.common (edit: oh i see how that makes sense now seeing the script below! i created an empty rc.common and that got rid of the console error but not much else
I am running init in the context of root
I noticed looking in the L_ISYController1.lua that it as a pid file and initscript path (bear with me i am noob on linux)
local pidFile = "/var/run/isy_event_daemon.pid"
local initScriptPath = "/etc/init.d/isy_event_daemon"
when i looked at the isy_event_daemon file (i have no idea how this got created - i can only assume one of the LUA files for the device created this?) i see a complex script (i assume this is what is run when i click initialize in the device in altui)
I think that pluto.lzo is being called in the script to decompress the lzo’d lua file (this would be a problem as a)the file is not compressed because of getfiles and b)pluto-lzo is not a command on the pi on wheezy
[code]#!/bin/sh /etc/rc.common
Copyright (C) 2007 OpenWrt.org
START=80
PID_FILE=/var/run/isy_event_daemon.pid
PROXY_DAEMON=/tmp/isy_event_daemon.lua
start() {
if [ -f “$PID_FILE” ]; then
# May already be running.
PID=$(cat “$PID_FILE”)
if [ -d "/proc/$PID" ]; then
COMMAND=$(readlink "/proc/$PID/exe")
if [ "$COMMAND" = "/usr/bin/lua" ]; then
echo "Daemon is already running"
return 1
fi
fi
fi
# Find and decompress the proxy daemon Lua source.
if [ -f /etc/cmh-ludl/L_ISYEventDaemon.lua.lzo ]; then
PROXY_DAEMON_LZO=/etc/cmh-ludl/L_ISYEventDaemon.lua.lzo
elif [ -f /etc/cmh-lu/L_ISYEventDaemon.lua.lzo ]; then
PROXY_DAEMON_LZO=/etc/cmh-lu/L_ISYEventDaemon.lua.lzo
fi
if [ -n "$PROXY_DAEMON_LZO" ]; then
/usr/bin/pluto-lzo d "$PROXY_DAEMON_LZO" "$PROXY_DAEMON"
fi
# Close file descriptors.
for fd in /proc/self/fd/*; do
fd=${fd##*/}
case $fd in
0|1|2) ;;
*) eval "exec $fd<&-"
esac
done
# Run daemon.
/usr/bin/lua "$PROXY_DAEMON" </dev/null >/dev/null 2>&1 &
echo "$!" > "$PID_FILE"
}
stop() {
if [ -f “$PID_FILE” ]; then
PID=$(cat “$PID_FILE”)
if [ -d "/proc/$PID" ]; then
COMMAND=$(readlink "/proc/$PID/exe")
if [ "$COMMAND" = "/usr/bin/lua" ]; then
/bin/kill -KILL "$PID" && /bin/rm "$PID_FILE"
return 0
fi
fi
fi
echo "Daemon is not running"
return 1
}[/code]
–edit–
OIC the L_ISYEvent.Lua makes the script when the initialize action button in the UI is pressed.
So I guess i would need to modify the elseifs to have a condition on what to do if the file is already decompressed! oh my i amgoing to have to clone this in git
i am on the right direction?