Krontalk

Chronos => Software Dev => Topic started by: ieSe on April 30, 2020, 06:28:05 AM

Title: Chronos API Documentation
Post by: ieSe on April 30, 2020, 06:28:05 AM
Hi I'm using Chronos 1.4 32GB Build: 0.4.0~beta38 in a research project and I'm really satisfied with the API. As I use Matlab to control the whole operation. Now I'm able to start - stop recording, changing parameters and even make black calibration. But I'm still facing some problems:


Thank you.
Title: Re: Chronos API Documentation
Post by: skronstein on April 30, 2020, 09:19:47 PM
Hi I'm using Chronos 1.4 32GB Build: 0.4.0~beta38 in a research project and I'm really satisfied with the API. As I use Matlab to control the whole operation. Now I'm able to start - stop recording, changing parameters and even make black calibration. But I'm still facing some problems:

  • I can't get the available storage in my SD card. I can't get any useful data from externalStorage parameter and this information is not even exist in the web UI (image 1). Although I can find the available size in the camera UI (image 2).
  • Parameter disableRingBuffer which is responsible for not overwriting when the buffer is full and automatically stop recording dose not work when changed to true.
  • Bug: I can start recording while the camera is saving a video. That could lead to unexpected behavior.
  • To fix bug number 3 is there any parameter, that would store the camera status so i can check it before do any operation?

Thank you.

1.
You'll have to switch to the unstable software release to get the size and free space of the storage devices.
The easiest way to switch to the unstable repository is probably to flash an SD card with the latest unstable image. Compressed SD card images can be found here: http://debian.krontech.ca/builds/
A guide on how to flash the card can be found here: http://forum.krontech.ca/index.php?topic=531.0

With the latest software on unstable, you should be able to get the capacity and free space of a storage device by sending a GET request for that device.

For the first partition on an SD card, use the URL:
http://<Camera IP address>/cgi-bin/storageInfo?mmcblk1p1

For the first partition on an USB stick, use the URL:
http://<Camera IP address>/cgi-bin/storageInfo?sda1


2. and 3.
Thanks, I've reported these bugs. The Unstable release will receive fixes before the Voyager (stable) release does.


4.
You can check videoState here to see if the camera is currently saving:
https://github.com/krontech/pychronos#display-parameters
Title: Re: Chronos API Documentation
Post by: ieSe on May 01, 2020, 04:10:07 AM
1.
You'll have to switch to the unstable software release to get the size and free space of the storage devices.
The easiest way to switch to the unstable repository is probably to flash an SD card with the latest unstable image. Compressed SD card images can be found here: http://debian.krontech.ca/builds/
A guide on how to flash the card can be found here: http://forum.krontech.ca/index.php?topic=531.0

With the latest software on unstable, you should be able to get the capacity and free space of a storage device by sending a GET request for that device.

For the first partition on an SD card, use the URL:
http://<Camera IP address>/cgi-bin/storageInfo?mmcblk1p1

For the first partition on an USB stick, use the URL:
http://<Camera IP address>/cgi-bin/storageInfo?sda1


2. and 3.
Thanks, I've reported these bugs. The Unstable release will receive fixes before the Voyager (stable) release does.

Thank you for your fast replying. I think I will wait until the release of the new unstable version to check them all.

4.
You can check videoState here to see if the camera is currently saving:
https://github.com/krontech/pychronos#display-parameters
As I mentioned above, I'm using Matlab and I'm not preferring to change my project to python. Because I control another equipment from Matlab either. Is there any other request that I can send to camera server to get the status? 
Title: Re: Chronos API Documentation
Post by: NiNeff on May 01, 2020, 05:30:03 AM
4.
You can check videoState here to see if the camera is currently saving:
https://github.com/krontech/pychronos#display-parameters
As I mentioned above, I'm using Matlab and I'm not preferring to change my project to python. Because I control another equipment from Matlab either. Is there any other request that I can send to camera server to get the status?
As i understand it you'd have to run the pychronos script on the camera itself, not externally. You should therefore be able to create a hook for your matlab-code to connect to.
Title: Re: Chronos API Documentation
Post by: ieSe on May 01, 2020, 06:06:53 AM
4.
You can check videoState here to see if the camera is currently saving:
https://github.com/krontech/pychronos#display-parameters
As i understand it you'd have to run the pychronos script on the camera itself, not externally. You should therefore be able to create a hook for your matlab-code to connect to.
My bad. I found the right parameters in <http://<camerIP>/apidoc/>, which are state and videoState. Thanks
Title: Re: Chronos API Documentation
Post by: ieSe on May 03, 2020, 07:51:52 AM
1.
You'll have to switch to the unstable software release to get the size and free space of the storage devices.
The easiest way to switch to the unstable repository is probably to flash an SD card with the latest unstable image. Compressed SD card images can be found here: http://debian.krontech.ca/builds/
A guide on how to flash the card can be found here: http://forum.krontech.ca/index.php?topic=531.0

With the latest software on unstable, you should be able to get the capacity and free space of a storage device by sending a GET request for that device.

For the first partition on an SD card, use the URL:
http://<Camera IP address>/cgi-bin/storageInfo?mmcblk1p1

For the first partition on an USB stick, use the URL:
http://<Camera IP address>/cgi-bin/storageInfo?sda1

Hi

I installed the new unstable version chronos-unstable-20200502.img and now I can get all SD card info. disableRingBuffer Parameter still not responding.

As I use the camera always for monitoring over the network, I found the same bug in different software versions:
chronos-unstable-20200328.img, chronos-unstable-20200502.img, chronos-voyager-20200302.img and even chronos-voyager-20200331.img

Bug: Black screen appears after Chronos logo at starting up when it connected with the Ethernet cable to the router. I have to force the camera to power off each time.
Title: Re: Chronos API Documentation
Post by: sanjay on May 11, 2020, 10:10:21 AM
Hi ieSe, sorry the for late reply on this one.

Just wondering what the speed of your networking equipment is?

We've noticed a bug that stops the display from initializing correctly due to how the SoC in the camera currently handles networking initialization on 10/100 Mbps equipment.

It is not an issue on Gigabit equipment, and we are looking into it to determine if there's a fix.
Title: Re: Chronos API Documentation
Post by: ieSe on May 11, 2020, 03:54:26 PM
Hi ieSe, sorry the for late reply on this one.

Just wondering what the speed of your networking equipment is?

We've noticed a bug that stops the display from initializing correctly due to how the SoC in the camera currently handles networking initialization on 10/100 Mbps equipment.

It is not an issue on Gigabit equipment, and we are looking into it to determine if there's a fix.

Hi

If I understood your question correctly, I'm using TP-Link wireless router 300 Mbps
Title: Re: Chronos API Documentation
Post by: sanjay on May 11, 2020, 04:36:43 PM
Thanks for the info. From a quick look at the TP link website, I see that their 300 Mbps Wireless router has LAN ports that operate at 10/100 Mbps speeds. https://www.tp-link.com/ca/home-networking/wifi-router/tl-wr841n/#specifications (https://www.tp-link.com/ca/home-networking/wifi-router/tl-wr841n/#specifications)

The best way to work around the issue of the camera not wanting to boot when connected to the router would be to use a gigabit (10/100/1000) switch. Apologies for any inconveniences here. I'm working to find a possible fix, but it will likely take a few weeks before an update is available.