KronTalk
Chronos => Chronos User Discussion => Topic started by: stephanschulz on March 28, 2018, 03:19:26 PM
-
Hi.
This camera looks amazing.
I was wondering how easy it is to connect my app running on OS X to the camera, so that I can trigger a slow motion recording and then download the file to the OS X machine, all via code.
I guess this could be done via ethernet connection or somehow copy over usb directly to computer?
I see this note at the bottom of the homepage.
"*These features are fully supported in hardware, but not yet in software. They will be added in a future free software update"
thanks for any advice.
Stephan, from Montreal.
-
Hi Stephan,
We currently are working on full Ethernet remote control, but there are some limited functions you can do remotely right now. With the v0.2.5 beta software or newer, you can set the camera to automatically save after a trigger. This will get a file onto a local storage device like an SD card. Then, with the camera connected via USB (behaves as a USB to Ethernet bridge), you can then run a script we have that will monitor the card for new files. When it finds one, the file is SCP'd over network to the PC and then deleted from the SD card.
Would this be of interest?
David
EDIT:
Here's the script as it stands. It requires a few libraries and needs to be run on a computer connected to the camera via USB.
The libraries it needs are: plumbum, paramiko
Preparation
Open the script in a text editor and make a change or two:
1. Set localdir to the destination on your computer where you want the files to be copied to
2. The script will look on the SD card by default. If you want to change this, replace all 4 occurences of mmcblk1p1 in the script with the mount point of the partition that is selected on the camera. This can be checked on the Save Setting screen, accessible from the Play screen. If saving to a USB stick, sda1 is probably the one to use, though sda or sda2 may sometimes be required.
Usage
Open a terminal or command prompt and run the script using:
python2 get_latest_video.py
Troubleshooting
If having the error "paramiko.ssh_exception.SSHException: Server '192.168.12.1' not found in known_hosts," try the solution posted by rvcFS here: http://forum.krontech.ca/index.php?topic=149.msg2717#msg2717
-
If you already have template code for doing this, it would be highly appreciated!
-
David,
Can you also provide me with the script that monitors card for file update and then transfers file through network to PC?
Thank you,
pstest
-
you can then run a script we have that will monitor the card for new files. When it finds one, the file is SCP'd over network to the PC and then deleted from the SD card.
Would this be of interest?
David
Hi David,
would it be possible that I could get the script also?
Thank you very much,
Ulrike
-
Hi David,
I'm interested in the script. Could you please send me a copy?
thx.
-
Hi Stephan,
We currently are working on full Etherent remote control, but there are some limited functions you can do remotely right now. With the v0.2.5 beta software, you can set the camera to automatically save after a trigger. This will get a file onto a local storage device like an SD card. Then, with the camera connected via USB (behaves as a USB to Ethernet bridge), you can then run a script we have that will monitor the card for new files. When it finds one, the file is SCP'd over network to the PC and then deleted from the SD card.
Would this be of interest?
David
HI David,
Can you send the script to test? thx.
-
Here's the script as it stands. It requires a few libraries and needs to be run on a computer connected to the camera via USB.
The libraries it needs are: plumbum, parimoko
EDIT: This is now obsolete, use the script attached to the 2nd post in this thread.
-
Hi David,
I am wondering if there is any additional setup I should perform to successfully connect to the camera via USB. I got the following error when trying to run the script. I am able to ping the IP (192.168.12.21 in my case). I am using software 0.3.0-RC1. The camera is Chronos 1.4, Moochrome, 32 GB.
Any suggestions will be appreciated!
Traceback (most recent call last):
File "C:\ProgramData\Anaconda2\lib\site-packages\IPython\core\interactiveshell.py", line 2878, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-2-f07cba69afd6>", line 1, in <module>
runfile('C:/Users/PG_silver/Downloads/get_latest_video.py', wdir='C:/Users/PG_silver/Downloads')
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.1.4\helpers\pydev\_pydev_bundle\pydev_umd.py", line 194, in runfile
pydev_imports.execfile(filename, global_vars, local_vars) # execute the script
File "C:/Users/PG_silver/Downloads/get_latest_video.py", line 7, in <module>
cam = ParamikoMachine(host=host, user='root', password='')
File "C:\Users\PG_silver\AppData\Roaming\Python\Python27\site-packages\plumbum\machines\paramiko_machine.py", line 245, in __init__
self._client.connect(host, **kwargs)
File "C:\Users\PG_silver\AppData\Roaming\Python\Python27\site-packages\paramiko\client.py", line 357, in connect
raise NoValidConnectionsError(errors)
NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 192.168.12.21
Here's the script as it stands. It requires a few libraries and needs to be run on a computer connected to the camera via USB.
The libraries it needs are: plumbum, parimoko
-
The error basically means the connection to the camera failed on port 22.
Can you try to use ssh to connect to the camera? PuTTY is a great windows tool for that. Or use BASH directly if you're on windows 10.
From there on troubleshooting is much easier.
-
I tried to ssh to the camera using Putty and it failed to open the connection. The error message is attached. Any thoughts? Thank you!
-
I tried to ssh to the camera using Putty and it failed to open the connection. The error message is attached. Any thoughts? Thank you!
Try the following to connect to the camera via SSH and see if this works. If this doesn't, you may need to use an older version of Linux on your PC or investigate the encryption methods supported on your distro. The old Arago Linux build on the camera doesn't support modern crypto, and most systems today by default disallow the insecure modes supported by the camera
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 [email protected]
-
Thank you for the suggestions. I tried to ssh to the camera using Ubuntu on Windows, and it still refuses the connection. Please see the screenshot attached.
-
The last number in the IP address should be 1, not 21. So, the whole address should be 192.168.12.1
-
Sorry, my bad. I was trying to use the ip address from ipconfig
With the correct ip address, the camera complains about "no matching cipher found".
Based on a hint from another thread in Soft Dev board, I used winscp which allows the connection after ignoring some security warning. So far, all is well. Thanks everyone for the help.
The last number in the IP address should be 1, not 21. So, the whole address should be 192.168.12.1
-
On linux, ssh1 may be able to connect where ssh cannot. We hope this issue - and the security warnings - will be solved by the upcoming 0.4.x update.
-
The error basically means the connection to the camera failed on port 22.
Can you try to use ssh to connect to the camera? PuTTY is a great windows tool for that. Or use BASH directly if you're on windows 10.
From there on troubleshooting is much easier.
Good day. I had the same problem as a user above. Now I connected to camera via SSH as a root. What can/should I do now in order to enable the script provided above to work? (The main task for me is to get the images/videos from the camera when I need via python script, if this information is necessary)
-
The error basically means the connection to the camera failed on port 22.
Can you try to use ssh to connect to the camera? PuTTY is a great windows tool for that. Or use BASH directly if you're on windows 10.
From there on troubleshooting is much easier.
Good day. I had the same problem as a user above. Now I connected to camera via SSH as a root. What can/should I do now in order to enable the script provided above to work? (The main task for me is to get the images/videos from the camera when I need via python script, if this information is necessary)
Run the script on the computer, not the camera. You don't have to log in via SSH separately. The script will do that for you.
Logging in via ssh might be useful as a debugging step if the script isn't working.
-
The problem is that the script is not working :) Therefore I tried to connect by SSH, but now I don't know how to use it to solve initial problem.
-
What happens when you try to run the script?
-
Traceback (most recent call last):
File "get_latest_video.py", line 7, in <module>
cam = ParamikoMachine(host=host, user='root', password='')
File "/home/martin/anaconda3/envs/camera/lib/python3.7/site-packages/plumbum/machines/paramiko_machine.py", line 245, in __init__
self._client.connect(host, **kwargs)
File "/home/martin/anaconda3/envs/camera/lib/python3.7/site-packages/paramiko/client.py", line 416, in connect
self, server_hostkey_name, server_key
File "/home/martin/anaconda3/envs/camera/lib/python3.7/site-packages/paramiko/client.py", line 824, in missing_host_key
"Server {!r} not found in known_hosts".format(hostname)
paramiko.ssh_exception.SSHException: Server '192.168.12.21' not found in known_hosts
-
What happens when you try to run the script?
Also, this is the only way I was able to connect to camera via SSH:
ssh [email protected] -o Kexalgorithms=+diffie-hellman-group1-sha1 -o Ciphers=+aes128-cbc
-
The script is trying to connect to connect to '192.168.12.21' instead of '192.168.12.1'.
Was your script edited to use 21 instead of 1 for the last number?
-
I just noticed it) After changing IP to 192.168.12.1 there occured another error:
copying latest video to host
Traceback (most recent call last):
File "get_latest_video.py", line 37, in <module>
copy_video(cam, serial, localdir)
NameError: name 'serial' is not defined
How should I define that serial?
-
serial should just be removed from the script. Open the script in a text editor and change the line containing the world 'serial' to:
copy_video(cam, localdir)
-
Hey guys,
I downloaded the get_latest_video.py script and installed all the dependencies (paramiko and plumbum), however I am not able to connect to the camera.
I did the following steps but I keep getting timed out.
Connect the Camera to the PC using (eSATA / USB) port
Connected a ethernet LAN cable from my pc network adapter to the cameras network adapter (blinking with lights)
Changed my pc network adapter ip to a static ip of 192.168.12.10
Tried to ping the camera on 192.168.12.1, destination host unreachable / request timed out
I tried running the script, gave me a no response error.
Would appreciate any advise on what I did wrong. :-[
-
Sorry guys, it was my mistake, I missed the point where the USB acts as a Ethernet bridge.
I managed to connect using winSCP, however when I try to run the python script, I get the following errors:
File "C:\Program Files (x86)\Python36-32\lib\site-packages\plumbum\machines\paramiko_machine.py", line 245, in __init__
self._client.connect(host, **kwargs)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\paramiko\client.py", line 416, in connect
self, server_hostkey_name, server_key
File "C:\Program Files (x86)\Python36-32\lib\site-packages\paramiko\client.py", line 824, in missing_host_key
"Server {!r} not found in known_hosts".format(hostname)
paramiko.ssh_exception.SSHException: Server '192.168.12.1' not found in known_hosts
Im running this on Python 3.6.5 on a Windows 10 OS;
-
have you tried ssh1 instead of winscp?
can you edid you known_hosts file and add the required key?
if you're on win10 you can install bash and use native linux tools which might be easier.
-
have you tried ssh1 instead of winscp?
can you edid you known_hosts file and add the required key?
if you're on win10 you can install bash and use native linux tools which might be easier.
@NiNeff thanks for the reply, I managed to solve the issue.
Apparently windows does not automatically add unknown hosts when SSHing (no .ssh host file exists) for security reasons. I added the following parameter to the ParmaikoMachine() initalizer:
cam = ParamikoMachine(host=host, user='root', password='', missing_host_policy=paramiko.AutoAddPolicy())
since the default value is set to "None" which rejects any unknown hosts.
Furthermore, copying the video introduced another issue, the following line:
latest = cam['/bin/ls -t -1 /media/mmcblk1p1']().split()[0]
returns the first index of the standard out which in my case was "System" and caused a (File does not exist) error when attempting to copy the file.
Changing it to the following solves the issue:
latest = cam['/bin/ls -t -1 /media/mmcblk1p1']().split()[3]
which is the 3rd index of the sorted list. This returned the latest video in my case.
Sharing in case anyone encounters similar issues.
Cheers!
-
Hello,
I have two questions:
1. If the Chronos 1.4 should be connected to the PC via OTG USB or eSATA/USB socket mounted at the camera?
2. If the mentioned script allowing to download data from the camera to PC works under Windows? If not, is there any possibility to do the same task under Windows 10?
-
1. OTG USB
2. Attached is a windows version of the script. It has the modifications posted by rvcFS, just above in reply # 28.
-
Thank you very much. I will check this.
-
I've checked the script for win10 but I've obtained an error:
Traceback (most recent call last):
File "get_latest_video_windows.py", line 7, in <module>
cam = ParamikoMachine(host=host, user='root', password='', missing_host_policy=paramiko.AutoAddPolicy())
File "C:\Users\NoName\AppData\Local\Programs\Python\Python38\lib\site-packages\plumbum\machines\paramiko_machine.py", line 264, in __init__
self._client.connect(host, **kwargs)
File "C:\Users\NoName\AppData\Local\Programs\Python\Python38\lib\site-packages\paramiko\client.py", line 368, in connect
raise NoValidConnectionsError(errors)
paramiko.ssh_exception.NoValidConnectionsError: [Errno None] Unable to connect to port 22 on 192.168.12.1
I've disabled firewall but nothing changed. What should I do to run this script on windows 10?
-
Hello, just asking to be sure I don't crash my camera: when connecting the camera to a PC via
1. OTG USB
this means I use an USB OTG adapter like this one (https://www.amazon.de/dp/B00LN3LQKQ/ref=sr_1_1_sspa?hvadid=167101981658&hvdev=c&hvlocphy=9043095&hvnetw=g&hvqmt=b&hvrand=10846768857426384431&hvtargid=kwd-296052198162&keywords=usb+otg+adapter&qid=1582031322&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyMEY1Rk0wSzFaTkJDJmVuY3J5cHRlZElkPUEwODY2NzA1RTRTRzVaVVM5UU0wJmVuY3J5cHRlZEFkSWQ9QTAyMzA5ODNZRU02WEhVOE4wMVAmd2lkZ2V0TmFtZT1zcF9hdGYmYWN0aW9uPWNsaWNrUmVkaXJlY3QmZG9Ob3RMb2dDbGljaz10cnVl) and then connect this adapter via a male-male cable to a USB-port of the PC? Never saw such connection yet. Will the PC then become the host?
Thanks! Martin
-
Hello, just asking to be sure I don't crash my camera: when connecting the camera to a PC via
1. OTG USB
this means I use an USB OTG adapter like this one (https://www.amazon.de/dp/B00LN3LQKQ/ref=sr_1_1_sspa?hvadid=167101981658&hvdev=c&hvlocphy=9043095&hvnetw=g&hvqmt=b&hvrand=10846768857426384431&hvtargid=kwd-296052198162&keywords=usb+otg+adapter&qid=1582031322&sr=8-1-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEyMEY1Rk0wSzFaTkJDJmVuY3J5cHRlZElkPUEwODY2NzA1RTRTRzVaVVM5UU0wJmVuY3J5cHRlZEFkSWQ9QTAyMzA5ODNZRU02WEhVOE4wMVAmd2lkZ2V0TmFtZT1zcF9hdGYmYWN0aW9uPWNsaWNrUmVkaXJlY3QmZG9Ob3RMb2dDbGljaz10cnVl) and then connect this adapter via a male-male cable to a USB-port of the PC? Never saw such connection yet. Will the PC then become the host?
Thanks! Martin
I know that a cable like this will work: https://www.amazon.com/Controller-Charger-Durable-Android-Charging/dp/B01GEDOPR0/
I think an OTG cable like the one you linked will work too, but I haven't tried it.
The camera will be the host.
-
Hello nice people,
I was trying to hook the camera to my computer, a Windows 10 machine. Now in this PDF (http://forum.krontech.ca/index.php?action=dlattach;topic=531.0;attach=657) is a guide to mount a network share on Windows, but I can't make it work.
First of all, just to be sure I do things right: I connected the cameras ethernet port directly to my computers ethernet port, is that ok?
If so:
On the "Network" tab in Utils there are three different control groups:
1.: Windows/SMB Network storage
Thats where I put the credential and the mount I created on windows. Now when pressing "Test" I get "SMB share CHRONOS on 192.168.254.4" is not connected. Of course 192.168.254.4 is the fixed IP address for the adapter at my computer, CHRONOS is the user name. When pressing "Apply" I get: "Mount failed: mount: wrong fs type, bad option, bad superblock on //192.168.254.4/smb. Missing codepage or helper program or other error....
2.: NFS Network Share
Did not try that
3.: IP address
Tried 192.168.254.123 hitting "Make/Clear static IP". After that, I am able to ping the camera from the command line at the computer.
I'd really like to directly save footage over network.
What am I doing wrong? Any idea? Thanks!
-
Hello! Someone out there? Did anyone manage to setup a working network mount?
Thanks a lot!
-
We found a couple of bugs in the v0.4.0 voyager release that may have been preventing you from successfully mounting a SMB network share. If you update your camera to the latest release via the software update tool (the about tab should show version 0.4.0~beta38 or later) then should have more success.
You can follow the details in the v0.4.0 beta thread here (http://forum.krontech.ca/index.php?topic=531.msg3073#msg3073)
-
Is it possible to control the camera from your phone using this adapter?
-
Is it possible to control the camera from your phone using this adapter?
It might be possible. However it's way easier to just use the Wifi of your phone and a router/switch in the same network connected to the camera.
-
Is it possible to control the camera from your phone using this adapter?
It might be possible. However it's way easier to just use the Wifi of your phone and a router/switch in the same network connected to the camera.
If you go to shoot in another city, taking a router with you is not very convenient, but connecting the phone directly would be very cool, the phone can also be used as a second monitor.
Do you have a way to check this? I haven't got my camera yet and can't try it out
-
Is it possible to control the camera from your phone using this adapter?
If you can get your phone to work with the adapter, then yes, it should work. However, it probably won't work with your phone. I have a similar adapter, which is not recognized by my android phone. But the adapter works in principle, I've used it with my laptop and camera, and controlling the camera in the phone browser via ethernet works too.
But if you go shooting, you would probably bring a laptop with you anyways, right? Directly connecting camera and laptop via ethernet or micro USB cable (which provides virtual ethernet) works fine with the right IP settings.
-
Is it possible to control the camera from your phone using this adapter?
As LimaKilo said, the main thing is getting your phone to work with the adapter.
If your phone's browser can connect to the camera, and the browser supports Javascript (I think every modern browser would), then it should work.
-
Is it possible to control the camera from your phone using this adapter?
I have a portable wifi-router/access point device (this one in particular but anything similar will work https://www.amazon.ca/Gigastone-Media-Streamer-Plus-Built/dp/B00NHWK01C (https://www.amazon.ca/Gigastone-Media-Streamer-Plus-Built/dp/B00NHWK01C)). You can connect it to your camera by ethernet cable and then connect to the router device wirelessly with your phone or laptop. There are loads of clones that can be found on 'over seas' websites.
They are pretty cheap, keep the cable count down on your rig and isolate your camera from the internet/other devices.
-
Interesting thing, only the reviews are not very good, but you can find something similar. Then it remains to ask the krontech team to make an application for us through which we could manage and watch, it would be much more convenient than going through the browser and entering an IP. Is it possible to make such an app for android and ios?
-
Interesting thing, only the reviews are not very good, but you can find something similar. Then it remains to ask the krontech team to make an application for us through which we could manage and watch, it would be much more convenient than going through the browser and entering an IP. Is it possible to make such an app for android and ios?
No, we won't be making an phone app. There isn't really anything that would be functionally different from the webpage that you get from going to the IP address in a browser.
The webpage is already responsive to the narrow screens of phones and tablets, so it is already usable on a phone or tablet.
If you want to be able to get to the web page more quickly, you can add a shortcut to it directly on your home screen, at least on Android.
-
Unlock your smartphone and connect it to computer via USB cable. Wait for computer to finish driver installation. Sometimes, it may require you to manually install the driver. On your smartphone, it will appear a notification saying that your phone is connecting to computer. Go to USB storage mode. Usually, you can find a removable storage drive. Just navigate to the DCIM folder to get videos from your smartphone. You can upload your videos on instagram, in order to share it with other users. Video content makes a lot of sense for visual brands, thus, when promoting your video, use IGautolike (https://igautolike.com/product/instagram-auto-comments/) ,and automatic views to become popular.
-
I filmed some videos of my newborn a few months ago and I didn't know how to transfer them from my computer to my sister's phone. I wanted to do it via code so it was easier but no apps supported this type of transfer. I decided to install some apps from various websites and try to use them to transfer my videos. A lot of them didn't work but I found https://www.apkdojo.com/vmate (https://www.apkdojo.com/vmate) after some time and it worked properly. It supported transferring via code and I transferred every video successfully.