Or this one:
https://github.com/DanalEstes/DuetMonitor
It is a fork of someone else's original work; I did change a fair amount, and can certainly answer questions about how it works.
At the same time. @Willl point about http://The.printer.local/rr_status?type=1 really is the whole thing... that will return something like:
{"status":"I","coords":{"axesHomed":[1,1,1],"wpl":1,"xyz":[0.000,0.000,615.910],"machine":[0.000,0.000,615.910],"extr":[0.0]},"speeds":{"requested":0.0,"top":0.0},"currentTool":0,"params":{"atxPower":0,"fanPercent":[0,100,0,0,0,0,0,0,0],"speedFactor":100.0,"extrFactors":[100.0],"babystep":0.000},"seq":0,"sensors":{"probeValue":0,"fanRPM":0},"temps":{"bed":{"current":20.1,"active":0.0,"standby":0.0,"state":0,"heater":0},"current":[20.1,19.5,2000.0,2000.0,2000.0,2000.0,2000.0,2000.0],"state":[0,2,0,0,0,0,0,0],"tools":{"active":[[0.0]],"standby":[[0.0]]},"extra":[{"name":"*MCU","temp":33.0}]},"time":1776413.0}
The "status" key gives you most of what you asked for in your first post. At the moment the above sample was requested, the printer was "I" - Idle. It could also be: P=Printing. S=Suspended (paused). And so forth.
You do need to poll it. For Home Auto, once a minute should be just fine.