Determining FSM states hint
I worked this out on the basis of the state representing the signal status, whether there is any (SIGNAL) or none (NULL).
ID represents the recognition of the ID Card, DAY represents the state of the time being not between 9 PM and 6 AM, and IN represents the status of the worker being inside.
Hope this helps... If it seems wrong, please correct me.

Errata: ID || (IN &amp;&amp; not(DAY)) should be replaced by not(ID) || (IN &amp;&amp; not(DAY))