Coder Social home page Coder Social logo

Comments (22)

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024 1

@guino fixed, after removing ppsFactoryTool.txt i used a QR Code to get on the network, all works better now, case closed.

from merkury720.

guino avatar guino commented on July 28, 2024 1

@OwensDataCenter the serial pins on the board are usually 4 contacts like you described: VCC, GND, TX and RX (order likely varies) -- these are TTL level logic at 3.3v, so any board (Arduino, Pi, etc) that supports TTL 3.3v should be able to talk to it (anything 5V will likely FRY IT). What you'd get from this header is likely a serial terminal that you can use to mess with the bootloader, there's likely not going to be any 'function' you'll be able to control using that port. With the device rooted you may be able to send/receive data onto that serial port but it may require custom bootloader settings to prevent the kernel from using it. In your place I would just get a $2 ESP8266 and control the pan/tilt function that way using WIFI directly from it -- it will be way easier (and cheaper) than using an arduino board, you can use the Arduino IDE with it just the same and don't have to wire anything into the camera itself.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024 1

@OwensDataCenter glad it is working now. For pan/tilt functions the camera would have to expose these features somewhere like in a local web service or thru ONVIF (which allows for this type of feature to be controlled). From what I have seen on tuya devices it is unlikely for either of these. It may be possible to control the motors directly thru the linux drivers but without the device to research/test it would be near impossible to know it that can be done -- could even require patching the ppsapp to disable the built-in pan/tilt functions of ppsapp so they would be available for control by an outside application.

@guino it's a good thing that you didn't get one. I had the motherboard of this camera laying around and decided to hook my Arduino up to its RX and TX pins, the username is default with no password, the fs is a mess and many problems put in place, it's a different operating system but parts of the tuya IPC operating system are on it. Most of the IP addresses that I found in the files are Chinese servers, also the camera can create a VPN to your local network with a DDNS as well, Glad I ran 'rm -rf *' to remove all the OS crap (files that are non-essential). Used to take about 45 seconds to get to the command line now it only just takes 9 seconds. This is the aftermath output of the camera: https://gist.github.com/OwensDataCenter/6c334fbf22c97f57c49641494e1ad9f8

from merkury720.

guino avatar guino commented on July 28, 2024

@OwensDataCenter the 13 minute limit is something we have seen/documented before -- it usually happens when you're using RTSP over UDP for streaming. You should check if your security system is able to use RTSP over TCP so it won't have that issue with restarting every 13 minutes. If your security system doesn't support RTSP over TCP your only option would be to stream from the camera to middle-man machine (with RTSP over TCP) then re-stream from the middle-man machine to your security system -- this middle-man setup can be easily setup with ffmpeg but it does require the middle-man machine to be always on, always streaming from camera and providing the rtsp stream to the security system.

You made it sound like only 1 of you cameras was having this issue which makes me think you may only need to double check the settings for that camera (to use RTSP over TCP) or you should be in fact seeing the issue in all cameras (I can tell you that all cameras I own have this issue, but depending on the model it may not be a problem).

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Thats not the problem, I don't have RTSP. I don't really want it because of all the chaos is caused over my Wi-Fi (The 2.4 GHz Wi-Fi network is very crowded). I am using the MJPEG/JPEG in the cgi-bin directory to get the feed.

Also, I tried copying the files that were on that SD card (the one that was giving me problems) to all of the other cameras' SD cards and now all of them are having that issue, could there be a problem with the files?

from merkury720.

guino avatar guino commented on July 28, 2024

@OwensDataCenter I have never heard of issues using mjpeg for extended periods of time. Feel free to post a zip of your SD card files (without SDT folder) and I can review but I would expect that it should work 100% or the time or not at all.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino I changed the user (And SSID)/pass of everything to admin/admin for privacy and security (Keep that in mind)
SD Card.zip

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

This problem only happens when the IR is on and is night-time.

from merkury720.

guino avatar guino commented on July 28, 2024

@OwensDataCenter I looked at your files and this is what I see:
1-You don't need to patch ppsapp to use mjpeg/snap, so you can remove ppsapp from the root of the SD card (which I recommend to make the startup simpler/faster).
2-Your files have the correct address for your firmware, seem to have the correct format (thus are working) -- the only reason I can think of for it to 'stop' working would be if perhaps the complexity of your images at night may require a little more memory for it to provide working images. I recommend you try changing the value in mjpeg.cgi and snap.cgi from 57336 to 114672 and see if the problem happens again (and or more/less frequently). If the details on the image are very high at nigh (IR on) then this could fix the issue (you can try a higher value if 114672 'helps' but doesn't totally fix the issue).

Like I said I have never seen issues with prolonged use of mjpeg/snap but I have seen issues where the image was so complex that the 57336 size was just not enough to get a full picture -- some web browsers show a partial image while other devices and/or browsers won't show anything at all when the image is incomplete.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Nope. However, when I put ppsapp on the root of the SD Card it works all night now.
Edit: After power cycling the camera it started doing it again.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Audio? How can I get the audio feed?

from merkury720.

guino avatar guino commented on July 28, 2024

@OwensDataCenter audio is only available with RTSP , mjpeg and snap won’t have audio.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Ok.
I changed the memory size to 57336 on snap and mjpeg and looked at the ppsapp.log file and found this, This was right when it restarted.

00:00:19.657 INFO pps_tuya_media.c:1878]md_common_callback...
snapshot ak_vi_get_frame err,ret:-1,ffffffff
00:00:19.997 INFO pps_device_factory.c:64]we are now in factory mode
18:12:29:779 TUYA Debug][wf_nw_cfg.c:100] Set New Channel 11
00:00:20.104 INFO pps_device_qrcode.c:228]qrcode stoped
chan:0 ---enType = 0, enRcMode = 1, u32BitRate = 600, u32Gop = 20, fr32DstFrmRate = 20---1080-----1920

-----------chan:0, w:1920,h:1080,minqp:28,maxqp:43 fps:20,goplen:40,bps:600, profile:0,use_chn:0,enc_grp:1,br_mode:1,enc_out_type:0
target:600,max:600
set_end: target:600,max:900
chan:1 ---enType = 0, enRcMode = 1, u32BitRate = 360, u32Gop = 20, fr32DstFrmRate = 20---360-----640

-----------chan:1, w:640,h:360,minqp:28,maxqp:43 fps:20,goplen:40,bps:360, profile:0,use_chn:1,enc_grp:2,br_mode:1,enc_out_type:0
target:360,max:360
set_end: target:360,max:540
00:00:20.192 INFO pps_device_media.c:2102]anyka media start up
00:00:20.192 WARN pps_device_media.c:1329]recover priority not set before, set dn auto switch mode
00:00:20.192 INFO pps_device_media.c:1404]set day night switch mode to auto complete
00:00:20.192 INFO pps_device_media.c:1343]used priority: 0, auto set daynight mode 2
00:00:20.415 INFO pps_device_factory.c:64]we are now in factory mode

Here is the whole log file, too lazy to change SSID's and Passwords: ppsapp.log

from merkury720.

guino avatar guino commented on July 28, 2024

@OwensDataCenter some firmware versions will stay in factory mode if posFactoryTool.txt is on the card - please rename or delete the file from rhe SD card and reboot. That file is only needed to get the information from the device for the root process (mjpeg/snap/RTSP should work fine without it).

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Update: After removing all of the CGI scripts and making modifications to most of the files and STILL the camera reboots!
I did the following;
Removed all the CGI scripts
Removed ppsFactoryTool.txt
Set up the camera QR code
And now the camera 'sleeps' (No longer responds to anything, No lights) indefinitely, The CGI scripts are still deleted (At the time of writing this).

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

After letting it sit for about 25 minutes it is doing better. But it does not restart! Good!
All it does is go red for about 2 seconds then reconnect to Wi-Fi (The whole thing taking around 15 seconds). Not as bad as before.
But no more black lights, This was after adding the CGI scripts and viewing the mjpeg stream, It will go black again if you don't view the stream for a while but will wake up and reconnect to Wi-Fi, then will repeat the whole process again.
There were some modifications to the files, If you need another ZIP file of the new contents let me know.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Another update: Put it back in its case and weirdly enough, RTSP works and ONVIF as well.
Every thing was fixed, They are the following;
Black LED (Sleeping when there is no activity)
Wi-Fi Reconnect (Reconnects to the internet randomly)
Constant Restarting (Fix: ppsFactoryTool.txt Removed)
Let's see what happens after a day. At the time of writing this the camera has been working for 1h 7m 32s

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

The camera is doing quite well. Good enough to where it barely even bothers me.
This is quite impressive, Sure it will throw a 10-minute fit on startup but after that everything works like it should.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

After a LOT of messing around I found out if that, I do use my phone (the one I used to set up the camera) while using Blue Iris the camera doesn't throw a fit, tries to reconnect to Wi-Fi a lot of times or anything of that sort, it doesn't even restart at all.
This is very strange behavior, and I should note, you should NEVER EVER turn off that onboard LED! You won't know what is going on next time something bad is happening!
Led patterns go like this.
Red (Startup, Reading Flash OR Reading SD Card) -> Blinking Blue (Connecting to Wi-Fi) -> Blue (Connected to Wi-Fi, would end here if no hack installed) (->) Red (Offline.sh script) -> Blinking Blue (Connecting to Wi-Fi, End of Offline.sh script) -> Blue (Done, connected to Wi-Fi, ready to stream)

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino Yay! Finally it actually works! I've been thinking, could you add Pan-Tilt functionality for the Geeni Sentry Pan Tilt camera?
This the camera you're wanting to look for: https://www.amazon.com/dp/B07TDN9PCQ

from merkury720.

guino avatar guino commented on July 28, 2024

@OwensDataCenter glad it is working now. For pan/tilt functions the camera would have to expose these features somewhere like in a local web service or thru ONVIF (which allows for this type of feature to be controlled). From what I have seen on tuya devices it is unlikely for either of these. It may be possible to control the motors directly thru the linux drivers but without the device to research/test it would be near impossible to know it that can be done -- could even require patching the ppsapp to disable the built-in pan/tilt functions of ppsapp so they would be available for control by an outside application.

from merkury720.

OwensDataCenter avatar OwensDataCenter commented on July 28, 2024

@guino So I took a look at the board, they look like serial port headers (4 golden contacts) at the edge of the board, I want to use them with an Arduino to make it a Pan-Tilt Camera, I already created some CGI Scripts to blink the LED and do some other custom functions, how can I read and write to that serial port?
Edit: There is a 'tty' device showing up, is that it?

from merkury720.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.