roleoroleo / yi-hack-MStar

Custom firmware for Yi 1080p camera based on MStar platform
GNU General Public License v3.0
846 stars 112 forks source link

FTP to HASSIO #435

Closed dherkes closed 2 years ago

dherkes commented 2 years ago

I had been using the yi-hack-MStar successfully to upload clips taken by my camera to my HAS installation. All was well until I upgraded to 4.6, then the FTP just stopped working. Nothing changed on the HAS end. The user and password are the same.

roleoroleo commented 2 years ago

I changed the way it starts. From daemon mode to crontab. It should start every 10 minutes with 40 seconds offset.

Check the following steps:

  1. cat /var/spool/cron/crontabs/root
  2. ps | grep crond
dherkes commented 2 years ago

I also found I cannot ssh into the camera any longer. Since I turned telnet off, all I have is the web UI. Shall I just reinstall 4.5 and go from there? What settings does the ftp need on the web UI in 4.6 Thank you.

roleoroleo commented 2 years ago

Apart from the way it starts, the script is not changed from 4.5 to 4.6. You need to set the following fields: immagine

dherkes commented 2 years ago

Thank you very much. I'm going to do a reinstallation to get ssh back. Works great.

dherkes commented 2 years ago

I updated to 4.7. Everything works like a charm. Thank you.

olivluca commented 2 years ago

I changed the way it starts. From daemon mode to crontab. It should start every 10 minutes with 40 seconds offset.

Check the following steps:

1. cat /var/spool/cron/crontabs/root

2. ps | grep crond

May I ask why did you change it to cron instead of starting it?

roleoroleo commented 2 years ago

Because crond is already running. I think it is more efficient.

olivluca commented 2 years ago

Yes, but it will delay the sending of the files to the server up to a minute (or up to an hour in the last released version but I manually modified the crontab). The less time it takes to upload the file, the less time the eventual thieve has to see the camera and yank it. (in fact I think that uploading after the fact is already too late, maybe there is a better way).

roleoroleo commented 2 years ago

If you have this kind of need, it would probably be better to save the stream to a dvr.

olivluca commented 2 years ago

Currently the camera is connected via cellular data so I cannot stream continuosly (a local dvr is not an option since it could be stolen at the same time). I already setup mqtt to send a picture on motion start, maybe I could implement an option to send several pictures every n seconds during a motion event.

roleoroleo commented 2 years ago

Use startup.sh to run your custom progrmas. You could use ipc_notify command to do "something" when a motion occurs. Keep in mind that high res snapshot is cpu expensive, so slow...