
Showing posts with label xAP. Show all posts
Showing posts with label xAP. Show all posts
Thursday, July 9, 2009
Upgraded & Configured Thin Clients
I finally got my 512MB flash disks from Transcend and upgraded all 3 T5700s and bumped their RAM to 512MB as well. This gives me enough resources to install .NET 2.0 so I can run some of my xPL apps on it. The xFx xAP hub fatals so I have to run a different hub to run xAP apps. So far, I've loaded one up with xEKG, an alternate version of my xPL Gameport app and EventGhost.

Saturday, March 14, 2009
xEKG Monitors xPL and xAP Heartbeats
I just finished another application called xEKG. It monitors your xPL and xAP devices and informs you via osd messages that a device hasn't checked in. Read more about and download it from here.

Saturday, March 7, 2009
Announcing xScript
After some pains, I've completed my first C# application. It's called xScript. It's a free form scripting engine for xPL and xAP - no point and click - just a text file as input. You can use either vbscript, jscript, perl or python as your scripting language of choice. The zip file contains 4 sample scripts - xScript.js.sample is the most complete. Whichever language you decide to use, remove the .sample suffix from the script name. Valid scripting file names are xScript.js, xScript.vbs, xScript.py and xScript.pl. Make sure you have only one valid file name otherwise you may confuse yourself as xScript automatically picks a script file based on the first one it finds with a valid name. Finally, make sure you have installed the latest .NET frameworks by using Windows update or downloading directly from microsoft.com.
Download xScript here and let me know how it works out for you.
Download xScript here and let me know how it works out for you.

Wednesday, June 11, 2008
xPLAudreyTTS Update
I ran into a few more stumbling blocks when I discovered I can't just send xPL messages to non-existent xPL devices and have my app grab them. Apparently, the xPL hub doesn't forward packets for non-existent devices. That means I had to create xPL listeners for each Audrey I want to send TTS to, like Medianet does for each player. I eventually got it all sorted out last night and have started some testing of it. If all goes well, I'll post it up here.
In the meantime, I've been testing my xPL/xAP/starCOMUltra scripting app. I've converted all my Floorplan scripts and have turned it off a couple days ago. After a few problems in my script, I got a clean run with it overnight, no small feat considering my system pumped out 21 xAP messages/minute and about 10 xPL messages/minute overnight.
In the meantime, I've been testing my xPL/xAP/starCOMUltra scripting app. I've converted all my Floorplan scripts and have turned it off a couple days ago. After a few problems in my script, I got a clean run with it overnight, no small feat considering my system pumped out 21 xAP messages/minute and about 10 xPL messages/minute overnight.

Friday, June 6, 2008
Phasing out xAP Floorplan
I have been using xAP Floorplan for a while as my xPL and xAP scripting engine. It's an awesome package, but I don't really need all the extra auto-generated things and I have my own floorplan interface. I prefer to code up my own triggers rather than having to do it through a web interface. I also would rather program in JScript, but Floorplan only supports VBScript. Finally, I don't really want to bridge xPL to xAP - I'd rather just operate on the raw xPL messages. These are just my personal preferences. xAP Floorplan has been extremely stable & James has always been a responsive developer, and I highly recommend it for anyone interested in a scripting engine for xAP and xPL. I do still use many of his other apps.
I've been slowly working on what was xPL sCU. I've added a full scripting engine to it and support for xAP. I can trigger off of xAP or xPL events from within the same script file since I prefer to have everything in one gigantic script. Now I can code in my preferred JScript (although it will work with VBScript, PerlScript and PyScript too). And of course, I will have direct access to starCOMUltra. I've added all the hooks I need to app and I've been migrating Floorplan scripts over to my scripting engine. I'm about 40% through the conversion process. It's a little tedious but worth it to me.
I've been slowly working on what was xPL sCU. I've added a full scripting engine to it and support for xAP. I can trigger off of xAP or xPL events from within the same script file since I prefer to have everything in one gigantic script. Now I can code in my preferred JScript (although it will work with VBScript, PerlScript and PyScript too). And of course, I will have direct access to starCOMUltra. I've added all the hooks I need to app and I've been migrating Floorplan scripts over to my scripting engine. I'm about 40% through the conversion process. It's a little tedious but worth it to me.

Saturday, February 16, 2008
Video of xPL Gmail in Action
Here's a video of the xPL Gmail script I hacked together the other day. On the right of the screen is an RDP session to the HA server showing xPL Gmail running in a command prompt and the DCM message viewer below that. To the left is our HA GUI. I just added the capability of displaying osd.basic messages to our GUI.
A test email is sent to the monitored Gmail account. xPL Gmail polls for new mail periodically and when it finds a new message, it issues an osd.basic xPL message which is captured by the DCM logger. xAP Floorplan grabs OSD messages and dumps them into the HA MySQL database which our GUI pulls data from. The message gets displayed in the GUI for a short time before disappearing.
A test email is sent to the monitored Gmail account. xPL Gmail polls for new mail periodically and when it finds a new message, it issues an osd.basic xPL message which is captured by the DCM logger. xAP Floorplan grabs OSD messages and dumps them into the HA MySQL database which our GUI pulls data from. The message gets displayed in the GUI for a short time before disappearing.

Thursday, January 18, 2007
Checking Gmail with xAP Mail Monitor
xAP Mail Monitor can't authenticate over SSL, so by itself it can't check Gmail. Like the previous post, Stunnel can fix that. I changed my stunnel.conf file as follows:
I had to leave the POP3 port as 110 since you can't specify the port in Mail Monitor. Re-start Stunnel and start Mail Monitor. Add the account by clicking File > Properties and selecting "Mailbox and Logins" under "Mail Monitor Configuration." Add an address, setting email address to your_gmail_address@gmail.com, mail server as localhost, login username your_gmail_address and set your Gmail password. That's it.
This will also work with most other mail apps that need SSL support. Just fill out the POP settings as above.
[pop3s]
accept = 127.0.0.1:110
connect = pop.gmail.com:995
I had to leave the POP3 port as 110 since you can't specify the port in Mail Monitor. Re-start Stunnel and start Mail Monitor. Add the account by clicking File > Properties and selecting "Mailbox and Logins" under "Mail Monitor Configuration." Add an address, setting email address to your_gmail_address@gmail.com, mail server as localhost, login username your_gmail_address and set your Gmail password. That's it.
This will also work with most other mail apps that need SSL support. Just fill out the POP settings as above.
Sunday, November 5, 2006
xAPping my xPL stuff
I've been busy the past few days migrating my scripts from xPLHAL to xAP FLoorplan. Almost 3 years ago, I stumbled upon xPL while looking for an alternative server for our Rio Receivers. I've been using xPL heavily ever since with xPLHAL as my scripting engine. Lately, I've been finding lots of useful xAP applications and many of the xPL ones have become unsupported. Plus, lately I've been running into some crash/CPU utilization problems with xPLHAL. I started using Floorplan to do some scripting for xAP stuff and have slowly migrated some of my xPL stuff over. This weekend, I decided to just move it all over. No need to have 2 scripting engines bridging between the 2 protocols. Now it's just Floorplan.
I still use some xPL apps:
I still use some xPL apps:
- xPL Phone - There is no xAP equivalent for internal modems. there is only support for serial modems.
- xPL command line sender - The xAP one seems slow and this one is more intuitive to me. I'll just rely on floorplan to translate to xAP if I need to send xAP.
- xPL support in SlimServer - This is rock solid and I don't want swap it out yet. Plus, since I contributed some code changes in this to SlimServer, I have a pretty good understanding how it works and can tweak it if I want.
- xPL ActiveX object - I can instantiate this in starCOM so I don't have to call the command line sender ( xPL = new ActiveXObject("xPL.xPLCtl"); ). There is no xAP equivalent.
- MediaNet - It has built in xPL support that works great. I'm not giving up MediaNet.
- xPL TTS - I haven't played around the xAP one but this has been solid so don't need to switch it out.
Friday, November 3, 2006
xAP Ping script
I use xAP Ping to monitor my servers. I also have it monitor my network enabled amp. Since the amp sits in a closed cabinet, it can build up heat while it's running. To help with ventilation, I put a PC case fan into the cabinet and have that turn on when the amp is powered on. This amp doesn't have switched outlets on it, so I can't rely on that to power up the fan.
Create a Floorplan raw device for Ping:
Don't forget to create a device called ping_amp in xAP Ping.
' pingamp.txt
Sub Main()
ping=xap.getfromraw(rawmessage, "ping.results,ping_amp")
if GetGlobal("PingAmp") <> "Fail" and ping = "Fail" then
' this is my starCOM task to turn on X10 devices
ExecuteX10Appl "AmpFan",0
SetGlobal "PingAmp", ping
elseif GetGlobal("PingAmp") <> "Success" and ping = "Success" then
ExecuteX10Appl "AmpFan",1
SetGlobal "PingAmp", ping
end if
End Sub
Create a Floorplan raw device for Ping:
- alias = Amp
- source = mi4.ping.myserver
- class = ping.status
- section = ping.results
- item = ping_amp
- script to run on update = pingamp
Don't forget to create a device called ping_amp in xAP Ping.
Wednesday, October 25, 2006
Keeping xAP Jabber connected
One thing I've noticed is that xAP Jabber seems to get disconnected from the Y! network after not sending a message for a period of time. I fired up the xAP message viewer to see if there were any messages being sent when Jabber disconnected. I found that Jabber would send a User.Status message with the field xstatus set to nothing (as opposed to "Online" or "Logged off").
I wrote a small raw script for xAP Floorplan to send a message whenever it detects that status message:
I saved it as jabberstatus.txt. The next step was to trigger this every time xstatus changed. Following this Floorplan example, I created a raw device for Jabber in floorplan. I filled in the fields as follows:
I wrote a small raw script for xAP Floorplan to send a message whenever it detects that status message:
Sub Main()
status=xap.getfromraw(rawmessage, "User.Status,xstatus")
user=xap.getfromraw(rawmessage, "User.Status,username")
' replace w/ your user name
if user= "yahoo_house_xyz@yahoo.localhost" then
' save status in global in case you want to use it somewhere else
SetGlobal "IMHouse", status
if Len(status) < 2 then
xAPBody="line1=wake myself up ping"
' replace w/ your user name
xAPTarget="mi4.jabber.jabber:yahoo_house_xyz.yahoo.localhost"
' the following 3 lines need to be all 1 line
x=xap.SendxAP("display.text" & chr(10) & "{" & chr(10) &
xAPBody & chr(10) & "priority=1" & chr(10) & "}" &
chr(10),"message.display",xAPTarget)
end if
end if
end sub
I saved it as jabberstatus.txt. The next step was to trigger this every time xstatus changed. Following this Floorplan example, I created a raw device for Jabber in floorplan. I filled in the fields as follows:
- Alias = jabber status
- Source = mi4.jabber.jabber
- Class = Messenger.Event
- Section = User.Status
- Item = xstatus
- Script to run on update = jabberstatus
Tuesday, October 24, 2006
Using xAP Jabber with Yahoo! Messenger
xAP Jabber is another app from mi4.biz. It can send/receive instant messages to/from your IM client. Its native protocol is of course Jabber, but there are many Jabber servers that have transports to communicate with other IM platforms, like AIM, Yahoo and MSN. I use Yahoo! Messenger and this is how I set up xAP Jabber to talk to my IM client.
First thing I needed to do was to get a Jabber client so I could create a Jabber ID. I downloaded Exodus. Next, I needed to find a Jabber server with the Y! transport, so I looked over here. After clicking on a server and finding it supported Y!, I fired up Exodus and created a Jabber ID (I'll call it jabber_house_xyz). Now, this Jabber ID needs to have its own Y! ID to communicate with Y! users. So I created a Y! account (yahoo_house_xyz) for the Jabber ID to link to. I had to add it to the contact list of my real Y! ID (I'll call that ID my_real_idxyz) and then add my_real_idxyz to the contact list for yahoo_house_xyz. Next I needed to get the Y! transport up, so I followed this (except selecting Y!). I registered it with my new Y! id (yahoo_house_xyz).
After that, I added my_real_idxyz to the Exodus contact list, selecting Yahoo for contact type and entering the ID. Now, my Jabber account was set up and linked to Y! After exiting Exodus, I started xAP Jabber which brought up the settings file. I entered the login info for my Jabber account then followed the instructions to set up the rest of the app.
One thing I needed to do to get it to work with Y! was to configure xAP Jabber to send messages as chat messages instead of headline messages. (sending #set displaystyle yes) to the xAP client. For some reason, it dislikes headline messages.
Now, xAP Jabber is all set up to forward Message.Display messages to my IM client. It's also possible to issue commands over IM to my house to control things, etc. Each IM sent to xAP Jabber gets sent as a xAP message, which can be acted upon by a scripting engine (like xAP Floorplan). Actions can be performed and replies can be sent based on the commands xAP Jabber received.
First thing I needed to do was to get a Jabber client so I could create a Jabber ID. I downloaded Exodus. Next, I needed to find a Jabber server with the Y! transport, so I looked over here. After clicking on a server and finding it supported Y!, I fired up Exodus and created a Jabber ID (I'll call it jabber_house_xyz). Now, this Jabber ID needs to have its own Y! ID to communicate with Y! users. So I created a Y! account (yahoo_house_xyz) for the Jabber ID to link to. I had to add it to the contact list of my real Y! ID (I'll call that ID my_real_idxyz) and then add my_real_idxyz to the contact list for yahoo_house_xyz. Next I needed to get the Y! transport up, so I followed this (except selecting Y!). I registered it with my new Y! id (yahoo_house_xyz).
After that, I added my_real_idxyz to the Exodus contact list, selecting Yahoo for contact type and entering the ID. Now, my Jabber account was set up and linked to Y! After exiting Exodus, I started xAP Jabber which brought up the settings file. I entered the login info for my Jabber account then followed the instructions to set up the rest of the app.
One thing I needed to do to get it to work with Y! was to configure xAP Jabber to send messages as chat messages instead of headline messages. (sending #set displaystyle yes) to the xAP client. For some reason, it dislikes headline messages.
Now, xAP Jabber is all set up to forward Message.Display messages to my IM client. It's also possible to issue commands over IM to my house to control things, etc. Each IM sent to xAP Jabber gets sent as a xAP message, which can be acted upon by a scripting engine (like xAP Floorplan). Actions can be performed and replies can be sent based on the commands xAP Jabber received.
Monday, October 23, 2006
xAP Switchboard
This is an app I'm playing with at the moment. You can get it from mi4.biz. Using the Outlook Plugin from mi4.biz, Switchboard imports your contacts from Microsoft Outlook 2003. When it receives caller ID info, it will do a lookup in your Outlook database to identify the caller. It can then send this info to OSD (on screen display) or TTS (text to speech) devices/apps.
I have Outlook 2002, but I just found out that the Switchboard database is MS Access format. So from Outlook, select File > Import and Export > Export a File > Microsoft Access > Contacts. Then select a file name & click Next to create the Access database of the Outlook contacts. Next, run Access, open TelDir.mdb in the Switchboard directory. Then select File > Get External Data > Import and select the file you created from Outlook. You'll get a popup call Import Objects. Select Contacts and click OK. Now in the TelDir: Database window, double click Contacts which opens up your Outlook database. Select the first column, right click and select Insert Column. Adding this blank column helps match the Outlook database with the Switchboard database for an easy copy & paste. Now just highlight all rows with the data you want, right click, select Copy, open the XAP_Contacts database, scroll to the bottom, select the very last row, right click and paste in your contacts. Close the Contacts window. Now you can delete the Contacts database from the TelDir: Database window. Exit and that's it. You should have your Outlook contacts available.
Unfortunately, this doesn't lend itself to updating frequently, but at least it's an easier way to get the info into Switchboard if you don't have a version of Outlook other than 2003.
I have Outlook 2002, but I just found out that the Switchboard database is MS Access format. So from Outlook, select File > Import and Export > Export a File > Microsoft Access > Contacts. Then select a file name & click Next to create the Access database of the Outlook contacts. Next, run Access, open TelDir.mdb in the Switchboard directory. Then select File > Get External Data > Import and select the file you created from Outlook. You'll get a popup call Import Objects. Select Contacts and click OK. Now in the TelDir: Database window, double click Contacts which opens up your Outlook database. Select the first column, right click and select Insert Column. Adding this blank column helps match the Outlook database with the Switchboard database for an easy copy & paste. Now just highlight all rows with the data you want, right click, select Copy, open the XAP_Contacts database, scroll to the bottom, select the very last row, right click and paste in your contacts. Close the Contacts window. Now you can delete the Contacts database from the TelDir: Database window. Exit and that's it. You should have your Outlook contacts available.
Unfortunately, this doesn't lend itself to updating frequently, but at least it's an easier way to get the info into Switchboard if you don't have a version of Outlook other than 2003.
xAP
One of the many parts of my HA system is xAP. If you don't know what it is, there's a great write up on xAP over on Cocoontech. I've been playing around with numerous xAP applications lately and I'll talk about some of these later.
Two of my favorite xAP sites are:
mi4.biz
www.xapautomation.org
and there's also a xAP group over on yahoo groups.
Two of my favorite xAP sites are:
mi4.biz
www.xapautomation.org
and there's also a xAP group over on yahoo groups.
Subscribe to:
Posts (Atom)