Audrey Redux

123

Senior Member
drozwood90 mentioned the ability of a 3COM Audrey to support Adobe Flash and Dan indicated we should start a new topic ... so here we are.

I have several Audreys flashed with a modified version of Pete Flaherty's Mr. Audrey image. Audrey's web browser is woefully outdated and is unable to support many current web technologies. However, it is a useful, low-power touchscreen if you remember to dumb-down the HTML content. Support for Flash would be very interesting (albeit what vintage of Flash?).

My contribution to this topic is a demo video of AudreyControl, a driver I developed for Premise that lets me make Audrey smile, sing, and dance (OK, ... speak, play music, blink LED lamps, and display messages). I learned how to control an Audrey while using MisterHouse and applied that knowledge to creating a Premise driver. There are some features I plan to add that are noted in the video.

PS
I figured out how to add captions in ScreenToaster. Pretty neat.
 
123, what does the popup messages on your audreys? is it a repurposed caller id app or something else?
 
...what does the popup messages on your audreys?...

It is a custom web page. The Message section of the driver lets you specify the following properties:
  • Message Text
  • Text Color
  • Background Color
  • Text Attribute (Blink/NoBlink)
  • Show an "OK" acknowledgement button (Enable/Disable)
  • Timeout (Remove the message after X minutes)

Here's what the driver does:
  • A pre-built HTML Message template resides on the Premise server.
  • The template contains placeholders for the properties listed above.
  • The driver creates a copy of the template ("a Message page") and replaces the placeholders with the properties.
  • The Message page can be served by the Premise web server.
  • The driver "pushes" the Message page's URL to the Audrey where it is displayed.
  • The Message page is eventually purged.

"Pushing" involves the following:
  • The driver executes a Server-Side Include (SSI) on the Audrey and passes it the URL of the Message page.
  • The SSI on the Audrey opens the passed URL in its browser.
  • A similar technique is used to make Audrey speak. The URL of a WAV file is pushed to the Audrey.
 
"Pushing" involves the following:
  • The driver executes a Server-Side Include (SSI) on the Audrey and passes it the URL of the Message page.
  • The SSI on the Audrey opens the passed URL in its browser.
  • A similar technique is used to make Audrey speak. The URL of a WAV file is pushed to the Audrey.

gotcha. that's the same thing i do w/ my audrey tts app. can you post the contents of that shtml file? thanks.
 
The placeholders in the attached template file are delimited by braces like so: {blink}.

Here's the code that processes the template file. The key lines to look for are the ones that use the AddTextReplacement method. Apologies for the lack of comments; I never planned on sharing this driver (so few Premise users ... how many of them use Audreys?).

Code:
'
dim sMessage, sHTML
dim oFSO, oTS
dim iTimeout1, iTimeout2
dim sTag: sTag = "FONT"
dim sSpacer: sSpacer = ""
dim sOKButton: sOKButton = ""
dim iIndex: iIndex = Modules.ErgoAudrey.Variables.MessageIndex
dim oWeb, sName, sFolder

if sysevent.newval then
	if this.MessageText <> "" then
		if this.Class.Name = "Audrey" then
			sFolder = this.Parent.WebRootFolder
			sName = this.Parent.WebRootName
		else ' AudreyGroup
			sFolder = this.Parent.Parent.WebRootFolder
			sName = this.Parent.Parent.WebRootName
		end if
		
		sMessage = system.LoadFile("Plugins\AudreyMessage.htm")
		set tp = system.GetTemplateProcessor()

		if this.Blink then sTag = "BLINK"

		iTimeout1 = this.Timeout * 60000
		iTimeout2 = iTimeout1 + 10000

		if this.Timeout > 0 then
			tp.AddTextReplacement "Startup", "initialize()"
		else
			tp.AddTextReplacement "Startup", ""
		end if

		if this.OKButton then
			sOKButton = "<input type=button value=""  OK  "" onClick=""history.back()"">"
			sSpacer = "<BR>"
		end if
		
		tp.AddTextReplacement "MessageText", this.MessageText
		tp.AddTextReplacement "TextColor", hex(this.TextColor)
		tp.AddTextReplacement "BackgroundColor", hex(this.BackgroundColor)
		tp.AddTextReplacement "Blink", sTag
		tp.AddTextReplacement "Spacer", sSpacer
		tp.AddTextReplacement "OKButton", sOKButton
		tp.AddTextReplacement "Timeout1", iTimeOut1
		tp.AddTextReplacement "Timeout2", iTimeOut2
		sHTML = tp.Processtemplate(sMessage)
		
		set oFSO = CreateObject("Scripting.FileSystemObject")
		set oTS = oFSO.OpenTextFile(sFolder & "\Message" & iIndex & ".html", 2, True)
		oTS.WriteLine(sHTML)
		oTS.Close
		Modules.ErgoAudrey.Variables.MessageIndex = (iIndex + 1) mod 10 

		set oTS = nothing
		set oFSO = nothing
		set oWeb = Services.WebServer.Sites.Default_Web_Site

		sCmd = "http://" & this.Hostname & "/cgi-bin/channelURL?URL=http://" & _
		oWeb.HostAddress & ":" & oWeb.CurrentPort & _
		"/" & sName & "/Message" & iIndex & ".html"

		set oWeb = nothing
		debugout sCmd
		on error resume next
		sResponse = system.URLDownload(sCmd)

	else
		LogEvent "Message Error", 50, "Message text is missing.  There is nothing to show.", this
	end if
end if
 

Attachments

  • AudreyMessage.zip
    509 bytes · Views: 45
OK, looks like my version of the OS / Voyager can see At least Flash 4.0 files. I am downloading a newer Flash compiler, but I think it's not going to work unless I can save the files as OLDER files.

But, I made a quick interface that works quite well for clicking buttons to load specific webpages.

There are drawnbacks to this version of flash, as it's not very easy to manipulate, and there are features that do not exist that I would like to use (I found web examples of code for it, however it was for newer versions of flash...as in my version there is not a time.<anything>() function.

The positive, it loads a bit faster then the asp page I was using...but it's not apples to apples comparison until I can get a time function loaded into a piece of flash code.

Well, on to more experimenting!!

--Dan
 
i was looking for the shtml file on the audrey.
The shtml file is simple but it calls a shell script file (channelURL.sh) that relies on other resources in the Mr. Audrey image (see attached zip file). channelURL.sh's features are described here.

If you look at the code example above, about 80% of the way down I call channelURL using the following line:
Code:
		sCmd = "http://" & this.Hostname & "/cgi-bin/channelURL?URL=http://" & _
		oWeb.HostAddress & ":" & oWeb.CurrentPort & _
		"/" & sName & "/Message" & iIndex & ".html"
It ends up looking like:
http ://AudreyAddress/cgi-bin/channelURL?URL=http://PremiseServerAddress:80/audrey/Message1.html
 

Attachments

  • channelURL.zip
    765 bytes · Views: 29
Ok, so, here's what I have:

You CAN put later versions of flash on (made a few flash things with v5 and the "latest" from the website...thanks demos!).

The issue is...if the flash driver that's INSTALLED on the driver doesn't understand...it just won't do anything.

For instance...the main reason I wanted the flash, is to make a webclock. Well, I made one that works using "dynamic" text. Works well on my PC. As soon as it gets on the Audrey, it can't figure it out, so no text is populated.

So, now, I need to see if we can get a new Flash driver, OR supplement the time with a little java. That's actually the big issue for me. The clock!

Anywhoo...my current java code for the java clock just makes the audrey "freeze" for a few seconds...depending on WHEN you turn the Audrey back on. I associate it with that, because if I turn off the java clock, everything runs quite smooth.

So, basic things that I assume are in Maestro, as well as other flash stuff...button clicks to things like http links will work, "movies" will work (to a point). Basically, the basic things...non-dynamic text will work.

I think I'm going to see if I can get a newer flash player...not the newest...but just newer then what I have.

--Dan
 
All this chatter about the Audry reminded me that I picked one up a few months back and never did anything with it. If anyone is interested make me an offer.
 

Similar threads

Back
Top