J.A.R.V.I.S inspired weather wake-up announcement for CastleOS

One of my favourite scenes from the awesome movie Iron Man is the scene where J.A.R.V.I.S, the AI assistant wakes up the house with the current weather. J.A.R.V.I.S also opens the blinds and turns on the lights.

Something as simple as the blinds opening and the weather being announced can be a real “wow” factor. Now that my CastleHUB has arrived, it’s time to put the power of CastleOS’s scripting system into play. It took a bit to get to this point (and special thanks to Eric Hillen), but today I’m proud to say I’ve finally got an automated weather announcement script working for CastleOS. (Next step: automating the blinds!)

Running via a recurring event, each morning the Sonos speaker in my bedroom will now play an announcement like…

Good morning. The current weather in Melbourne is Sunny at 18 degrees. Today is expected to be Sunny with a top of 31 and a low of 14.

To get things working nicely, I created an EXE file that takes command line arguments for the location and temperature unit. The EXE file then returns the text (with the weather) to CastleOS. CastleOS then sends that text via Text to Speech (TTS) to my Sonos speaker.

If you would like to use the console app for yourself, or if you’ve got CastleOS and want the same setup, all the code is available on Github.