1 (edited by degerrit 2014-12-02 14:59:22)

Topic: CGI: WidgetPlayer / setChannel not working on Chumby8?

I've got a Chumby One and a C8... and am integrating them into my DomotiGa (home automation) setup. Specifically, "in case event x happens, change the chumby to channel x via the built-in web server, script files are in /psp/cgi-bin/. This Wiki page "Chumby_tricks#Sending_events_to_the_Control_Panel" was very useful to get it up and running, it's fairly easy to do!

So this setup works wonderfully on the Chumby One, it even wakes from sleep/dark mode and sets a channel.
On the C8 - some basic things like setting brightness do work with the same setup.

However, changing the channel does NOT seem to work on the C8.

So here's the script with issues on the C8 (incidentally, the btplay only works occasionally - whereas on the C1 it works all the time):

echo "HTTP/1.1 200 ok"
echo "Content-type:  text/html"
echo ""
echo "<event type=\"WidgetPlayer\" value=\"setChannel\" comment=\"webcams\"/>" > /tmp/flashplayer.event
chumbyflashplayer.x -F1 > /dev/null 2>&1

btplay /usr/chumby/alarmtones/Klaxon.mp3 > /dev/null 2>&1

The flashplayer.event file is removed, so it is definitely processed (also proven by the fact that other commands do work).

Any pointers?

Re: CGI: WidgetPlayer / setChannel not working on Chumby8?

Not all of the Control Panels support all of the event types - the CC/C1/I3 Control Panel supports them all, but the C8 and I8 support only a subset.  My guess is that the event you're using is not supported (the event is simply consumed and discarded).

Re: CGI: WidgetPlayer / setChannel not working on Chumby8?

OK, thanks Duane. The wiki wasn't clear on that point, it implied that the whole "Sending events" section applied to all 4 pictured Chumbies. I can't create a wiki account right now (can't see any cat photos :-/) otherwise I'd clarify it.

Re: CGI: WidgetPlayer / setChannel not working on Chumby8?

Yeah, most of that wiki page was written before the C8 Control Panel was written. The authors of the C8 CP implemented some of the more common ones, but ended up not doing all of them.  I'll put it on my list of things to look into for the new year.

Re: CGI: WidgetPlayer / setChannel not working on Chumby8?

Just testing further: changing the widget by name or via next/previousWidget also doesn't work (same as with channels). I'm glad it works on the C1, for the C8: it's not a deal-breaker - it would just increase the possibilities :-P

For example:
Webcam motion detected -> show webcam widget for a couple of minutes
Water leak -> display a message (widget)
Electricity cost hits a certain round number (2EUR, 3EUR) -> display the cost (like an hourly chime!)

I'm starting to poke around a bit with ActionScript / FlashDevelop (after all these years on my TO-DO list). Maybe I'll end up making a little widget as front-end to my home automation.