sonoff-hack icon indicating copy to clipboard operation
sonoff-hack copied to clipboard

changing password changes only http password, but not rtsp

Open avg-I opened this issue 2 years ago • 15 comments

First, I could not get RTSP working at all until I created "RTSP Link" via eWeLink. I used a default password there.

Later, I used sonoff-hack web interface to disable the cloud. I also changed password. Now the http access requires the new password. But RTSP still requires the old password created via eWeLink. The new password results in 401 Unauthorized.

Sonoff-hack version is 0.1.0. Base firmware on this camera is V2524.1.276build20201103. It's the same as in issue #49 and I had to use the binary from that issue to get PTZ working.

So, I guess that there can be more incompatibilities between sonoff-hack and that version of the base firmware .

avg-I avatar Aug 25 '21 06:08 avg-I

I also changed password. Now the http access requires the new password. But RTSP still requires the old password created via eWeLink. The new password results in 401 Unauthorized.

The RTSP service should accept both passwords.

Sonoff-hack version is 0.1.0. Base firmware on this camera is V2524.1.276build20201103. It's the same as in issue #49 and I had to use the binary from that issue to get PTZ working.

I don't remember if I commited the code form https://github.com/roleoroleo/sonoff-hack/issues/49 I will check it.

roleoroleo avatar Aug 25 '21 07:08 roleoroleo

I am having the same symptoms. I was able to get the hack loaded but rtsp does not work at all until creating the ewelink link. In my case however, the rtsp stream dies after about one minute. Only rebooting the camera will restore it. I will post my build tomorrow for reference.

willbrim avatar Aug 25 '21 09:08 willbrim

It's normal that the RTSP stream is not available until you enable it in the app. I will add this note to the readme.

roleoroleo avatar Aug 25 '21 11:08 roleoroleo

The RTSP service should accept both passwords.

Unfortunately it accepts only the password that was originally set via the app. The new password is rejected.

avg-I avatar Aug 25 '21 11:08 avg-I

Which user are you using?

roleoroleo avatar Aug 25 '21 15:08 roleoroleo

User is "rtsp". This user is configured in both the official app and in the sonoff-hack web interface. Should I try using a different user for sonoff-hack? Let me do that.

avg-I avatar Aug 25 '21 15:08 avg-I

Yes, selecting a different user allows RTSP access with both old-user:old-password and new-user:new-password.

avg-I avatar Aug 25 '21 15:08 avg-I

Although, I am not actually thrilled that old-user:old-password is still allowed access...

avg-I avatar Aug 25 '21 15:08 avg-I

Yes, I can understand. I don't know what happens if I remove the original user from the table. Do you want to try?

/mnt/mmc/sonoff-hack/bin/sqlite3 /mnt/mtd/db/ipcsys.db 'delete from t_user where C_UserName="rtsp";'

roleoroleo avatar Aug 26 '21 09:08 roleoroleo

Thank you! Everything seems to be working fine after making that change and rebooting the camera and everything is still okay. Also, even if I re-enable cloud access and create the rtsp link in the app again the 'rtsp' user is not restored and so cannot be used for access. The account added via the hack keeps working.

I also checked t_user table and found another account with admin:12345678. I removed that as well. Not sure if that was some default account or if I created it through my earlier experiments with the camera.

avg-I avatar Aug 26 '21 10:08 avg-I

Let me know if the cam continues to work properly. I will add the instruction to the hack.

roleoroleo avatar Aug 26 '21 10:08 roleoroleo

Everything is fine. I can access the web interface, rtsp streams, ptz works. Is there anything else you'd like me to test?

avg-I avatar Aug 26 '21 10:08 avg-I

A couple of days of operation and a couple of reboots. Nothing special.

roleoroleo avatar Aug 26 '21 11:08 roleoroleo

So 3 weeks down the road everything is still fine. The camera has been rebooted several times including graceful reboots and unexpected power-offs.

avg-I avatar Sep 18 '21 07:09 avg-I

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 04 '24 02:04 github-actions[bot]