It's easier to reason about the change if we consider when the
availability topic is not added.
Originally that was when isSensor && flagavty, that is, when an entity
was considered to be a sensor and flag 35 was set.
After commit d491a71a93, it became isSensor || flagavty.
That is, (A) if flag 35 is set then all entities are stripped of the
availability topic and (B) even when the flag is not set, then any
entity considered to be a sensor would also be stripped of the topic.
I am confident that (A) was the intent and (B) is a bug.
So, we should simply check only flagavty.
* Fix missing "safeguard" for invalid iargument index for
Tokenizer_GetArgIntegerRange() need to agree an return value in this cas. I choosed range_Min
Tokenizer_GetArgInteger()
Tokenizer_GetArgFloat()
Added check for negative index to all TokenizerGetXX functions
Added selftest for these cases to selftest_tokenizer.c
Tried to fix selftest_tasmota.c - it relayed on the previous behavior to return a value from a prevoius "TokenizeString()" call
Examlpe of what was changed:
- SIM_SendFakeMQTTAndRunSimFrame_CMND("CT", "");
+ SIM_SendFakeMQTTAndRunSimFrame_CMND("CT", "153");
(later 153 is used for "assert" in
SELFTEST_ASSERT_JSON_VALUE_INTEGER(0, "CT", 153);
)
* revert modifications to tasmota selftests.
Safeguarding command in src/cmnds/cmd_newLEDDriver.c (reject calls with insufficient number of arguments)
Make "0" default "addMode" for "add_dimmer()"
* Add some more checks. Hopefully it's complete now
* push driver for DCF77 to actual OBK code
* Chnged to new HAL IRQ API
Added missing "CHANGE" interrupt (rising and falling) for LN882H, W600/W800 and ESP (not yet tested)
Moved code from ISR to QuickTick funktion (else LN882H would crash)
Tested to work with
W800 ("CHANGE")
BL602 ("RISING" and "FALLING")
LN882H (both "CHANGE" and "RISING"/"FALLING" tested)
* fixed ESP (wrong formated comment
for testing at least compilation, added "#define ENABLE_DRIVER_DCF77 1" for more platforms ...
* disabled DCF77 driver for RDA5981 - no xticks code found
* Changed logic again, IRS will only save timestamp, all decoding is done in QuickTick function
No need for Rising/falling edge definition, driver ony searches for "bit" gaps (100 or 200 ms) and ignore the "in between" gap to the next bit.
Therefore no need to know, if rising or falling edge starts the bit.
* chagnge driver to get Pin from argument 1
* Disable driver in obk_config.h
* mDNS support for other platforms
* add mDNS support for BK7238
* add mDNS support for W600
* add mDNS support for W800
* add mDNS support for BL602
* add mDNS support for ESP8266
* enable mDNS driver by default on ESP8266
* add mDNS support for ESP32 (ESP-IDF)
* add mDNS support for ESP32-C3 (ESP-IDF)
* add mDNS support for ESP32-C6 and gate ESP32-C3 to 4M
* document ESP32-C3 2M mDNS gating rationale
* add mDNS support for ESP32-S3 (ESP-IDF)
* rtl87x0c: add mdns support and ota upload heap guard
* add mDNS support for TR6260
* add mDNS support for BK7231U - untested
* add mDNS support for BK7252 - untested
* add mDNS support for BK7252N - untested
* add mDNS support for LN8825 - untested
* expand mDNS support for ESP-IDF C2/C5/C61/S2 - untested
* add mDNS support for ECR6600 - untested
* add mDNS support for XR806/XR809 - untested
* enable mDNS by default for ESP8266
* RTL cleanup
Removed RTL-specific code for OTA uploads and client management.
* RTL cleanup
Removed Realtek-specific OTA guard code and related logging.
* RTL cleanup
---------
Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
* Add ENABLE_DRIVER_SHUTTERS configuration option
* Enhance shutter control with channel assignments
* Refactor shutter channel handling and save logic
* Update drv_shutters.c
* Adjust time scaling and save state on shutter move
Updated the scaling factors for open and close time seconds in Shutter_Save and Shutter_Read functions to reflect a change from 10 to 100 and from 0.1 to 0.01 respectively. Added a call to Shutter_Save in Shutter_Move to ensure state is saved when moving.
Fixed some wrong timing defines (Windows "Sleep" will sleep ms, Linux "sleep" will sleep seconds(!)).
Added start of Simulator
Changed some constants so Linux sim uses an own MAC, device name ...
Also fixed Web-App code not to rely on "ourip" ( HAL_GetMyIPString(); ) which won't work on all platforms and will ignore port
by using JavaScript "location.host" which (since we are using the webif) is known and even containing a non standard port, usefull together with simulators "-port" option
* test1
* test
* cal
* enable on beken
* fix
* fix stop so it stops immediatelly
* buttons for up and down
* HA
* test
* Update new_pins.h
* fix warning: implicit declaration of function 'Shutter_MoveByIndex' [-Wimplicit-function-declaration] etc
* Update drv_shutters.c
* double order stop
* Update drv_shutters.c
* Update selftest_shutters.c
* Update win_main.c
* Update obk_config.h
* Refactor datetime formatting for ECR6600 platform
Try fixing bad mqtt mesage for energycounter_clear_date on ECR6600
* Fix typo
* Changed second occurence in source code
* Try fix flash restrictions for W600 and W800 by moving start of FLASH_VARS (changing FLASH_VARS_STRUCTURE_ADDR)
So restrictions in new_pins.h should be obsolete (allowing e.g. second SSID for W600 and W800)
For W800 restriction should be no longer present since some time, because it was moved to easyflash some time ago...
* Fix code in new_cfg.c, too
Removed special handling for W600 and updated config version.
* Tried an "update" mechanism: move flash_vars to new location if config is version 3
* Fix overwriting configSize in CFG_CalcChecksum() in case of V3 config
* I try fixing error for XR platforms for conflicting SSD1306_Init by excluding local "components" dir
* Try fixig build by removing "-lcomponent"
* Try fix for XR806, too
* try zeroing new space in config
* Try fixing zero memory
Add some more debug output
* Removed test code for fixing XRadio devices - nothing to do with this PR
Removed debug output
* Change to reflect moving flashvars from local structure to easyflash in latest commit
On startup PINS that conditionally processed based on g_lastValidState
would be ignore if they were currently 0 regardless of the state before
the module woke up.
This change intializes them with the proper restored channel values.
Co-authored-by: Anthony Sepa <protectivedad@gmail.com>