guino / BazzDoorbell

124 stars 22 forks source link

Lost RTSP stream, still can access the telnet #89

Closed sinclairfr closed 1 year ago

sinclairfr commented 1 year ago

Hello,

My hacked 8S doorbell was working fine for months but all of a sudden I lost RSTP feeds. The telnet access remains OK, the snap.cgi and mjpeg feeds are working fine. I cannot access it from the tuya app anymore, it shows as offline. RTSP : timeout.

I made sure that the SD card was not full and flushed the /mnt/mmc01/SDT folder.

It appears the doorbell now thinks we are in 1970.

Could a date problem cause all of the misfunctions? How is the date set in the first place? NTP server ? Thanks

guino commented 1 year ago

@sinclairfr the date is not an issue as many people use the device off-cloud, but it is an indication that it can’t connect to the tuya servers to sync the time — did you make any changes to router/firewall settings at home? If the device doesn’t sync the time with the tuya servers it won’t startup completely so it won’t show in the app and won’t enable rtsp unless you used an offline patch.

sinclairfr commented 1 year ago

Thanks for your prompt answer! It is strange because I did not touch anything. I've tried rebooting several times, but Nothing helps. Perhaps I can't access the tuya servers for some reason. I've tried setting up the date in telnet but it does not seem to hold it after a restart.

Perhaps I should hard code the date somewhere in the files just to give it a test...

guino commented 1 year ago

@sinclairfr Setting the date manually will not help in any way. Perhaps the device got removed from the tuya cloud and you may need to re-enroll it (you should not need to hack it again). If there’s an offline patch for your firmware that would allow RTSP to start without the need to connect to the tuya cloud (but the phone app won’t work).

The date on these devices is never persistent - it always relies on the internet to set the date and time (and that’s why the tuya application doesn’t start completely as it waits for a connection to set the date and time before starting).

sinclairfr commented 1 year ago

Thanks for the insights, much appreciated. 👍 I found a perfect copy of the working SD card and went ahead and boot with it. It boots, I have snap.cgi, mjpeg and all but no RTSP and 1970 for the date. This is definitely a problem stemming from elsewhere, the cloud probably... As mentioned in the discussion https://github.com/guino/BazzDoorbell/issues/77 , I used the #2 method to hack my doorbell camera. I will try to reset the camera to the original firmware so I can link it to the tuya cloud again as described in #2 Thanks for your help!

sinclairfr commented 1 year ago

For some reason the output of http://admin:056565099@ip/proc/self/root/etc/init.d/S90PPStrong is now the content of the file, just as if it was not executable :

image

sinclairfr commented 1 year ago

I was able to re-pair the device to the tuya app without changing any file, I just held the reset button while restarting while having the QR code ready on the tuya app. After many tries, it did work. I just redid the hack and everything seems to work, I have the correct date. The RTSP feed does not work but I'm guessing that's because the password has changed.

guino commented 1 year ago

@sinclairfr older devices don't usually have RTSP passwords -- some of the newer onvif devices having rtsp on rtsp://IP:8554//Streaming/Channels/101 need user admin and password admin (or may be set in tuya_config.json). It does seem like your issue was likely just something botched in the tuya servers where your device got removed from their cloud server and you had to re-enroll it.

sinclairfr commented 1 year ago

Indeed, that's the same conclusion I reached, my device must have gotten kicked out of the database. The RTSP does work now. Indeed, no password is required. A million thanks for your help.