For some time now I have been trying to obtain motion detection information from my old (and very bad software) but still working well Herospeed XVR recorder. After unsuccessful attempts with NodeRED, e-mail node or TCP, I decided to write my own integration. For now, it is in the testing phase, but the results are very satisfactory.
https://github.com/DominikWrobel/herospeed_xvr
In general, the assumption is very simple, in the recorder you first need to activate motion detection on the cameras and the ability to send e-mails when motion is detected. In the e-mail settings, enter Home Assistant’s IP as custom SMTP server, SMTP port (default 25 but it should work with other ports), encryption to NONE (it will not work with any other encryption!) and some username and password. Then we enter this data when configuring the integration. During configuration, we also need to specify how many cameras we have (the total number, not only those from which we want to obtain traffic information).
Then, the integration extracts the headers from the e-mails sent by the recorder and if the words “motion” and “channel” are included in them, it will assign the detection of motion to a given channel, and will skip the rest of the e-mails. After 20 seconds (or another value set during configuration), the information about motion detection will be reset. Generally, if the recorder sends e-mails and has these words in the headers, this integration should also work with recorders from other companies. It should work with Longse XVR and maybe others.
Feel free to test this and if you like it you can support me: