Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch request #26

Open
LeeHeap opened this issue Sep 20, 2021 · 26 comments
Open

Patch request #26

LeeHeap opened this issue Sep 20, 2021 · 26 comments

Comments

@LeeHeap
Copy link

LeeHeap commented Sep 20, 2021

Hi

I cannot find an existing patch for my ppsapp, please could the attached be patched? This is from a Bell 5T doorbell running firmware 4.3.3.20210122

Thanks!
ppsapp.zip

Edit: This appears to be a very similar doorbell to #guino/BazzDoorbell#35

@guino
Copy link
Owner

guino commented Sep 20, 2021

@LeeHeap you need to post the information from /devices/deviceinfo so I can try to put the patch together.

@guino
Copy link
Owner

guino commented Sep 20, 2021

@LeeHeap from yout ppsapp file it looks like this patch may work for it: #13

@LeeHeap
Copy link
Author

LeeHeap commented Sep 21, 2021

@guino thanks for looking at this. I've tried applying the patch in #13 and the camera seems to boot but will no longer talk to the cloud/mobile app and doesn't run the log parser script for MQTT integration.

My bad forgetting the deviceinfo:
{"devname":"Smart Home Camera","model":"Bell 5T","serialno":"*********","softwareversion":"4.3.3","hardwareversion":"BE5T_H1_V10_433","firmwareversion":"ppstrong-c5-s_joys-4.3.3.20210122","identity":"MR2008260201202910","uuid":"","licence_id":"ppsc3596823fab4f40ec","WiFi MAC":"7c:25:da:c0:9e:dc"}

@guino
Copy link
Owner

guino commented Sep 21, 2021

@LeeHeap Please post a zip of your SD card contents without the SDT folder so I can review. The patch should work for your ppsapp so either something is wrong with the patch or there may be something wrong with the SD card files (it could be either but it's easier for me to verify the SD card files first).

@LeeHeap
Copy link
Author

LeeHeap commented Sep 22, 2021

@guino thanks so much for taking a look at this! Here's a zip of my sd card content (credentials have been sanitised)
sd.zip

@guino
Copy link
Owner

guino commented Sep 22, 2021

@LeeHeap I haven't seen anyone use Dan's files with 4.x successfully yet -- the files may be different enough to cause the issue you're seeing. I would recommend following the instructions here https://github.com/guino/Merkury1080P#conclusion (conclusion section) from the start with a clean SD card and see if your camera can boot normally and allows you telnet access. Once that's working you should try the patch I posted above and report back. I just don't have enough information to know if Dan's files (which are on your SD card) would work so I suggest you don't use them on 4.x firmware.

@pioneershahid
Copy link

Hi @guino,

hope you are doing well. sorry for hijacking this post.

As i can see with version of doorbell in this post is same as mine so thought to message here instead of creating new request. Here is info for my doorbell.
{"devname":"Smart Home Camera","model":"Bell 5T","serialno":"062800664","softwareversion":"4.3.3","hardwareversion":"BE5T_H1_V10_433","firmwareversion":"ppstrong-c5-s_joys-4.3.3.20210122","identity":"MR2008260201205079","uuid":"","licence_id":"ppscd7a7c5a949204994","WiFi MAC":"7c:25:da:c0:a4:fc"}

I can enable onvif via cloudedge app. I have frigate installed in HA as addon and recordnig doorbell. I am using rtsp://192.168.xx.xx:8554/Streaming/Channels/102 . However the quality of recording is of SD resolution. the camera have HD and FHD resolution option via app.

I am not sure if requesting for rtsp patch will allow me two streaming links which i can use for recording?

@guino
Copy link
Owner

guino commented May 18, 2022

@pioneershahid did you try rtsp://192.168.xx.xx:8554/Streaming/Channels/101 (101 instead of 102) ? All cameras that have those RTSP URLs (that I know of) should have both HD and SD resolution available on RTSP.

@pioneershahid
Copy link

pioneershahid commented May 18, 2022

@guino I tried it and it didnot work.. i used onvier app/sniffer on andriod and only see 102 in the streaming url.. here is the log for your reference and psapp zip file
log.docx
ppsapp.zip
.

@pioneershahid
Copy link

@guino, would you like to try patch posted in https://github.com/guino/ppsapp-rtsp/issues/26#issuecomment-1130298208, not surei if you get chance to look into my ppsapp shared in https://github.com/guino/ppsapp-rtsp/issues/26#issuecomment-1130308544.
Assuming i need to replace patch in home/folder and in the root director for rtsp to work. thanks

@guino
Copy link
Owner

guino commented May 19, 2022

@pioneershahid I am traveling so I won’t have a chance to look at anything till next week. I have never seen a ppsapp with rtsp on 102 but not on 101 so I am not sure what I would be looking for in the code and have no way of testing without a device, so chances are bleak for any improvement on it.

@pioneershahid
Copy link

@guino just like to follow up if you get chance to look into ppsapp shared thanks

@guino
Copy link
Owner

guino commented May 28, 2022

@pioneershahid haven't had a chance to look at it yet.

@guino
Copy link
Owner

guino commented Jun 2, 2022

@pioneershahid Looking at the code I'm not sure but it seems that 102 to may be always enabled while 101 seems to only be enabled if the PTZ function is enabled on the device. Is this camera PTZ at all ?

To understand the code better I need a ppsapp log file (you posted a log from some android client it seems) -- just edit custom.sh so that the line /mnt/mmc01/ppsapp & looks like this: /mnt/mmc01/ppsapp 2>&1 > /mnt/mmc01/ppsapp.log & then after a reboot the file ppsapp.log should be in the SD card-- please try to use the RTSP on 102 and 101 then and you can download the log with http://user:password@ip:8080/ppsapp.log (or just wait a few seconds and remove the SD card and copy the file) and post it so I can review the log along with the code.

I would also suggest you check and/or post your tuya_config.json file to see if there's no setting defining what features are enabled on the device. I'm not quite sure what we could edit to see if the 101 stream would start as it seems tied up in the middle of the PTZ functions.

@pioneershahid
Copy link

@guino Apologies for the late response.

Please see attached ppsapp log. This is a doorbell using via cloudedge app. I donot think it has PTZ functionality.
ppsapp.log.

RTSP is only accessable on 102. tried 101 with no luck. can you please advise where to find tuya_config.json. i cannot seem to find it in the SD Card. thank you.

@pioneershahid
Copy link

pioneershahid commented Jun 6, 2022

@guino another log when i was trying to connect to 101.. i do see rtsp://192.168.1.56:8554/Streaming/Channels/101 path but when trying to access it via motioneye, getting host unreachable message. thank
ppsapp.log
s

@guino
Copy link
Owner

guino commented Jun 8, 2022

@pioneershahid looking at the log: the RTSP server is defintely running on /Streaming/Channels/101 -- I don't really see anything that indicates an error or issue when trying to access but it seems like it is (at some point) trying to access it over a web request (instead of RTSP) -- and that is returning a 401 code which is an error but on a web request (not RTSP request). When using 102 I do not see this web request being made, so the first thing I would check is that you have the same configuration/settings you have for 102 when trying to use 101. The other thing I would try is using VLC, any RTSP or ONVIF phone/pc app, to see if you get the same results (102 working and 101 not working).

If the same settings for 102 don't work on 101 and 101 doesn't work on any other pc/phone app (VLC, etc) then the only explanation would be that the device may be unable to stream the RTSP on main channel due to some sort of hardware limitation and/or permission within the device (and it would be near impossible to find/fix it by patching code).

@pioneershahid
Copy link

pioneershahid commented Jun 8, 2022

@guino thank you very much. yes it is working and good thing, i can hear audio .. thank you for your help. I have repeated the step over and over again in last 3-4 days but failed to send mqtt message. so appreciate if you can assist with following two queries.

  1. As per link, i got the doorbell to communicate with HA. it was working fine untill SD card corrupted. I had to start over again. I have hack working and but on button press or motion, no mqtt message sent. via telenet, i can see message is coming manually /mnt/mmc01/mosquitto_pub -h 192.168.x.x -p 1883 -u mqtt -P mqtt -t "homeassistant/binary_sensor/doorbellMotion/state" -m ON. I saved SD card content here appreciate if you can piont out what i need to fix to send motion/button press mqtt message to HA.

  2. In custom.sh i removed "#" from /mnt/mmc01/set record_enable 0 to disable recording to avoid SD card corruption again. however, i still see video is beng recorded on motion detection in SD card. any pointer here please? thank you

@guino
Copy link
Owner

guino commented Jun 12, 2022

@pioneershahid
1-In order for the mqtt notifications to work you must have the ppsapp file in the root of the SD card -- even if you don't patch it (it can be the original one), but it must be in there so it can be started with the log being monitored to generate the alerts. On your SD card files I see a ppsapp-custom file but no 'ppsapp', I would just copy the ppsapp file from home/app/ppsapp to the root of the SD card and it should allow you to get the motion and button push alerts. It is possible that having a ppsapp file in the root of the SD card could cause some problems with the video not starting -- if so you'd need specific changes posted with 'Dan's changes' listed here: https://github.com/DanTLehman/orion_sc008ha -- I have only seen 2.9.0 firmware need this but keep that in mind.

2-Some devices may not use/read the setting, so my only advice is to configure the cleanup.cgi file so it can delete files for you regularly so your SD card won't fill up. It is also possible that RTSP may not work correctly on some device if you disable recording entirely.

@xromansx
Copy link

xromansx commented Dec 9, 2022

Hi, I have same dorbell, would it be possible to use it with tuya app ? I would like to incadrate it with alexa but cloudedge app doesn't work good also VLC stream always freezes. The FW in this bells is intercangeble ? I know that CPU and sensor need to be same what about serial nr and other stuff ?

@guino
Copy link
Owner

guino commented Dec 9, 2022

@xromansx you should be able to remove the doorbell from the current app and re-enroll it in the tuya app -- most devices we've been discussing on my repos are tuya devices so they can be used with tuya, smartlife or whatever manufacturer app (LSC, etc). The integration available will depend on the app used and on the device -- the tuya app offers alexa, google assistant, smartthings and IFTTT but I have not tried any of them personally to know what features are available. Many of these devices have in issue with RTSP where it freezes after 13 minutes -- this usually is fixed by using RTSP over TCP (option in VLC).

Switching from one tuya firmware to another tuya firmware would offer you no benefits that I can think. There are some projects like OpenIPC which have some compatible firmware to some tuya devices (same CPU+Sensor) but last I looked they only supported cameras (no doorbells).

@xromansx
Copy link

It doesn't let me use tuya app the qr code isn't accepted by the cam.I checked OpenIPC, but as you told doorbels not even in the list. I saw there is possibility to change something in FW to use different cloud. But I didn't dig to deep to find out thought maybe someone already done this kind on experiment.

@guino
Copy link
Owner

guino commented Dec 10, 2022

@xromansx the devices on tuya cloud have a unique ID defined in the device and in their servers. If you switched the firmware on a non tuya cloud device for a tuya firmware it would not only have to match the cpu+sensor but would also need to have a valid ID (which can only come from a broken device or from someone who just runs it offline). That’s not something I have done or recommend trying. Probably easier to sell your working doorbell and buy a tuya one. If your device is rooted with RTSP then you can do some integration with it like home assistant, home bridge, domoticz, ifttt, etc but I am not sure what your goal is with alexa, google assist - chances there’s probably a way to do it using the right tools.

@xromansx
Copy link

xromansx commented Dec 10, 2022

Interesting that Tuya on their website are selling same bell in 2 versions one to work with tuya another for cloudedge. I asked then if it's possible to change cloud service, will see their reply.
https://shop.tuyaoem.com/tuya-2k-4mp-smart-video-doorbell

Maybe everything depends on ppsapp it it has hardcoded cloud server.

@guino
Copy link
Owner

guino commented Dec 10, 2022

Does your cloudedge version have onvif too? Just curious, cause that is a major desirable feature in my opinion.

@xromansx
Copy link

Yes, and from their descpription Cloudedge = onvif , Tuya = automatisation and Alexa/Google.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants