Skip to content

Commit

Permalink
Update documentation for delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
remibert committed Apr 9, 2022
1 parent 9820019 commit 47c24ce
Show file tree
Hide file tree
Showing 46 changed files with 2,969 additions and 1,679 deletions.
38 changes: 30 additions & 8 deletions doc/CAMFLASHER.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,30 @@ Camflasher with shell commands **importer** and **exporter**, allows to inject o

- Download the firmware associated with your device :

- [ESP32-CAM, ESP32-CAM-MB](https://github.com/remibert/pycameresp/releases/download/V4/ESP32CAM-firmware.bin)
- [ESP32-CAM, ESP32-CAM-MB, ESP32ONE, M5Stack Camera](https://github.com/remibert/pycameresp/releases/download/V5/ESP32CAM-firmware.bin)

- [ESP32-NODEMCU, LOLIN32, ESP32 without SPIRAM](https://github.com/remibert/pycameresp/releases/download/V5/GENERIC-firmware.bin)

- [ESP32-TTGO-T8 or ESP32 with SPIRAM ](https://github.com/remibert/pycameresp/releases/download/V5/GENERIC_SPIRAM-firmware.bin)

- Or download the zip for standard micropython firmware.

- [Shell with editor for RP2 pico Pi](https://github.com/remibert/pycameresp/releases/download/V5/shell.zip)

- [Wifi manager, Http server](https://github.com/remibert/pycameresp/releases/download/V5/server.zip)

It is possible to run the shell with editor, or the servers on a standard micropython platform. The servers, the wifi manager, requires having enough ram and wifi support (ESP32 with SPIRAM for example). Unzip archive and install it with rshell.

- [ESP32-NODEMCU, LOLIN32, ESP32 without SPIRAM ](https://github.com/remibert/pycameresp/releases/download/V4/GENERIC-firmware.bin)

- [ESP32-TTGO-T8 or ESP32 with SPIRAM ](https://github.com/remibert/pycameresp/releases/download/V4/GENERIC_SPIRAM-firmware.bin)

- Download the camflasher application and unzip it :
- [CamFlasher for Windows 10 64 bits](https://github.com/remibert/pycameresp/releases/download/V4/CamFlasher_win10_64.zip)
- [CamFlasher for Windows 10 64 bits](https://github.com/remibert/pycameresp/releases/download/V5/CamFlasher_windows_10_64.zip)

- [CamFlasher for Windows seven 64 bits](https://github.com/remibert/pycameresp/releases/download/V4/CamFlasher_win7_64.zip)
- [CamFlasher for Windows seven 64 bits](https://github.com/remibert/pycameresp/releases/download/V5/CamFlasher_win7_64.zip)

- [CamFlasher for OSX Big Sur Intel](https://github.com/remibert/pycameresp/releases/download/V4/CamFlasher_osx.zip)
- [CamFlasher for OSX Big Sur Intel](https://github.com/remibert/pycameresp/releases/download/V5/CamFlasher_osx.zip)

- [CamFlasher for Debian x86_64](https://github.com/remibert/pycameresp/releases/download/V4/CamFlasher_linux.zip)
- [CamFlasher for Debian x86_64](https://github.com/remibert/pycameresp/releases/download/V5/CamFlasher_linux.zip)

- Connect the device to the USB port of your computer.

Expand Down Expand Up @@ -126,6 +136,10 @@ To do this work permanently, it is necessary to configure your internet box, so

![Example of orange box](/images/10_CamFlasher_NamingSmartphone.png)

# Specific configuration
- For M5Stack with camera, edit the main.py and change the device="ESP32CAM" by device="M5CAMERA-B".
- For Esp32ONE, edit the main.py and change the device="ESP32CAM" by device="ESP32ONE".

# Shell access

On the CamFlasher application, when the device has finished booting, press any key on the keyboard.
Expand All @@ -148,4 +162,12 @@ You can also execute directly from the text editor, the script being edited with

All this is done directly from the device.

[See text editor](/doc/EDITOR.md)
[See text editor](/doc/EDITOR.md)

# Console configuration

You can change the console display colors, as well as the character font. See Console/Option menu.

![Option](/images/14_CamFlasher_Option.jpg)

The working directory, allows you to locate the directory on your computer to exchange files. By using the "exporter" command from the shell, you send the files or the file tree to your computer. The "importer" command is used to inject the files located in this working directory onto the device. The "-r" option offers recursion. Wildcard are supported for these commands.
2 changes: 2 additions & 0 deletions doc/REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Below are the devices compatible with pycameresp :
![ESP32CAM-MB](/images/Device_ESP32CAM-MB.jpg "ESP32CAM-MB")
![NODEMCU](/images/Device_NODEMCU.jpg "NODE MCU") ![LOLIN32](/images/Device_LOLIN32.jpg "LOLIN32")
![TTGO](/images/Device_TTGO.jpg "TTGO")
![ESP32ONE](/images/Device_ESP32ONE.jpg "ESP32ONE")
![M5StackCamera](/images/Device_M5StackCamera.jpg "M5StackCamera")
268 changes: 164 additions & 104 deletions doc/lib/motion/historic.html

Large diffs are not rendered by default.

100 changes: 76 additions & 24 deletions doc/lib/motion/motion.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>
# Notify motion state change
self.notify_state = True

# Permanent detection without notification.
# To keep all motion detection in the presence of occupants
self.permanent_detection = False

# Empty mask is equal disable masking
self.mask = b&#34;&#34;

Expand All @@ -97,11 +101,11 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>
self.motion_id = None
self.date = strings.date_to_string()
self.filename = strings.date_to_filename()
path = strings.date_to_path()[:-1]
if path[-1] in [0x30,0x31,0x32]:
path = path[:-1] + b&#34;00&#34;
path = strings.date_to_path()
if path[-1] in [0x30,0x31,0x32,0x33,0x34]:
path = path[:-1] + b&#34;0&#34;
else:
path = path[:-1] + b&#34;30&#34;
path = path[:-1] + b&#34;5&#34;
self.path = path
self.motion_detected = False
self.config = config
Expand Down Expand Up @@ -552,9 +556,10 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>
self.release_image()

# If the motion detection activated
if await self.is_activated():
activated = await self.is_activated()
if activated or self.is_pemanent():
# Capture motion
result = await self.capture()
result = await self.capture(activated)
else:
if self.motion:
self.motion.stop_light()
Expand Down Expand Up @@ -605,6 +610,16 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>
await uasyncio.sleep_ms(500)
return result

def is_pemanent(self):
&#34;&#34;&#34; Indicates if pemanent detection activated &#34;&#34;&#34;
result = False
# If motion activated
if self.motion_config.activated:
# If detection permanent without notification activated
if self.motion_config.permanent_detection:
result = True
return result

async def init_motion(self):
&#34;&#34;&#34; Initialize motion detection &#34;&#34;&#34;
firstInit = False
Expand Down Expand Up @@ -637,7 +652,7 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>
if self.motion.index %30 == 0:
collect()

async def capture(self):
async def capture(self, activated):
&#34;&#34;&#34; Capture motion &#34;&#34;&#34;
result = False

Expand All @@ -657,8 +672,8 @@ <h1 class="title">Module <code>lib.motion.motion</code></h1>
# Capture motion image
self.detection = await self.motion.capture()

# If motion detected
if self.detection is not None:
# If motion detected and detection activated
if self.detection is not None and activated is True:
# Notify motion with push over
message, image = self.detection
if self.motion_config.notify:
Expand Down Expand Up @@ -845,9 +860,10 @@ <h2 class="section-title" id="header-classes">Classes</h2>
self.release_image()

# If the motion detection activated
if await self.is_activated():
activated = await self.is_activated()
if activated or self.is_pemanent():
# Capture motion
result = await self.capture()
result = await self.capture(activated)
else:
if self.motion:
self.motion.stop_light()
Expand Down Expand Up @@ -898,6 +914,16 @@ <h2 class="section-title" id="header-classes">Classes</h2>
await uasyncio.sleep_ms(500)
return result

def is_pemanent(self):
&#34;&#34;&#34; Indicates if pemanent detection activated &#34;&#34;&#34;
result = False
# If motion activated
if self.motion_config.activated:
# If detection permanent without notification activated
if self.motion_config.permanent_detection:
result = True
return result

async def init_motion(self):
&#34;&#34;&#34; Initialize motion detection &#34;&#34;&#34;
firstInit = False
Expand Down Expand Up @@ -930,7 +956,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
if self.motion.index %30 == 0:
collect()

async def capture(self):
async def capture(self, activated):
&#34;&#34;&#34; Capture motion &#34;&#34;&#34;
result = False

Expand All @@ -950,8 +976,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
# Capture motion image
self.detection = await self.motion.capture()

# If motion detected
if self.detection is not None:
# If motion detected and detection activated
if self.detection is not None and activated is True:
# Notify motion with push over
message, image = self.detection
if self.motion_config.notify:
Expand Down Expand Up @@ -985,15 +1011,15 @@ <h2 class="section-title" id="header-classes">Classes</h2>
<h3>Methods</h3>
<dl>
<dt id="lib.motion.motion.Detection.capture"><code class="name flex">
<span>async def <span class="ident">capture</span></span>(<span>self)</span>
<span>async def <span class="ident">capture</span></span>(<span>self, activated)</span>
</code></dt>
<dd>
<div class="desc"><p>Capture motion</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">async def capture(self):
<pre><code class="python">async def capture(self, activated):
&#34;&#34;&#34; Capture motion &#34;&#34;&#34;
result = False

Expand All @@ -1013,8 +1039,8 @@ <h3>Methods</h3>
# Capture motion image
self.detection = await self.motion.capture()

# If motion detected
if self.detection is not None:
# If motion detected and detection activated
if self.detection is not None and activated is True:
# Notify motion with push over
message, image = self.detection
if self.motion_config.notify:
Expand Down Expand Up @@ -1065,9 +1091,10 @@ <h3>Methods</h3>
self.release_image()

# If the motion detection activated
if await self.is_activated():
activated = await self.is_activated()
if activated or self.is_pemanent():
# Capture motion
result = await self.capture()
result = await self.capture(activated)
else:
if self.motion:
self.motion.stop_light()
Expand Down Expand Up @@ -1158,6 +1185,26 @@ <h3>Methods</h3>
return result</code></pre>
</details>
</dd>
<dt id="lib.motion.motion.Detection.is_pemanent"><code class="name flex">
<span>def <span class="ident">is_pemanent</span></span>(<span>self)</span>
</code></dt>
<dd>
<div class="desc"><p>Indicates if pemanent detection activated</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def is_pemanent(self):
&#34;&#34;&#34; Indicates if pemanent detection activated &#34;&#34;&#34;
result = False
# If motion activated
if self.motion_config.activated:
# If detection permanent without notification activated
if self.motion_config.permanent_detection:
result = True
return result</code></pre>
</details>
</dd>
<dt id="lib.motion.motion.Detection.load_config"><code class="name flex">
<span>def <span class="ident">load_config</span></span>(<span>self)</span>
</code></dt>
Expand Down Expand Up @@ -1261,11 +1308,11 @@ <h3>Methods</h3>
self.motion_id = None
self.date = strings.date_to_string()
self.filename = strings.date_to_filename()
path = strings.date_to_path()[:-1]
if path[-1] in [0x30,0x31,0x32]:
path = path[:-1] + b&#34;00&#34;
path = strings.date_to_path()
if path[-1] in [0x30,0x31,0x32,0x33,0x34]:
path = path[:-1] + b&#34;0&#34;
else:
path = path[:-1] + b&#34;30&#34;
path = path[:-1] + b&#34;5&#34;
self.path = path
self.motion_detected = False
self.config = config
Expand Down Expand Up @@ -2374,6 +2421,10 @@ <h3>Methods</h3>
# Notify motion state change
self.notify_state = True

# Permanent detection without notification.
# To keep all motion detection in the presence of occupants
self.permanent_detection = False

# Empty mask is equal disable masking
self.mask = b&#34;&#34;</code></pre>
</details>
Expand Down Expand Up @@ -2662,6 +2713,7 @@ <h4><code><a title="lib.motion.motion.Detection" href="#lib.motion.motion.Detect
<li><code><a title="lib.motion.motion.Detection.detect" href="#lib.motion.motion.Detection.detect">detect</a></code></li>
<li><code><a title="lib.motion.motion.Detection.init_motion" href="#lib.motion.motion.Detection.init_motion">init_motion</a></code></li>
<li><code><a title="lib.motion.motion.Detection.is_activated" href="#lib.motion.motion.Detection.is_activated">is_activated</a></code></li>
<li><code><a title="lib.motion.motion.Detection.is_pemanent" href="#lib.motion.motion.Detection.is_pemanent">is_pemanent</a></code></li>
<li><code><a title="lib.motion.motion.Detection.load_config" href="#lib.motion.motion.Detection.load_config">load_config</a></code></li>
<li><code><a title="lib.motion.motion.Detection.refresh_config" href="#lib.motion.motion.Detection.refresh_config">refresh_config</a></code></li>
<li><code><a title="lib.motion.motion.Detection.release_image" href="#lib.motion.motion.Detection.release_image">release_image</a></code></li>
Expand Down
13 changes: 6 additions & 7 deletions doc/lib/server/ftpservercore.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ <h1 class="title">Module <code>lib.server.ftpservercore</code></h1>
&#34;&#34;&#34; Ftp server implementation core class &#34;&#34;&#34;
import socket
import os
import time
import uos
from server import stream
from server.server import Server
Expand Down Expand Up @@ -106,7 +105,7 @@ <h1 class="title">Module <code>lib.server.ftpservercore</code></h1>
if full:
file_permissions = b&#34;drwxr-xr-x&#34; if (typ &amp; 0xF000 == 0x4000) else b&#34;-rw-r--r--&#34;

d = time.localtime(date)
d = strings.local_time(date)
year,month,day,hour,minute,_,_,_ = d[:8]

if year != now[0] and month != now[1]:
Expand Down Expand Up @@ -159,7 +158,7 @@ <h1 class="title">Module <code>lib.server.ftpservercore</code></h1>

def send_file_list(self, path, stream_, full):
&#34;&#34;&#34; Send the list of file &#34;&#34;&#34;
now = time.localtime()
now = strings.local_time()
try:
self.send_file_list_with_pattern(path, stream_, full, now)
except Exception as err:
Expand Down Expand Up @@ -571,7 +570,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
if full:
file_permissions = b&#34;drwxr-xr-x&#34; if (typ &amp; 0xF000 == 0x4000) else b&#34;-rw-r--r--&#34;

d = time.localtime(date)
d = strings.local_time(date)
year,month,day,hour,minute,_,_,_ = d[:8]

if year != now[0] and month != now[1]:
Expand Down Expand Up @@ -624,7 +623,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>

def send_file_list(self, path, stream_, full):
&#34;&#34;&#34; Send the list of file &#34;&#34;&#34;
now = time.localtime()
now = strings.local_time()
try:
self.send_file_list_with_pattern(path, stream_, full, now)
except Exception as err:
Expand Down Expand Up @@ -1493,7 +1492,7 @@ <h3>Methods</h3>
if full:
file_permissions = b&#34;drwxr-xr-x&#34; if (typ &amp; 0xF000 == 0x4000) else b&#34;-rw-r--r--&#34;

d = time.localtime(date)
d = strings.local_time(date)
year,month,day,hour,minute,_,_,_ = d[:8]

if year != now[0] and month != now[1]:
Expand Down Expand Up @@ -1625,7 +1624,7 @@ <h3>Methods</h3>
</summary>
<pre><code class="python">def send_file_list(self, path, stream_, full):
&#34;&#34;&#34; Send the list of file &#34;&#34;&#34;
now = time.localtime()
now = strings.local_time()
try:
self.send_file_list_with_pattern(path, stream_, full, now)
except Exception as err:
Expand Down
Loading

0 comments on commit 47c24ce

Please sign in to comment.