xAP enable Weather Display?

Brian,
Have you come across the xAP protocol yet? Would it be possible to xAP (ZAP) enable WD. This would be cool. WD broadcasts its data via UDP and a xAP enable listener (HomeSeer) could react to the changes.

the client/server uses multicast…and homeseer could easily use that data…just like the free weather display client viewer does

That’s true but someone just wrote an xAP plugin that sits and listens for xAP traffic and it creates the devices and events as well. :frowning: The mulitcast interface would have to be written for HS.

but i would still need to know the format even so, to make a UDP output compatible

I wrote a multicast plugin for homeseer more than a year ago!
/Ian

http://storrs.homeip.net:82/stat?location=Outside
http://storrs.homeip.net:82/stat?location=WMR968

and a UPS SNMP plugin too.
http://storrs.homeip.net:82/stat?location=UPS

and a MBM plugin too
http://storrs.homeip.net:82/stat?location=WBOT

user=guest
pw = guest

I’d like to suggest that this request be reconsidered.

The previous discussion has centered on how to get weather data into HomeSeer, and whether to use xAP or a plugin that has been written that works. But the point is this. Both WDs multicast and HomeSeer the application are all proprietry and unique to their respective manufacturers. Having support for HomeSeer doesnt help any non-HomeSeer users. xAP is a “glue” protocol, that enables many dissimilar items of equipment in the smart home to communicate.

If WD were xAP enabled, then all xAP applications instantly have access to WD data. There are many insular home automation systems that already have xAP connectors written for them, includinging HomeSeer, but also HomeVision, MisterHouse, Comfort, and several others with partial or developing support, and thats just on the PC. There is hardware support from a few (but growing) manufacturers, eg Barionet, and there are hardware gateways to, for example, Clipsal CBus. Were WD to have xAP enablement, then all these systems and many more can benefit from access to WD data.

Theres more though - there is a collection of xAP applications (“xAPplications”) that speak xAP natively. One is the xAP Desktop, which is effectively a XP replacement wallpaper that is smart. Have a look at http://www.mi4.biz/modules.php?name=News&file=article&sid=45 for a view of the desktop in action. Note its displaying weather data, amongst other things.

As WD only sends data, it only need be a xAP transmitter, and its easy to code a transmitter only. There are just two messages to send, one a heartbeat every minute, and the other is weather data. Both have pre-defined schemas, and there is a community of xAP devleopers who are very helpful and would welcome you, and I’m sure would welcome any schema and data improvments you can bring to the party.

Please (please) reconsider.

xAP home page: http://www.xapautomation.org/, there are yahoo discussion lists, see the contacts page for details, and you can search the mailing lists http://www.ukha-archive.com/cgi-bin/swish.cgi, select xAP and/or xAP_Dev.

I see they have an example…looks pretty easy,i.e its like XML…so i just need to send that text data output?
so, you can test this?
and i send it out via TCP/IP, i.,e the exisitng multicast?
with a certain IP address??

xap-header
{
v=12
hop=1
uid=FF400100
class=Weather.Report
source=mi4.weather.2097
}
Weather.Report
{
tempf=57.2
utc=00:00
tempc=14
icon=overcast
date=20040627
windm=5
windk=8
airpressure=1011
winddirc=SE
}
Time
{
time=03:28:50
sunset=21:26
tod=Night
sunrise=04:24
}

Err - in general, yes :smiley:

xAP uses UDP broadcasts, so either a genuine 255.255.255.255 or subnet broadcast works, directed to port 3639.

Your message came out fine, and heres xAP desktop showing it :slight_smile:

However, there are loose ends.
a) You need to get your own name for the source= stanza
b) Heartbeat
c) You dont need to send the TIME{} block
d) You need to make UID configurable
e) The last bit of the source, 2097, that should be configurable in case you have multiple weather stations
f) Join the xAP developers mailing list!

Thanks, this is looking fun.

Of course, I should warn you this is a slippery slope, next someone will be asking for WD to accept xAP data, for example from external sensors, or even have xAP as a source of data for the station…

ok, setting up a setup for xAP in WD now

uploading a test program for you to test
will let you know where to download from :slight_smile:

http://www.weather-display.com/downloadfiles/WeatherDxap.zip

see under setup, control panel, bottom right hand corner :slight_smile:
good luck!
(uses a similar format to that test program (but the wind direciton is in degrees at this stage and the icon is actualy the current conditions report text)

where can i find the xap wall papper so i can test?
(and did what you did>?)

To get xAP on your machine, the first really useful bit is the xAP GUI hub, 'cos (a) its a hub so you can have multiple xAPplications on a single PC, and (b) its got a message viewer, so you can see what is going on, and (c) its fairly Nazi about message syntax so obvious errors are trapped. Get from http://www.xapframework.net/modules.php?name=Sections&op=viewarticle&artid=7

Note this needs the MS .Net framework 1.1

At this stage configure WD for a source name of mi4.weather.1 (which isnt strictly legal, but it’ll do for testing), press test, and a message appears in the xAP gui. Right click/view and you can see it reformatted.

So far so good.

Now download xAP desktop, from http://wiki.xapautomation.org/tiki-index.php?page=xAP+Desktop, and install. When it starts it’ll ask about what window it should install, choose more weather. This will give you an annoying window which dissapears when you mouse close to it. Next time you press test, data will appear in it.

Cool.

Now you need a heartbeat every minute, and to send out a weather.report packet each time anything changes.

Yay.

Of course, I now need to bug the other end of the chain (or maybe read more documentation), 'cos displaying times on the desktop in UTC is not good when you are in NZ…

Thanks - so far - this is fabulous!

Edit - oh yeah, there shouldn’t be spaces before the values, eg “windm= 3” should be “windm=3”

The reason you have to set your xAP sender to mi4 is that in display01/settings.txt is has lines like

xAPVar=icon,mi4.weather.%%icon%%,weather.report,weather.report,icon,200,20

do a global replace in the file of mi4.weather to *.weather and then it’ll accept any name as a weather source.

so you mean its working straight off the bat?
i have not got it to save the settings yet, or do the data auto,…thats next
i am pleased its working straight away! 8)
i am downloading the needed files now (inluding the .net sdk)

Its working - ish :slight_smile:

You dont need the SDK, just the runtime… I said framework - sorry…

i am running windows 2000, and rather than having to update from the windows update site, and potentialy upset my stable install, I am downloading the sdk to get it…i didnt see the runtime…oh well…(its a big download too)…only 5 minutes to go…

greg ,are you able to get this working?

something not right
when i run the hubgui.exe
it get a program called dw20.exe using heaps on CPU resources,and then it crashes…

Got some more info:

This capture is for English units. Each can be configured for metric or english. I did not see the need to send both sets of data in the same xap message since they are only numeric transformations between the two. All three source feeds are designed for subsequent processing by a computer so it is not likely they will change much. I have seen MSNBC add a few precipitation probability fields about 2 years ago, but this is the only change that I have experienced. I had started with parsing a web page from Weather.com before I knew to look for better sources. It was a very slow download and it changed as the advertising layouts changed. These three feeds are only a few hundred bytes each with WeatherXML being the most verbose because it is in the XML format.

xap-header
{
v=12
hop=1
uid=FF006700
class=Weather.Report
source=mcs.WeatherMSNBC.MCS5
}
Weather.Report
{
humidity=75
uvindex=0
localdate=2004-10-11
feelf=60
tempf=60
forecastday=30;30;34;28;28
icon=26
windm=6
forecastdate=10/12/2004;10/13/2004;10/14/2004;10/15/2004;10/16/2004
date=2004-10-12
localtime=22:53
visibilitym=10.00
cloud=Cloudy
city=Issaquah
country=WA
utc=02:53
forecastlowtempf=51;51;48;48;48
forecastnight=29;33;29;27;29
winddirc=NW
forecastprecipitation=10;10;20;0;20
airpressurei=30.29
forecasthightempf=68;68;70;64;58
}

xap-header
{
v=12
hop=1
uid=FF001700
class=Weather.Report
source=mcs.WeatherXML.MCS5
}
Weather.Report
{
humidity=84
uvindex=0
feelf=65
tempf=65
forecastday=30;39;12;30;30;11
icon=28
windm=4
forecastdate=2004-06-11 0:00;2004-06-12 0:00;2004-06-13 0:00;2004-06-14 0:00;2004-06-15 0:00;2004-06-16 0:00
date=
localtime=22:00
visibilitym=999
cloud=Mostly Cloudy
city=
country=
utc=5:00
forecastlowtempf=66;58;56;56;58;58
forecastprecipitation=20;50;70;30;10;60
forecastnight=47;11;11;29;45;11
winddirc=SE
winddird=SE
airpressurei=29.53
forecasthightempf=81;75;68;73;78;76
}

xap-header
{
v=12
hop=1
uid=FF002700
class=Weather.Report
source=mcs.WeatherAWS.MCS5
}
Weather.Report
{
humidity=88
localdate=2004-10-11
feelf=54
hightempf=68
tempf=54
dewf=51
windm=0
winddird=N
airpressuretrend=s
date=2004-10-12
localtime=22:28
airpressurei=30.21
country=WA
utc=05:28
gustm=7
winddirc=8
lowtempf=44
city=Kent
rainratei=0.00
raini=0.00
}

dw20.exe - google says is the MS office error reporting things. Eek!

All I did to install xAP was to put all the files unzipped into a directory tree, and it worked? There is a non-gui hub, see if that works??

Good news!
i have it working !
see here (see the floating desktop weather window,…quite neat realy

I had to install the from this URL the .net framework:
http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en

it should be easy enough for wd to accpet data from other sources

i have it working great now
i discoverd the space is needed for windspeed , if the speed is less than 10
wind direction arrow works now too
and it works auto now too, even at start up,and it keeps the settings.,…just turn the switch on , on the xAp page
in a new 10.18b version
which you can download from here for now:
http://www.tokaanuskihire.co.nz/setup.exe
for now
or
http://www.tokaanuskihire.co.nz/WeatherD.zip

while the main WD web server is down

Yay :slight_smile:

Still nead a heartbeat, send this at startup and every 60 seconds thereafter.

xap-hbeat
{
v=12
hop=1
uid=
class=xap-hbeat.alive
source=<configured_source>
interval=60
}

And you need your own manufacuter ID, not MI4

Join Yahoo on osa Yahoon tuotemerkkejä. and ask.

Looking good though, even though xAP desktop weather puts the wind icon the wrong way round - I’ll get that tackled though