Why do scripts sometimes not run?
I have 2 plugboard scripts that run "sometimes" below is a top of my system so the plugboard call is there,
CPU: 1% usr 1% sys 0% nic 96% idle 0% io 0% irq 0% sirq
Load average: 0.24 0.21 0.09 1/23 168
PID PPID USER STAT VSZ %MEM %CPU COMMAND
154 1 root S 4176 30% 1% lua /etc_ro_fs/plugboard/plugboard.lua
166 112 root S 1740 12% 1% dropbear -p 22
168 167 root R 1788 13% 1% top
140 1 root S 1452 10% 0% /usr/bin/iServer -i br0
138 1 root S 1080 8% 0% /usr/bin/xap-livebox -s /dev/ttyS0 -i br0
134 1 root S 1028 7% 0% /usr/bin/xap-hub -i br0
144 1 root S 3976 28% 0% /usr/bin/kloned
150 1 root S 2620 19% 0% /usr/bin/xap-currentcost -s /dev/ttyUSB0 -i br0
167 166 root S 1812 13% 0% -ash
1 0 root S 1796 13% 0% init
99 1 root S 1792 13% 0% udhcpc -T 10 -i br0
112 1 root S 1668 12% 0% dropbear -p 22
164 140 root S 1452 10% 0% /usr/bin/iServer -i br0
137 1 root S 1080 8% 0% /usr/bin/xap-pachube -i br0
147 1 root S 1044 7% 0% /usr/bin/xap-serial -i br0
7 1 root SW 0 0% 0% [mtdblockd]
3 0 root SWN 0 0% 0% [ksoftirqd_CPU0]
8 1 root SW 0 0% 0% [khubd]
5 0 root SW 0 0% 0% [bdflush]
2 1 root SW 0 0% 0% [keventd]
#
so to me looks like they should run?
how do i debug this?
Dean
Yes a change of state is required in order for the script to move away from it's zero state when the script is initialised.
(As far as I can remember)
Allan
Just had a quick look in the script it says:
function gridfeed(frame)
-- This function should only be called when there is a change
-- from import to export or vice versa
So the gridfeed function is only called when the CC dev board detects a change of state on the LED on your meter.
PPS
cat /var/log/xap-plugboard.log should show whether the scripts are being started by the plugboard.
I've generated less than 4Kwh so far today. :-(
Alan the pv script you wrote i assume it needs to see a change on the grid before it will "kick in" grid being the feed or draw led (500w on cc dev board) part?
Dean