Raspberry Pi - Light an LED from Z-Wave device state

See also this. It might give you some ideas: