Lately I became a fan of MQTT because there are endless possibilities (using it with the door switch would be just one) and it’s fun to play with. Creating messages with node is as simple as with Python.
var mqtt = require('mqtt');
var time = require('time');
var now = new time.Date();
var broker = 'localhost';
var port = 1883;
var message = now.toString() + ' - This is the message'
var topic = 'test/mqtt'
var client = mqtt.createClient(port, broker);
Not much magic here…mqttjs is well documented.