Hans was struggling with installing requests[security] the compile issues seemed to keep coming back like a hydra regrowing its heads.

To take a break he went to visit his friend Albert. Albert invited Hans in and disappeared into the kitchen to make some tea. "Make yourself at home" called Albert from the other room. Hans sat down on the sofa next to a grey cat. It looked friendly so Hans went to pet it. As soon as he moved the cat stretched out its paw and out shot the claws. Hans recoiled narrowly avoiding a serious injury. "Ah, I see you've met, Injector" said Albert as he came back in with a tray of tea and biscuits. Albert grabbed a throw from the back of the sofa and deftly wrapped the cat in it. The cat peered up at Albert and purred contently.

Photo Credit: "Sam cat" by Alan Barnet

When he returned home, Hans decided to work on the python code and roughed out the following high level design.

Steps

Get Location

Generate URL

Check URL

Parse Response

Map Weather Codes

He had considered using the users IP address to identify location but as his Google search page kept sending him to Google.pl and Microsoft thought his office was in the USA he was not so sure on this approach. Rather, he decided to read the value from a file and hopefully would later have some time to change the UI to allow the user to enter the location. If the users were supplying the location he'd need to ensure his code was protected from parameter injection by correctly wrapping and encoding the provided parameters.

Back into Arduino

So the next job on the coding is on the microcontroller side to parse this string returned from the API and move the servo and light the lights accordingly. The issue with the requests[security] install will also need to be resolved some how.