Ok, I've spent a couple of hours knocking out a quick xAP broadcaster in Node.js, it's not quite finished, as I need to get it sending to the correct broadcast address, but am on it.
The plan is that you will be able to do something like this...
Code:
var rfxcom = require('rfxcom'),
xap = require('xap'),
rfxtrx = new rfxcom.RfxCom('/dev/ttyUSB0'),
transmitter = new xap.XAPTransmitter(
{class: 'Thermostat.status', source: 'rfxcom.WMR800.external', uid: 'FF000001'});
rfxtrx.on('th3', function (evt) {
transmitter.send('temp.current', {'temp': evt.temperature, 'units': 'C'});
// could log it to Cosm, or do something else here...
});
rfxtrx.initialise();
I'll hopefully get the last couple of issues ironed out over the weekend and make an initial release, but I have the message generation working, and transmitting, just need to see if I can determine the broadcast address automatically...