Commit Graph

27 Commits

Author SHA1 Message Date
Christian Baars
9340e218bd
Berry: improve cam module and img class (#24128) 2025-11-18 10:42:43 +01:00
Theo Arends
ddc1439edf Fix webcam updatestats 2025-03-22 10:23:15 +01:00
DavidPletcher
3827bca3cc
remove malformed clutter from webcam status0 JSON response (#23177)
A regression was added in commit 01154e949, which prepends
clutter to the status0 JSON status message.

Example:
```
$ curl 'http://webcam/cm?cmnd=Status0' -u admin:password ; echo
{s}Webcam Frame rate{m}0 FPS{e}{"Status":{"Module":0,"DeviceName":"...
```

The response is not properly formatted JSON and breaks client software.

The problem occurs because a new case statement was added for the
purpose of injecting webcam stats into the JSON status message, but
a break statement is missing and execution falls through to the
following case, which prepends garbage to the output buffer.

With this one-line fix in place, the output is properly formatted:
```
$ curl 'http://tahoe-front-door-cam/cm?cmnd=Status0' -u admin:password ; echo
{"Status":{"Module":0,"DeviceName":"
```

Note that the prior case for FUNC_EVERY_SECOND is also missing a break
statement. That looks wrong to me but it's unrelated to fixing this
issue and I'm inclined to punt that concern to others who are more
familiar with this code.
2025-03-22 08:18:01 +01:00
Theo Arends
871723b6f7 Update changelogs regarding ESP32 Webcam resolution changes since v14.4.0 (#22901) 2025-02-17 14:16:52 +01:00
anishsane
5ac1fdb8fe
Added "cam":1 in the discovery message, so that we can create a home assistant camera (#22818)
* Added "cam":1 in the discovery message, so that we can create a home assistant camera.

* Update tasmota/tasmota_xdrv_driver/xdrv_12_discovery.ino

Co-authored-by: Erik Kunze <eku@users.noreply.github.com>

* Rearrange the newly added field by size, for better packing.

---------

Co-authored-by: Erik Kunze <eku@users.noreply.github.com>
2025-01-16 16:40:37 +01:00
anishsane
01154e9497
Add Webcam stats as sensors. (Can be used in home assistant.) (#22744) 2025-01-01 14:21:48 +01:00
Theo Arends
8311bff7ee Fix Webcam compilation with define USE_WEBCAM but without define ENABLE_RTSPSERVER (#22686) 2024-12-20 11:07:52 +01:00
s-hadinger
b89909991c
i2c_enabled refactored as array (#22387) 2024-10-30 22:23:13 +01:00
Christian Baars
7cb8a3f968
Berry: add cam module, img class (#21743)
* cam module, img class
2024-07-07 19:50:33 +02:00
Theo Arends
adcc50ac6e Revert "Fix network flushes"
This reverts commit b88ec44d15.
2024-05-29 16:44:50 +02:00
Theo Arends
b88ec44d15 Fix network flushes 2024-05-29 14:09:54 +02:00
Theo Arends
21c7edcb50 Add display of active drivers using command `status 4` 2023-12-27 22:03:56 +01:00
protectivedad
11e9b7375d
The webserver for the esp32-cam stream doesn't get started automatically. (#19905)
This ensures that it does start when the WcStream (or WcInterrupt) are run.

Co-authored-by: Anthony Sepa <protectivedad@gmail.com>
2023-11-03 16:02:42 +01:00
btsimonh
c9b5e5ab1f
Add new webcam driver over latest dev. (#19280)
* Add new webcam driver over latest dev. To use the old one, define USE_WEBCAM_LAGACY

* enable build without RTSP.
check pin_pwdn before using it n 0x105!!!

* more fixes around pwdn.  Make wcresolution -1 set the resoltuion setting to 'disbale cam' value (15).

* fix task stop - wait for debug to leave-> prevents guru. pin task to core 0.

* split motion from other code.  Add USE_WEBCAM_MOTION to control inclusion of motion code (big hit). Change from using USE_WEBCAM_LEGACY to USE_WEBCAM_V2

* logging minimisation - behind WEBCAM_DEV_DEBUG
2023-08-22 08:24:05 +02:00
btsimonh
f8b26a90f6
Add mutex to many camera functions. (#18655)
* Add mutex to many camera functions.

* Allow stream to continue after wcinit command (and other commands which reconfigure).

* Adust retries on camera init, specifically log success if it retried.
Shorten messages to save rom.
I have seen fail of 0x103 and 0x20002 succeed on second try.
2023-05-16 12:21:25 +02:00
Theo Arends
7cad4f95b6 Enable I2c on webcam 2023-05-14 14:42:11 +02:00
Jason2866
0bf27e70fe
fix logic when init cam was successful (#18653) 2023-05-14 14:08:53 +02:00
Christian Baars
79a826a206
Update xdrv_81_esp32_webcam.ino (#18637) 2023-05-11 09:28:33 +02:00
Christian Baars
cf60e34578
fix webcam init for some cases (#18606)
Co-authored-by: Christian Baars <christianbaars@MacBook-Pro-von-Christian.local>
2023-05-08 09:57:00 +02:00
gemu
ae8041140f
Webcam fix (#17840)
* Update xdrv_81_esp32_webcam.ino

* fix single picture fetch

* delay not needed
2023-01-31 22:22:28 +01:00
Theo Arends
c1ea8953cb Refactor uint8_t to uint32_t 2022-11-11 10:44:56 +01:00
Christian Baars
1378d57377 allow webcam to reuse and share I2C bus 2 2022-10-29 20:13:00 +02:00
Theo Arends
2dec4ac057 Add clock change execution to webcam 2022-10-14 13:54:37 +02:00
Theo Arends
2ad018816b Add command `WcClock 10..200`
Add command ``WcClock 10..200`` set webcam clock in MHz. Default is 20
2022-10-13 17:58:16 +02:00
Jason2866
7e12fbbb6d
abort webcam if no pin config
avoids crashing if no valid config is provided
2022-10-13 11:54:27 +02:00
Jason2866
8ff3438979
add more cams via .h file (#310) 2022-09-10 12:54:28 +02:00
Theo Arends
c08561f67c Bump version to v11.1.0.4
- Restructure tasmota
2022-06-02 14:17:39 +02:00