Add rules engine to automation module + rules