Start NVR recording by HA

Is it possible to manage a NVR by HA rules? I do not want the NVR to record (and even to operate cameras, power saving) when we are at home, but I would like to start it, when leaving, using e.g. the signal from the alarm system. So when HA would get information about arming the alarm system, it would make the NVR to start recording or just to start operating (and recording any motion it detects).