Hi Gary,
I did a presentation last week that got some hype (thanks again, all of you):
I've built a MQTT broker just to do that kind of project, It may help you out.
There is a NetworkButton example in the site, and a thermostat example
in the slides. It's really easy, there is also some arduino code as example.
Anyway, here is the recipe.
On your Arduino:
- setup the PubSubClient with qest.me as a server.
- provide a callback to handle the message coming to Arduino.
- subscribe to the topic "gary/first-device".
On your webpage:
Let me know if you have problems :).
Cheers,
Matteo