ledd daemon redeveloped in state machine