Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
bac9588
Add css for neoteroi-mkdocs extensions
sindrehan Nov 19, 2025
4a5a519
Add dependency to neoteroi-mkdocs
sindrehan Nov 19, 2025
011d942
Add inline HTTP docs
sindrehan Nov 19, 2025
3dcec3f
Update mkdocstrings to fix deprecation warnings
sindrehan Nov 19, 2025
ddf07fc
Remove the Tags section
sindrehan Nov 19, 2025
8cb939e
Remove the Schemas section
sindrehan Nov 19, 2025
63c2168
Add tag description
sindrehan Nov 19, 2025
8ed0afe
Have examples be open by default
sindrehan Nov 19, 2025
e363cb8
Use new blocks extension for details/admonitions
sindrehan Nov 19, 2025
08ad82f
Update oad templates to new blocks syntax
sindrehan Nov 19, 2025
b7ae8c5
Add link to path for HTTP methods
sindrehan Nov 20, 2025
b082ee7
Add request-parameter template
sindrehan Nov 20, 2025
cb183a7
Use mainline essentials-openapi
sindrehan Nov 20, 2025
20d7b48
Use mainline neoteroi-mkdocs
sindrehan Dec 11, 2025
7ba69f4
Open 200 responses by default
sindrehan Nov 20, 2025
63f17d9
Add tabs for multiple response examples
sindrehan Nov 20, 2025
b62d406
Shorten Schema title
sindrehan Nov 20, 2025
5bd3514
Print response descriptions
sindrehan Nov 21, 2025
533be11
Add template for generating code samples
sindrehan Dec 16, 2025
3df6d80
Remove examples from schema
sindrehan Dec 16, 2025
1d3b46b
Add missing quotes for query parameters
sindrehan Dec 16, 2025
45e5415
Use variables for query parameters as well
sindrehan Dec 16, 2025
2032c30
Add indicator for required query parameters
sindrehan Dec 16, 2025
5f6a2c3
Fix example for POSTing logos
sindrehan Dec 17, 2025
05895a4
Deref SurfaceUnitVersion
sindrehan Dec 17, 2025
adb4556
Fix schema for surface_unit/update
sindrehan Dec 17, 2025
95f28d3
Add link to binlog endpoint
sindrehan Dec 17, 2025
75ff62f
Fix indentation for dive_info example
sindrehan Dec 17, 2025
69b4755
Add link to csv-log-file endpoint
sindrehan Dec 17, 2025
c5d2f72
Fix description for /picture
sindrehan Dec 17, 2025
f1b152c
Change description to example for /asset/logo
sindrehan Dec 17, 2025
31c9623
Don't write response content to file for DELETE
sindrehan Dec 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,831 changes: 1,831 additions & 0 deletions docs/css/mkdocsoad.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/http-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[OAD(http-api.yml)]
277 changes: 153 additions & 124 deletions docs/logs/listing-and-downloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,146 +9,175 @@ When the drone is powered on a new log file is created, where it stores telemetr
## Listing the log files
If your drone has completed 5 dives and you do

=== "Binary logs"
```python
from blueye.sdk import Drone
myDrone = Drone()
print(myDrone.logs)
```

=== "Legacy logs"
```python
from blueye.sdk import Drone
myDrone = Drone()
print(myDrone.legacy_logs)
```
/// tab | Binary logs
```python
from blueye.sdk import Drone
myDrone = Drone()
print(myDrone.logs)
```
///

/// tab | Legacy logs
```python
from blueye.sdk import Drone
myDrone = Drone()
print(myDrone.legacy_logs)
```
///

you should see something like the following lines be printed

=== "Binary logs"
```
Name Time Max depth Size
BYEDP000000_ea9ac92e1817a1d4_00000 07. Aug 2023 12:10 7 m 217.1 KiB
BYEDP000000_ea9ac92e1817a1d4_00001 08. Aug 2023 12:35 20 m 1.6 MiB
BYEDP000000_ea9ac92e1817a1d4_00002 09. Aug 2023 14:20 100 m 3.8 MiB
BYEDP000000_ea9ac92e1817a1d4_00003 10. Aug 2023 09:15 200 m 6.5 MiB
BYEDP000000_ea9ac92e1817a1d4_00004 11. Aug 2023 15:01 300 m 10.2 MiB
/// tab | Binary logs
```
Name Time Max depth Size
BYEDP000000_ea9ac92e1817a1d4_00000 07. Aug 2023 12:10 7 m 217.1 KiB
BYEDP000000_ea9ac92e1817a1d4_00001 08. Aug 2023 12:35 20 m 1.6 MiB
BYEDP000000_ea9ac92e1817a1d4_00002 09. Aug 2023 14:20 100 m 3.8 MiB
BYEDP000000_ea9ac92e1817a1d4_00003 10. Aug 2023 09:15 200 m 6.5 MiB
BYEDP000000_ea9ac92e1817a1d4_00004 11. Aug 2023 15:01 300 m 10.2 MiB

```
The first part of the filename (the part before the _) is the serial number of your drone, the second part is the unique ID of the drone, and the third part is the dive number. In addition we see the start time of the dive, the maximum depth reached, as well as the size of the log file.
```
The first part of the filename (the part before the _) is the serial number of your drone, the second part is the unique ID of the drone, and the third part is the dive number. In addition we see the start time of the dive, the maximum depth reached, as well as the size of the log file.

Max depth is rounded down to the nearest meter for dives up to 10 meters, rounded down to the nearest 10 meters for dives up to 100 meters, and rounded down to the nearest 100 meters for deeper dives.
Max depth is rounded down to the nearest meter for dives up to 10 meters, rounded down to the nearest 10 meters for dives up to 100 meters, and rounded down to the nearest 100 meters for deeper dives.
///

=== "Legacy logs"
```
Name Time Max depth Size
ea9add4d40f69d4-00000.csv 24. Oct 2018 09:40 21.05 m 6.3 MiB
ea9add4d40f69d4-00001.csv 25. Oct 2018 10:29 21.06 m 879.2 KiB
ea9add4d40f69d4-00002.csv 31. Oct 2018 10:05 60.69 m 8.5 MiB
ea9add4d40f69d4-00003.csv 31. Oct 2018 12:13 41.68 m 8.4 MiB
ea9add4d40f69d4-00004.csv 02. Nov 2018 08:59 52.52 m 7.8 MiB
```
/// tab | Legacy logs
```
Name Time Max depth Size
ea9add4d40f69d4-00000.csv 24. Oct 2018 09:40 21.05 m 6.3 MiB
ea9add4d40f69d4-00001.csv 25. Oct 2018 10:29 21.06 m 879.2 KiB
ea9add4d40f69d4-00002.csv 31. Oct 2018 10:05 60.69 m 8.5 MiB
ea9add4d40f69d4-00003.csv 31. Oct 2018 12:13 41.68 m 8.4 MiB
ea9add4d40f69d4-00004.csv 02. Nov 2018 08:59 52.52 m 7.8 MiB
```

The first part of the filename (the part before the -) is the unique ID of your drone and second part is the dive number. In addition we see the start time of the dive, the maximum depth reached, as well as the size of the log file.
The first part of the filename (the part before the -) is the unique ID of your drone and second part is the dive number. In addition we see the start time of the dive, the maximum depth reached, as well as the size of the log file.

The drone will by default filter out logs with a max depth below 20 cm. If you wish to list all logs you can do so by manually refreshing the log index with the `get_all_logs` parameter set to to `True`.
The drone will by default filter out logs with a max depth below 20 cm. If you wish to list all logs you can do so by manually refreshing the log index with the `get_all_logs` parameter set to to `True`.

```python
myDrone.legacy_logs.refresh_log_index(get_all_logs=True)
```
```python
myDrone.legacy_logs.refresh_log_index(get_all_logs=True)
```
///

## Selecting a log file
There are multiple ways to select a log file from the logs index, here are some examples showing how to select by index, by name, and by slice.

!!! example "By index"
=== "Binary logs"
```python
first_log: LogFile = myDrone.logs[0]
last_log: LogFile = myDrone.logs[-1]
```

=== "Legacy logs"
```python
first_log: LegacyLogFile = myDrone.legacy_logs[0]
last_log: LegacyLogFile = myDrone.legacy_logs[-1]
```

!!! example "By name"
=== "Binary logs"
```python
log: LogFile = myDrone.logs["BYEDP000000_ea9ac92e1817a1d4_00000"]
```

=== "Legacy logs"
```python
log: LegacyLogFile = myDrone.legacy_logs["ea9add4d40f69d4-00000.csv"]
```

!!! example "By slice"
=== "Binary logs"
```python
first_three_logs: Logs = myDrone.logs[:3]
every_other_log: Logs = myDrone.logs[::2]
```

=== "Legacy logs"
```python
first_three_logs: List[LegacyLogFile] = myDrone.legacy_logs[:3]
every_other_log: List[LegacyLogFile] = myDrone.legacy_logs[::2]
```
/// admonition | By index
type: example

//// tab | Binary logs
```python
first_log: LogFile = myDrone.logs[0]
last_log: LogFile = myDrone.logs[-1]
```
////

//// tab | Legacy logs
```python
first_log: LegacyLogFile = myDrone.legacy_logs[0]
last_log: LegacyLogFile = myDrone.legacy_logs[-1]
```
////
///

/// admonition | By name
type: example
//// tab | Binary logs
```python
log: LogFile = myDrone.logs["BYEDP000000_ea9ac92e1817a1d4_00000"]
```
////

//// tab | Legacy logs
```python
log: LegacyLogFile = myDrone.legacy_logs["ea9add4d40f69d4-00000.csv"]
```
////
///

/// admonition | By slice
type: example

//// tab | Binary logs
```python
first_three_logs: Logs = myDrone.logs[:3]
every_other_log: Logs = myDrone.logs[::2]
```
////
//// tab | Legacy logs
```python
first_three_logs: List[LegacyLogFile] = myDrone.legacy_logs[:3]
every_other_log: List[LegacyLogFile] = myDrone.legacy_logs[::2]
```
////
///

## Downloading a log file to your computer
When you want to download a log file all you have to do is to call the `download()`
method on the desired log and the file will be downloaded to your current folder.

Following are some examples of how one can download log files.

!!! example "Downloading a single log file"
=== "Binary logs"
The following will download the first log with its default name to the current folder:
```python
myDrone.logs[0].download()
```

If we wish to specify the name/path of the log file we can use the optional `output_path` parameter:
```python
myDrone.logs[0].download(output_path="/tmp/my_log.bez")
```
=== "Legacy logs"
```python
myDrone.legacy_logs[0].download()
```
The `download()` method takes two optional parameters, `output_path` and `output_name`. These specify, respectively, which folder the log is downloaded to and what name it's stored with. So if we want to download the first log to the folder `/tmp` and name it `my_log` we can do

```python
myDrone.legacy_logs[0].download(output_path="/tmp", output_name="my_log")
```

!!! example "Downloading multiple log files"
Downloading multiple log files is solved by a simple Python for-loop. The example below shows how one can download the last 3 logs to the current folder:
=== "Binary logs"
```python
for log in myDrone.logs[:-3]:
log.download()
```
=== "Legacy logs"
```python
for log in myDrone.legacy_logs[:-3]:
log.download()
```

!!! example "Adding a prefix to log names"
The example code below shows how one can add a simple prefix to all log files when downloading:

=== "Binary logs"
```python
prefix = "pre_"
for log in myDrone.logs:
log.download(output_path=prefix+log.name+".bez")
```

=== "Legacy logs"
```python
prefix = "pre_"
for log in myDrone.logs:
log.download(output_name=prefix+log.name)
```
/// admonition | Downloading a single log file
type: example
//// tab | Binary logs
The following will download the first log with its default name to the current folder:
```python
myDrone.logs[0].download()
```

If we wish to specify the name/path of the log file we can use the optional `output_path` parameter:
```python
myDrone.logs[0].download(output_path="/tmp/my_log.bez")
```
////
//// tab | Legacy logs
```python
myDrone.legacy_logs[0].download()
```
The `download()` method takes two optional parameters, `output_path` and `output_name`. These specify, respectively, which folder the log is downloaded to and what name it's stored with. So if we want to download the first log to the folder `/tmp` and name it `my_log` we can do

```python
myDrone.legacy_logs[0].download(output_path="/tmp", output_name="my_log")
```
////
///

/// admonition | Downloading multiple log files
type: example
Downloading multiple log files is solved by a simple Python for-loop. The example below shows how one can download the last 3 logs to the current folder:
//// tab | Binary logs
```python
for log in myDrone.logs[:-3]:
log.download()
```
////
//// tab | Legacy logs
```python
for log in myDrone.legacy_logs[:-3]:
log.download()
```
////
///

/// admonition | Adding a prefix to log names
type: example
The example code below shows how one can add a simple prefix to all log files when downloading:

//// tab | Binary logs
```python
prefix = "pre_"
for log in myDrone.logs:
log.download(output_path=prefix+log.name+".bez")
```
////
//// tab | Legacy logs
```python
prefix = "pre_"
for log in myDrone.logs:
log.download(output_name=prefix+log.name
```
////
///
Loading
Loading