V3.3 should be OK.
The attached file contains my Audrey driver in a Module called "ErgoAudrey.xdo". Import it, right-click
CustomDevices and create a
New > AudreyControl. It'll automatically create a new web-root, in Premise's web-server, called "Audrey". This is where the driver deposits WAV files and HTML pages that are to be rendered on a remote Audrey. Right-click
AudreyControl and select
New > Audrey and give it a descriptive "Name" (i.e. "Bedroom" or "Kitchen"). Enter the Audrey's IP address in the "HostName" property.
I've never documented this driver but, in a nutshell, it let's you:
- Define and control an individual Audrey or user-defined groups of Audreys
- Automatically creates an "All" group containing all Audreys
- Turn an Audrey's screen on/off
- Adjust volume
- Play sound effects
- Play a WAV file
- Speak text (Text-To-Speech)
- Display a URL
- Display a message (with/without an OK button or have the message clear itself after x seconds)
- Change the displayed channel
- Turn on/off/blink the Audrey's top/front LED lights
There are several items in the driver that are non-fucntional because I simply did not finish them:
- Contrast
Adjust the display contrast ... I couldn't get this work.
- WatchdogControl
Periodically poll the Audrey and determine its operating state. I lost interest and never completed this feature.
- Watchdog
Periodocally reboot the Audrey by toggling an Appliance module. In practice, my Audreys work reliably and I rarely need to reboot them.
Here's an example of how easy it is to turn on all Audreys. I use it in when my SecuritySystem is Disarmed.
Code:
Devices.CustomDevices.AudreyControl.Groups.All.Screen = true
This one turns on all Audreys. I use "SetValueForced" because an Audrey does not report its state. For example, if you turn off its screen, the driver will be unaware of it (and continue to report that the Audrey is still on). If "State" is already "true", Premise won't do anything if you say "State=true". However, SetValueForced will force the state-change.
Code:
if sysevent.newVal then
Devices.CustomDevices.AudreyControl.Groups.All.SetValueForced "Screen", true
end if
This one forces all Audreys to Channel 4 (Clock).
Code:
'
if sysevent.newVal then
Devices.CustomDevices.AudreyControl.Groups.All.SetValueForced "Channel", 4 ' Clock
end if
This one plays a WAV file (the song of a Hermit Thrush) to wake us up on weekdays. The WAV file must reside in the web-root folder (c:\Program Files\Premise\SYS\Web\audrey)
Code:
' Master Audrey
with Devices.CustomDevices.AudreyControl.Master
.MasterVolume = 40
.SoundFileName = "hermit"
.PlaySoundFile = true
end with
This one runs one minute after the bird song wakes us up and announces the current weather report, upcoming birthdays, tasks, appointments, etc. This content is generated by my
Newscaster module.
Code:
with Devices.CustomDevices.AudreyControl.Master
.ContentType = 8 ' XML text
.Content = Home.Newscaster.Newscast
.Speak = true
end with