Merged, thank you!
The PowerSave actually also breaks BL0937 on other platforms, like on Beken, but in that case even PowerSave 1 breaks it. And as far as I know Tuya is also not using PowerSave on BL0937 devices. This is because BL0937 works by counting pulses with a GPIO interrupt...
Ok, so what's next for LN882H? Hm, isn't LittleFS still missing?
How is the LN882H name designated for MQTT?
In the configuration, I have entered different names than those broadcast in the 'Native', tasmota and hass modes.
Ok, so what's next for LN882H? Hm, isn't LittleFS still missing?
I made a new PR for this (PR #1191), which will fail for LN882H, because the littleFS files are missing in OpenLN882Hs CMakeList.txt
@p.kaczmarek2: I think I remember you mentioned, how to fix this with some git force command... Maybe you would be so nice to do this?
During my affords I struggled with some strange findings:
Even before the compiler reached my additions to the littlefs source the compilation was aborted.
E.g.: Simply defining LittleFS (#define ENABLE_LITTLEFS 1) for LN882H leads to a bunch of (misleading) errors, I couldn't really understand.
Mostly some (incorrect, from my point of view) complaints about conflicting types like the first error occuring:
And then in src/new_cfg.c, the defines from the included files where not present (here LFS_BLOCKS_DEFAULT_LEN was indicated "undefined"), so I had to do a nasty hack here:
uint32_t CFG_GetLFS_Size() {
#ifndef LFS_BLOCKS_DEFAULT_LEN // nasty hack. There is something strange with the includes of littlefs in conjunction with LN882H - this define is included in our_lfs.h but not there ?!?!?
#define LFS_BLOCKS_DEFAULT_LEN 0x8000
#endif
The last thing to mention is probably a size issue: the OTA image I flashed was not applied after a reboot.
So I reduced the size of the image by un-defining all the other drivers (but file size was way below the OTA partition size)???
But in the end, with all these hacks, I have successfully created a file which I could access after a reboot:
Thanks to git user @giedriuslt , I could resolve the strange compiler issues.
I turned out to be different type definitions for bool, so the conflicts were real
LFS compiles fine now, the lfs_tests1-3 succeeded and the contents of LFS where still present after several OTA updates...
Since the build needs including an aditional source file it will fail, until this modification is made in the OpenLN882H part.
But I can build an actual firmware later and attach it.
Good job @max4elektroda, but can you submit your changes to SDK as a PR?
max4elektroda wrote:
I made a new PR for this (PR #1191), which will fail for LN882H, because the littleFS files are missing in OpenLN882Hs CMakeList.txt
@p.kaczmarek2: I think I remember you mentioned, how to fix this with some git force command... Maybe you would be so nice to do this?
Works for me I tested auto switch off:
--------
// This aliased command will turn off relay on CH1 after 10 seconds
// addRepeatingEvent [IntervalSeconds][RepeatsOr-1][CommandToRun]
alias turn_off_after_time addRepeatingEvent 10 1 setChannel 1 0
// this will run the turn off command every time that CH1 becomes 1
addChangeHandler Channel1 == 1 turn_off_after_time
----------
I will do another build later, actualy I had test commands enabled, too.
Build (including test commands) used 654KB, the actual release is 610 KB.
So it should be ~40 KB
Added after 8 [minutes]:
W/o test commands size is 652KB, so LFS adds 42KB
But, to be honest, it's more than LFS, since also all this code for scripting is enabed, if LFS is present, which is not related to LFS itself...
Build on May 3 2024 15:57:10 version dev_20240503_155700
Something is wrong with this build - after 1-2 hours, ping works, but web management does not (I also use PowerSave 2)
I'm using it now Build on May 4 2024 15:20:53 version 1191_merge_eb591d9a473a
I turned off some test MQTT options (hass / tele discovery) and it seems to work well
Flag 27 - [HASS] Invoke HomeAssistant discovery on change to ip address, configuration
Flag 30 - [MQTT] Enable Tasmota TELE etc publishes (for ioBroker etc)
Yea I just noticed that, I am making LN882H dev board out of scrap and I was suprised to see that this particular pin is always high for me.
I almost got HD2015 display working.
The discussion focuses on flashing the LN882H module with open-source firmware such as Tasmota or ESPHome, detailing the necessary hardware setup, including the use of a USB to UART converter and a reliable 3.3V power supply. Users share experiences with various programming tools, troubleshooting flashing errors, and the importance of using the correct baud rate (115200) for successful firmware uploads. The conversation also touches on issues related to power consumption, the implementation of power-saving modes, and the challenges faced when trying to reset configurations or passwords in the firmware. Additionally, there are mentions of specific devices using the LN882H chip and the need for community support in resolving technical issues. Summary generated by the language model.