I'm using a mega 2560 as a web server with inputs and outputs connected to various sensors and devices around the home.
I want the web client (PC or wifi connected device) to play a sound in response to an input event happening on the web server.
I've searched quite a bit, including HTML CSS, Ajax, Java etc. but haven't been able to find much info on how to do this.
Could anyone point me in the right direction?
Thanks,
Drew
If all you want is to push notifications to your own devices then perhaps a service like pushbullet or prowl might be easiest. In this model your arduino posts a message to an external website in response to local events and that website sends messages to your computer or phone.
If you are determined to do it all in-house using HTML then you will have to
- arrange for your page to auto-refresh frequently (search "html meta refresh")
- insert audio tags in your html as required (search "play audio in browser"). Be warned this is far from trivial, especially if you want to target more than one browser/OS combination as virtually all treat audio completely differently.