Commit Graph

216 Commits

Author SHA1 Message Date
Tyeth Gundry 2ed602057c
Add SEN5X to I2C devices (#17736) 2023-01-29 08:06:25 +01:00
David Gwynne 17d68750d9
WIP Tuya MCU Bridge driver alternative to the TuyaMCU driver (#17626)
* WIP Tuya MCU Bridge driver alternative to the TuyaMCU driver

The main difference is this driver does not try and wire MCU data points
(Dps) into the tasmota power/light/etc controls. Instead each Dp ends up
being relayed directly to MQTT and the rules subsystem. If you want to
change the state of something wired up to the MCU, you send tuyamcu
specific commands to manipulate the Dp.

Each Dp gets a type and id specific topic that is sent to MQTT. eg, Dp
id 1 type bool looks like tele/%topic%/TUYAMCUBOOL1. To change state you
send a TuyaMCUBool1 command (ie, the command index value is used as the
DpId, which is nice and symmetrical) with the new value.

Currently Rules operate on TuyaMCU#TypeDpid things, eg, "rule1 on
TuyaMCU#Bool1 do power %value% endon" toggle the power on the tasmota
device when the state of the thing on the MCU changes too.

The most obviously missing stuff at the moment is:

- better relaying of the wifi/mqtt status to the MCU
- handling wifi reset requests from the MCU
- low power stuff?
- support for sending status updates and device info queries.
- restarting the tuya mcu state machine?
- restarting the rx state machine when no bytes are rxed for a period of
  time
- time sync

* shorten the log prefix to TYB (3 chars).

requested by arendst

* use the local definition for the SET_DP command.

reaching back to the existing tuyamcu code isnt reliable.

pointed out by arendst

* put the todo list in the code so it can be tracked

* check the wifi/mqtt state every second and update the mcu if it changes.

* fix rule processing when Dp state is changed from a cmnd.

rule processing was done as part of publishing the state, but publishing
the state when it was updated by a command only happened if So59 was
set. split rule processing out of publish and call them separately as
needed.

publish is now called from teleperiod, status updates from the MCU,
and from cmnds if so59 is set. rules are called from status updates from
the MCU and from cmnds.

Co-authored-by: David Gwynne <dlg@defeat.lan.animata.net>
2023-01-08 17:35:45 +01:00
Theo Arends 14ee8decf7 Update changelogs
Add support for PCA9632 4-channel 8-bit PWM driver as light driver by Pascal Heinrich (#17557)
2023-01-01 14:29:41 +01:00
Theo Arends 20a50ffc2e Revert Tuya rewrite
- Update changelogs
2022-12-31 16:08:59 +01:00
Mathias fc8039d960
Adding support for ME007-ULS narrow FoV ultrasonic distance sensor (#17376)
* Squashed commit of the following:

commit 1441459a47cff0a43aa61ce47510585ee03649f3
Merge: a9fcbd342 7e27945e5
Author: Mathias Buder <mathias_buder@bose.com>
Date:   Tue Dec 13 09:00:06 2022 +0100

    Merge branch 'development' into me007-narrow-fov-ultrasonic-sensor

commit a9fcbd3428445eb914816f608e064568d16b41e9
Merge: 7bb1049f5 d83119897
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Dec 12 10:33:06 2022 +0100

    Merge branch 'development' into me007-narrow-fov-ultrasonic-sensor

commit 7bb1049f51da8d064462b9499ed479a7675b368e
Merge: 83a5afa7a eee86f01a
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Fri Dec 9 09:30:29 2022 +0100

    Merge remote-tracking branch 'github/development' into me007-narrow-fov-ultrasonic-sensor

commit 83a5afa7ad27fcde1e67008e41a9bfd9c680cccd
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 8 14:47:13 2022 +0100

    [ME007] Added driver version number to MQTT message, small delay between consecutive measurement

commit 9b8667843154f02a23020e655d806ed76ae2e530
Merge: 39180f345 de408921e
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 8 10:12:45 2022 +0100

    Merge branch 'development' into me007-narrow-fov-ultrasonic-sensor

commit 39180f3451fce5f06504195faea0124d73dac1ee
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Wed Dec 7 16:41:26 2022 +0100

    [ME007] Added median filter

commit 01b68e0e6ca147ac03b63b8c71d035563e3bf13b
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Dec 5 23:08:57 2022 +0100

    [ME007] Simplified state maschine within me007_measure()

commit 1c74c6ed3e4097f09792a48420b2016c92e10353
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Dec 5 22:21:16 2022 +0100

    [ME007] Fixed issues from previous pull-request

commit 25b667120fd8d70fcfed36de44f1b7a17d0686be
Merge: 01e0b1809 e7d40b8d1
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Dec 5 10:46:25 2022 +0100

    Merge branch 'development' into me007-narrow-fov-ultrasonic-sensor

    # Conflicts:
    #	tasmota/include/tasmota_template.h

commit 01e0b18096bfffc67673e25152114694caaf110a
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Sun Dec 4 20:53:39 2022 +0100

    [ME007] Minor changes

commit ec00c9b85d223b78586c464bb92d1c7894357a40
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Fri Dec 2 13:08:06 2022 +0100

    [ME007] Added some measurement error statistics

commit c5cf65f82c42195752a88fd1553c74ab68c39cb2
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 22:38:07 2022 +0100

    [ME007] Fixed MQTT message

commit ae07d8dd77db47e20578f655ec057a63b30e65ce
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 21:56:20 2022 +0100

    [ME007] Minor code refactoring

commit d2b43ca70c716e1b637b9efd3b536506233e5365
Merge: 292f5f6c8 816fd78fb
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 16:48:38 2022 +0100

    Merge branch 'development' into me007-narrow-fov-ultrasonic-sensor

commit 292f5f6c81f1659eb225271cdd025eb77da02c6f
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 16:47:03 2022 +0100

    [ME007] Added logic to detect sensor at boot and during runtime

commit f17af404fee76bf63b30ed3c9d2175c4e01c03ca
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 12:32:19 2022 +0100

    [ME007] Added missing define into language files

commit 7a271abeca36139a43ef96bd461d46ba0c662901
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 12:19:23 2022 +0100

    [ME007] Improved snesor measuremnt function

commit fe42ebd1124e2246e4d7afd63c905c251e084b27
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Thu Dec 1 00:43:13 2022 +0100

    [ME007] Updated state maschine to trigger and receive sensor measurements

commit d137e6dec5104b4716428849d99c68bbf407ab42
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Wed Nov 30 20:35:31 2022 +0100

    [ME007] Added initial state maschine to trigger and receive sensor measurements

commit fc3da7b36849df162d9d5496a763ab2beb096aff
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Tue Nov 29 21:28:28 2022 +0100

    [ME007] Updated pin name

commit e9fa9fb771cf15dcd9ed8b63b9194154543ef10e
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Nov 28 22:02:34 2022 +0100

    [ME007] Fixed issue that sensor GPIOs not shown in drop-down list

commit a13e42660183eb4ab91007ca0ea6bf1544687556
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Nov 28 15:06:34 2022 +0100

    [ME007] Added sensor into supported feature list

commit dec17b59ce2905124386f8c90d81656bf104c844
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Nov 28 15:01:58 2022 +0100

    [ME007] Removed log message in Xsns23()

commit 11f479d2ec9d3f4e7552c2f78cdc83914c5b8b94
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Mon Nov 28 10:47:55 2022 +0100

    [ME007] Added GPIOs to tasmota_template_legacy.h and berry

commit 23aec8e5ff4e9fb8ef7d3b01a707641accc1e01e
Author: Mathias Buder <mathias.buder@gmail.com>
Date:   Sun Nov 27 20:10:53 2022 +0100

    [ME007] Initial ME007 driver API setup

* [ME007] Reverted change in .gitignore and platform.ini

* [ME007] Removed dependency to stdlib.h

* [ME007] Adjusted unit to cm

* [ME007] Reverted change in tasmota_template_legacy.h

* [ME007] Changed sensor message tag to three characters

* [ME007] Disabled sensor in my_user_config.h

* [ME007] Added driver code size into commente

Co-authored-by: Mathias Buder <mathias_buder@bose.com>
2022-12-14 11:52:26 +01:00
Theo Arends 53563d44d8 Add support for HLK-LD2410 24GHz smart wave motion sensor
Add support for HLK-LD2410 24GHz smart wave motion sensor
2022-11-26 17:49:25 +01:00
Theo Arends 5f3d504c30 Add support for HMC5883L
Add support for HMC5883L 3-Axis Digital Compass sensor by Andreas Achtzehn (#17069)
2022-11-15 11:11:32 +01:00
Theo Arends e83882b655 Update changelogs 2022-11-10 13:54:05 +01:00
Theo Arends a469b35f02 Bump version to v12.2.0.3 2022-11-07 11:06:17 +01:00
Theo Arends 3427e1bee3 Support for Modbus Energy Monitoring devices
Support for Modbus Energy Monitoring devices using a rule file. See ``xnrg_29_modbus.ino`` for more information
2022-10-08 16:14:11 +02:00
Theo Arends da623701d7 Add support for QMC5883L magnetic induction sensor
Add support for QMC5883L magnetic induction sensor by Helge Scheunemann (#16714)
2022-10-05 15:00:03 +02:00
Theo Arends ec964d1c9e Add can bus sniffer
Add can bus sniffer based on MCP2515 (#16684)
2022-09-29 14:31:40 +02:00
Theo Arends 6bfb9d6aa4 Update changelogs 2022-09-24 16:53:11 +02:00
Theo Arends 86e45969bd Support for DFRobot SEN0390 V30B ambient light sensor
Add support for DFRobot SEN0390 V30B ambient light sensor (#16105)
2022-09-02 13:13:47 +02:00
Theo Arends 684584a5e5 Command ``SetOption146 1`` to enable display of ESP32 internal temperature 2022-09-02 11:24:47 +02:00
Jean-Pierre Deschamps cbfd2e1db7 Put USE_SGP40 at the correct place in decode-status
Remove used line from support_features.ino
2022-08-26 10:07:57 -04:00
Jean-Pierre Deschamps 214f4bbdfd Add support for SGP40 sensor 2022-08-25 15:51:51 -04:00
Theo Arends 103808ce44 Add command ``StatusRetain``
Add command ``StatusRetain`` (#11109)
2022-08-19 14:24:55 +02:00
Theo Arends 2cdfcf5345 Update changelog and templates 2022-08-11 14:47:31 +02:00
Theo Arends 202ec86453 Update changelogs 2022-08-05 15:52:53 +02:00
Theo Arends d475ccd5c5 Update decode-status.py 2022-07-25 10:00:12 +02:00
Theo Arends 722406a461 Add support for Modbus bridge
Add support for Modbus bridge adding commands ``ModbusSend``, ``ModbusBaudrate`` and ``ModbusSerialConfig`` (#16013)
2022-07-20 10:41:02 +02:00
Theo Arends 846b217427 Bump version to v12.0.2.4
- Bump version to v12.0.2.4
- Command ``SetOption45 1..250`` to change default bistable latching relay pulse length of 40 milliseconds (#15856)
2022-07-16 14:32:18 +02:00
Theo Arends e6b4a77abd Add ESP32 Sonoff sensor support
- Bump version to v12.0.2.3
- Add ESP32 SI7021, THS01 and MS01 support
- Fix THRxxD template
2022-07-06 16:58:27 +02:00
Cossid f76400ba03 Initial implementation of SM2335 LED driver. 2022-06-21 00:32:56 -05:00
Theo Arends 3a22874124 Increase wifi retry time (#14394)
- Increase wifi retry time (#14394)
- Remove 1 second system hang on wifi re-connect (retry)
- Try to limit the number of seconds unresponsiveness due to wifi reconnect
2022-06-10 14:49:35 +02:00
Theo Arends 19e8f1a2af Prep HYT271 sensor support 2022-05-31 14:56:09 +02:00
Theo Arends 20e12c2a41 Update changelogs 2022-05-30 11:34:29 +02:00
Theo Arends 65a87fd747 Add command ``SetOption141 1``
- Add command ``SetOption141 1`` to disable display of module name in GUI header
- Prep SO146-177
2022-05-29 15:49:57 +02:00
Theo Arends cab5cb4753 Update changelogs 2022-05-04 15:34:26 +02:00
Theo Arends d71c1711f2 Add command ``SetOption139 0/1``
- Add command ``SetOption139 0/1`` to switch between pressure unit "mmHg" (0) or "inHg" (1) when ``SO24 1`` (#15350)
- Change double constants to float constants saving 200 bytes
2022-04-19 14:45:26 +02:00
Theo Arends c3132594d3 Add support for improv as used by esp-web-tools 2022-04-02 11:43:29 +02:00
Theo Arends 1b04a00488 Add command ``SetOption136 1``
Add command ``SetOption136 1`` to disable single sensor reports from Tuya devices while keeping teleperiod reports (#15216)
2022-03-25 16:27:57 +01:00
Theo Arends 55610efcb2 Support for up to four DS3502
Support for up to four DS3502 digital potentiometers with command ``Wiper<x> 0..127``
2022-03-17 16:03:40 +01:00
Theo Arends c20bc70d1c Add support for PCF85363 RTC as used in Shelly 3EM
Add support for PCF85363 RTC as used in Shelly 3EM (#13515)
2022-03-12 17:38:49 +01:00
Theo Arends 4069bd1914 Add ADE7880 2022-03-11 16:54:57 +01:00
Theo Arends d45a0426e7 Bind BL6523 2022-02-16 15:41:37 +01:00
Roberto Bonacina bdf46ef989 Fix: add "USE_CM110x" to decode-status.py
When the CM110x integration has been added, the decode-status.py
a_features array was not updated accordingly.

Signed-off-by: Roberto Bonacina <roby.bonacina@tutanota.com>
2022-02-05 16:21:30 +01:00
Theo Arends 7aacdf4fbe Add support for BME688
Add support for BME688 with latest Bosch-Sensor-API library (#14513)
2022-01-19 17:05:39 +01:00
Theo Arends 88b296cf83 Support for Eastron SDM230
Add support for Eastron SDM230 modBus energy meter (#13443)
2022-01-15 15:02:45 +01:00
sfromis 4dc210004a
Inconsistencies in decode-status.py feature flags
Not all flag names were updated to match updates to Tasmota source in `support_features.ino`. I assume the changes to be uncontroversial, with the possible exception of:

While `USE_TUYA_DIMMER` arguably is a more descriptive name than `USE_TUYA_MCU` the former name is not found anywhere in Tasmota code, which has 
```
#if defined(USE_LIGHT) && defined(USE_TUYA_MCU)
    feature2 |= 0x00008000;  // xdrv_16_tuyadimmer.ino
#endif
```
My assumption is that the actually used names "wins", to avoid user confusion, even if you could say that the name `USE_TUYA_MCU` is too broad for the actual feature. In principle, it would be more logical to create a new "real" `#define` name, but backwards compatibility and all that.... Makes sense? 
I'm ok either way....
2022-01-13 21:38:56 +01:00
Theo Arends 0cdf6c9653 Refactor Shift595 2021-12-05 14:49:49 +01:00
Theo Arends 5d60365dfb Formalize USE_SONOFF_SPM 2021-12-01 11:21:56 +01:00
Theo Arends 3535b7543e Add support for GPE Multi color smart light
Add support for GPE Multi color smart light as sold by Action in the Netherlands
2021-11-30 16:03:57 +01:00
Theo Arends ae275d984f Add support for HDC2010 temperature/humidity sensor
Add support for HDC2010 temperature/humidity sensor by Luc Boudreau (#13633)
2021-11-11 11:33:08 +01:00
Theo Arends a466c5abf3 Add support for HM330X
Add support for HM330X SeedStudio Grove Particule sensor (#13250)
2021-10-08 13:59:11 +02:00
Theo Arends 16f9e2bd88
Merge branch 'development' into development+SCD40 2021-09-23 14:42:04 +02:00
Barbudor 65989d2552 bl09xx driver for both bl0939 and bl0940 2021-09-21 18:25:52 +02:00
Arnold Niessen a260fa85a3 configuration files updated for SCD40/41 2021-09-15 13:26:39 +02:00
Theo Arends 6ddb14bc6a Add Command ``SetOption2 1``
Add Command ``SetOption2 1`` to enable display of global temperature/humidity/pressure info to JSON sensor message
2021-09-01 09:42:10 +02:00