After a long break from writing software, I've started contributing to a home automation project by adding a squeezeboxserver client, written in Python.
I've got some basics working - on/off, play/pause/stop - but what I really want to do is be able to respond to events from squeeze server.
There's a listen/subscribe rpc method available:
curl -i -X POST -d '{"id":1,"method":"slim.request","params":["",["listen", "1"]]}' http://127.0.0.1:9000/jsonrpc.js
I'm stumped as to where to start to write the Python code, to do the following:
- Make the call and listen for any notifications
I've looked at Twisted; looks like it would help, but can't quite seem to figure out what's going on.