For more contact methods and ways to donate, visit my website: https://benbusby.com.
benbusby / piro Goto Github PK
View Code? Open in Web Editor NEWA Raspberry Pi security camera rover
License: MIT License
A Raspberry Pi security camera rover
License: MIT License
For more contact methods and ways to donate, visit my website: https://benbusby.com.
I'm running raztot under a different user account (root instead of pi) and when I try to enable the video stream it fails.
I know I shouldn't be running it as root, but if I used a different user (e.g. ewegene) this problem still would have surfaced.
[2019-06-04 23:52:34,180] ERROR in app: Exception on /camera [POST]
Traceback (most recent call last):
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/root/raztot/venv/lib/python3.5/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/root/raztot/venv/lib/python3.5/site-packages/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/root/raztot/app/routes.py", line 157, in camera
subprocess.Popen(stream_proc.split())
File "/root/raztot/venv/lib/python3.5/site-packages/gevent/subprocess.py", line 627, in __init__
restore_signals, start_new_session)
File "/root/raztot/venv/lib/python3.5/site-packages/gevent/subprocess.py", line 1505, in _execute_child
raise child_exception
FileNotFoundError: [Errno 2] No such file or directory: '/home/pi/raztot/utils/stream.sh'
Hi,
Followed your tutorial but when I connect to my RazTot via Dataplicity I only see around 1-2 seconds of video before the feed dies and I see the following getting spammed in my terminal (on my pi):
[ERR] [ice.c:janus_ice_outgoing_traffic_handle:4118] [5714788999919634] ... only sent -1 bytes?
Any idea of what would cause it to work for a split second and then just stop suddenly? If I watch my "wormhole" page even after the video cuts out I can see the steamrate going up and down, but no video. I tried it in Chrome and Safari on my Mac and both times I see that above error on the pi almost immediately.
Thanks!
I have an issue running the raztot app after succesful install. I get stuck here, and Janus reports errors, I hope someone can spot my mistake, i'm quite new to linux:
pi@raspberrypi:/ $ cd /raztot/raztot $ python3 -m venv ./venv
pi@raspberrypi:
pi@raspberrypi:/raztot $ source ./venv/bin/activate/raztot $ source run.sh local
(venv) pi@raspberrypi:
Starting pigpiod...
Using api key: 58lRMY3r0FMAoZxPv8ADVZj6Bo3sJAka
Janus commit: 5665a5be27222ff4957819f9d8b360b67afb12ab
Compiled on: Thu Jun 6 23:18:46 CEST 2019
Checking command line arguments...
Debug/log level is 4
Debug/log timestamps are disabled
Debug/log colors are enabled
Adding 'vmnet' to the ICE ignore list...
Using 192.168.0.109 as local IP...
[WARN] Token based authentication disabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled)
TURN REST API backend: (disabled)
[WARN] Janus is deployed on a private address (192.168.0.109) but you didn't specify any STUN server! Expect trouble if this is supposed to work over the internet and not just in a LAN...
Crypto: OpenSSL >= 1.1.0
[WARN] No cert/key specified, autogenerating some...
Fingerprint of our certificate: EF:DB:25:19:31:F9:22:EA:3C:9E:C4:06:E8:BD:AD:61:C5:5D:70:CD:3B:65:0F:55:5C:9A:83:C4:C4:7F:0B:E0
[WARN] Data Channels support not compiled
Joining Janus requests handler thread
[WARN] Event handlers support disabled
Plugins folder: /opt/janus/lib/janus/plugins
Sessions watchdog started
Loading plugin 'libjanus_nosip.so'...
JANUS NoSIP plugin initialized!
Loading plugin 'libjanus_videocall.so'...
JANUS VideoCall plugin initialized!
Loading plugin 'libjanus_textroom.so'...
JANUS TextRoom plugin initialized!
Loading plugin 'libjanus_voicemail.so'...
JANUS VoiceMail plugin initialized!
Loading plugin 'libjanus_streaming.so'...
JANUS Streaming plugin initialized!
Loading plugin 'libjanus_echotest.so'...
JANUS EchoTest plugin initialized!
Loading plugin 'libjanus_sip.so'...
JANUS SIP plugin initialized!
Loading plugin 'libjanus_audiobridge.so'...
JANUS AudioBridge plugin initialized!
Loading plugin 'libjanus_videoroom.so'...
JANUS VideoRoom plugin initialized!
Loading plugin 'libjanus_recordplay.so'...
JANUS Record&Play plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_http.so'...
HTTP webserver started (port 8088, /janus path listener)...
[WARN] HTTPS webserver disabled
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
Loading transport plugin 'libjanus_pfunix.so'...
[WARN] Unix Sockets server disabled (Janus API)
[WARN] Unix Sockets server disabled (Admin API)
[WARN] No Unix Sockets server started, giving up...
[WARN] The 'janus.transport.pfunix' plugin could not be initialized
Initializing...
Running SocketIO app on 127.0.0.1...
I followed and sat up everything according to the guide, but it does not seem that i can open the Raztot webapp even though my Dataplicity server link is working fine. I have also tried to run the app locally, but with same result. Hopefully it's ok to ask this here, also new to github :)
Hello again! Here are a few things I found:
setup.sh
under "Generate self-signed certificates" you generate certificates and try to copy them to the /etc/nginx/ path before installing nginx (so this will fail)nginx
part of the setup.sh
you copy the nginx config to sites-available but never link this file to sites-enabled which means the file will never be used. You could install it directly to sites-enabled which is not best pactice but gets the job done for this projectWill it be possible to have a third servo controlled through the app? I want to have a servo activating a laserpointer while you press the up key on the keyboard in the webapp, so it will activate while the RazTot is moving forward. It is working now on GPIO pin 17, and running on the 3v output, but I wanted to be able to run it simultaneously with the wheels.
So my question is: What do I have to change in the code to run GPIO pin 27 as if it was 22 and 17, but all at the same time? I will look through the code and see if I can figure it out, but if you have time to help a coding noob it would be awesome :)
When starting raztot it has the following prompt:
Run Janus Gateway? (y/n)
When choosing n
it will still run and allow you to log in, but video streams don't work.
The captures output directory doesn't exist by default. When trying to create a recording it fails:
[raztot-streaming] New video stream! (ssrc=2945139143, index 0)
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstFileSink:filesink0: Could not open file "/home/pi/raztot/app/static/captures/2019-06-04-23_57_11.mp4" for writing.
Additional debug info:
gstfilesink.c(438): gst_file_sink_open_file (): /GstPipeline:pipeline0/GstFileSink:filesink0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...
Additionally, when trying to view a list of the recordings it also fails:
[2019-06-04 23:58:51,425] ERROR in app: Exception on /static/captures/ [GET]
Traceback (most recent call last):
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/root/raztot/venv/lib/python3.5/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/root/raztot/venv/lib/python3.5/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/root/raztot/venv/lib/python3.5/site-packages/flask_login/utils.py", line 261, in decorated_view
return func(*args, **kwargs)
File "/root/raztot/app/routes.py", line 222, in list_captures
files = os.listdir(CAPTURES_FOLDER)
FileNotFoundError: [Errno 2] No such file or directory: '/root/raztot/app/static/captures'
You are not using a H bridge.. a motor driver. Won't you burn the raspberry pi ?
How did you solve this ?
Thank you so much for this wonderful app! I actually bought my first pi just to install and play with raztot.
The installation went smoothly, the ./test_motors.sh 17 22
works as expected, the wheels turn, I can start the stream, capture images and video and play them back but nothing happens when I press the arrow keys on the keyboard. This is true for both source run.sh local
and remote
. I also checked out the feature/mobile-controls branch but also here nothing happens when i swipe on my iphone. Another thing I noticed is that no stats appear in the right hand corner it says:
Camera Status: Offline
Recordings: N/A
Stream Status: Live
Temperature: ???
Stream Rate: 3099 kbits/sec
Storage: ??? / ??? GB remaining
Version: 1.0.0
I would really appreciate your support on how to debug this issue further to get it up and running.
Thanks in advance.
Me and my kid had a great time with raztot so far, thank you again for that! We checked out your mobile-controls branch and while it works, it feels buggy as the commands (i.e. touchend) don't seem to be transmitted directly and the robot keeps on driving after the touch is ended. While searching for a smoother solution I stumbled accross the following repo: https://github.com/ufulu/robotcontrol-javascript and wanted to know your thoughts if this could and should be integrated? While I have been tinkering around with python, flask and JavaScript for a bit in other mini projects I am not quite sure how to incorporate these controls on my own.. :/
Need to reevaluate which packages are necessary and removed any that aren't needed.
All working browsers now require SSL encryption for WebRTC. This basically means iOS will not work with this unless you go through a very convoluted process of creating a CA cerificate, then a self signed cert using that CA and then installing that CA in iOS. Android is less an issue since you can just bypass the warning, but you can't go full screen if the SSL cert has an error so if you want full screen video on a phone/tablet you are stuck with the same workaround needed for iOS to work at all.
Note I've built effectively this same app and am looking for an alternative workaround. Eg low latency streaming to a browser. WebRTC is just not going to do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.