Commit Graph

887 Commits

Author SHA1 Message Date
e5b1b864fa spellings (#1767) 2025-08-19 08:50:37 +02:00
36218fd38e ota cosmetic (#1762)
* step 1

* Update obk_main.mk

* Update OpenBeken.mk

* Update obk_main.cmake

* Update hal_ota_bk7231.c

* Update hal_ota_bk7231.c

* m

* split

* guards

* Update hal_ota_bl602.c

* Update hal_ota_bl602.c

* bk

* better

* header

* w

* TMP

* tttttttt

* Update rest_interface.c

* hal_ota is xradio header....

* undoi

* header

* move

* xradio

* read

* fx

* t

* makefile

* move out xradi o read

* fx

* move out esp

* move out bl602

* move out beken, ln

* move out w8

* ecr tr

* realtek

* Update rest_interface.c

* win

* forgot

* tr6260 split

* Update hal_ota_tr6260.c

* rename ota_progress

* use OTA_GetProgress on all paltforms

* fx

* not needed header

* call OTA_IncrementProgress on OTA so we at laest know that something is happening
2025-08-16 16:04:57 +02:00
b6662ec8b8 Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 2025-08-12 20:20:07 +02:00
a1501c00c4 RTL8721DA (AmebaDplus) and RTL8720E (AmebaLite) (#1718)
* amebadplus

* fix + amebalite

* ota, lfs, fast connect fix

* Fix TCP_MSL and hostname

* Readme and releaserc
fix esp irq

* small fixes

* setting mac on amebad/1

* ameba ir

* win ef

* update sdk & disable rtl8720e rest ota

* fix
2025-08-12 17:28:36 +02:00
d65e0db83e remove unused stubs 2025-08-12 11:02:17 +02:00
b8965817f6 bl602 deep sleep & ecr sdk update (#1743)
* bl602 deep sleep & ecr sdk update

* esp8266 disable wpa3

* platforms.md
2025-08-10 17:08:33 +02:00
94812a2587 BK7231T/U/ESP32/LN882H SPI LED (#1749)
* BK7231U/T_ALT SPI LED

* esp32 spi led dma

* ln882h led spi dma

* simplify

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-08-10 14:46:01 +02:00
0fb70227df add pinmutex driver (potentially for shutters); disabled by default
* draft

* Update drv_pinMutex.c

* working with self test?

* Update selftest_cmd_generic.c

* ENABLE_DRIVER_PINMUTEX on beken

* ChType_StopUpDown

* addRepeatingEventUID

* rest

* Update obk_config.h
2025-08-10 14:27:26 +02:00
aaaa95a8d1 correct spelling and grammar (#1747)
* Update http_fns.c

* Update flags.json

* Update flags.md

* Update selftest_mqtt_get.c

* Update flags.md

* Update flags.json

* Update http_fns.c

* Update user_main.c

* Update drv_ir_new.cpp

* Update subpages.json

* Update flags.json

* Update http_fns.c

* Update flags.md

* Update tcpServer.md

* Update hal_flashConfig.h

* Update flash_pub.h

* Update win_flash_stub.c

* Update hal_flashConfig_bk7231.c
2025-08-10 08:46:49 +02:00
a72fe4a4c5 add software SPI flash support (disabled by default) along with ultra-fast BK7231 software SPI and ability to store littlefs on that SPI , rel: https://www.elektroda.pl/rtvforum/topic4133583.html
* tt

* tt

* kk

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* nodelay

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* test

* test

* test

* tt

* Update our_lfs.c

* Update our_lfs.c

* Update our_lfs.c

* Update our_lfs.c

* Update our_lfs.c

* t

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* ttt

* Update drv_spi_flash.c

* unrolll

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* Update drv_spi_flash.c

* better wait for logic

* Update drv_spi_flash.c

* revert

* Update drv_spi_flash.c

* PLATFORM_BEKEN_NEW fix???

* faster?>

* faster?

* test memory

* test2

* restore

* coarse time test

* test

* restore

* DISABLE
2025-08-09 19:13:17 +02:00
eb77165be9 Update hass.h - add missing "hass_init_textField_info()" to avoid breaking ESP builds (#1753)
ESP builds with "-Werror=implicit-function-declaration", so we get

 error: implicit declaration of function 'hass_init_textField_info';
2025-08-09 19:10:58 +02:00
54ffddc75f textfield 2025-08-07 23:47:12 +02:00
8ee93ace88 Update http_fns.c 2025-08-07 23:44:19 +02:00
6ae05de560 textfield hass discovery? 2025-08-07 23:44:04 +02:00
6bb7a5743d Fix spacing in main page (#1738) 2025-07-26 15:53:54 +02:00
1c7cdd4881 Ds1820 simple+full as separate drivers (#1705)
* Seperate simple and full driver, introduce "common" for shared code

* Fix command prefixes

* Generate command as multiline if requested

* Fix JS linebreak

* Only use simple dirver - check sizes of firmware images

* Update obk_config.h - enable Full driver for all platforms to allow testing

* Change parsing sttring to device address to allow compact form
Change obk_config.h: remove extra entry for W800, add "FULL" driver to windows build

* fix windows code for "fake" DS18B20

* fix missing files in openBeken_win32_mvsc2017.vcxproj

* fix handle missing task.h for windows

* change Windows emulation to MAX/2 fake sensors

* try fix BL602

* change "fake temperature" of sensors in windows

* change windows sensor temperature once more

* shorten commands by alias

* fix escaping linebreak

* Fix broken JS code ...

* Fix ESP32 is crashing if interrupts are disabled during OWReset for > 480us

* Change output for unused channels
Test if DS1820 channels are in use

* fix warning/error for channel (<=64) printed into a char[5] value

* removeunuses quotes for address

* Fix language

* Capial "S" in Menu entry "Sensors"

* restore obk_config - #define ENABLE_DRIVER_DS1820_FULLonly for WINDOWS and SENSORS variant
2025-07-19 08:03:46 +02:00
01c029898d Show correct BSSID in json status instead of a "fake" one (#1689)
* Add HAL_GetWiFiBSSID() and HAL_GetWiFiChannel() commands
Display correct BSSID and channel in JSON status

* Testing bssid RTL

* Typo and new try for RTL

* Fix BSSID returned

* bettter

* test

* Update hal_wifi_xradio.c

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-07-10 21:51:05 +02:00
7bb04bdda2 safer str op 2025-07-10 15:27:26 +02:00
d4fb118c91 temporary fall back to sprintf 2025-07-10 09:28:08 +02:00
570feeef37 tasmota fields 2025-07-10 08:49:24 +02:00
ce465a15e6 http override 2025-07-09 21:13:27 +02:00
7f0b7b75d3 allow serving gz files from lfs with gz header 2025-07-09 08:15:30 +02:00
3c85604378 fix windows server 2025-07-09 08:03:41 +02:00
a261a71ab1 Update ESP-IDF to v5.5-beta1 and add minimal ESP8266 support (#1707)
* update esp-idf

* esp8266

* fix

* pwm, uart and wifi fix

* fix ota

* fix 1m and ps

* update workflow
2025-07-06 07:54:23 +02:00
55ce270fef simple correction in config page (#1708)
Since I saw this in an illustration for an "issue".
If I'm not mistaken, I changed the GUI some time ago so the additional input appears/vanishes as soon as role is changed to button. So no need to wait for saving...
2025-07-03 15:40:11 +02:00
217dd1e3e1 fix GET/POST for all platforms, remove some not needed os_* mappings (os_strcpy, os_memset, etc)
* get and post to PLATFORM_ECR6600

* test

* Update http_client.c

* t

* need timer

* iotx_net_init ?

* Update utils_timer.c

* try os_time_get

* try ENABLE_SEND_POSTANDGET on bl602 as welll

* Update utils_net.h

* add httpclient to boufallo mk

* Update utils_timer.c

* Update new_common.h

* time

* try ln882h

* Update utils_timer.c

* OS_STRCPY ETCCC

* esp IDF

* Update new_common.h

* Update utils_timer.c

* Update new_common.h

* remove hal_machw_time_past dependency

* lwip_close_force better

* stub

* simplifyu

* omg typo

* revert

* remove os_strcpy

* remove os_strlen

* memmove

* os_strcmp

* os_strstr

* mem func

* try on xradio

* #define lwip_close_force(x) lwip_close(x)

* SWAP

* typo

* Update utils_timer.c

* rtl

* Update new_common.h

* tr

* #include <stdint.h> is reduntant

* clean hdr

* those headers could be common

* those headers could be common

* disable

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-07-02 20:46:00 +02:00
69121fb252 merge gosund sw2 port (not clear if it will be used) 2025-06-30 21:56:13 +02:00
3b99b17cc2 Xradios (#1695)
* Xradios

* deep sleep

* xr806

* small adjustments
2025-06-30 18:47:47 +02:00
3564ed7013 AC TCL 3 (#1659)
* Update obk_config.h

* fan fx

* fan mode

* fan_only

* swings for climate

* test html

* better

* bew cfg

* Update obk_config.h
2025-06-26 15:56:39 +02:00
af37e093d0 bk7231u/bk7231s/bk7252/bk7252n/bk7231t alt. (#1680)
* bk7231u/bk7231t/bk7252 new sdk

* 7252n
2025-06-24 13:16:27 +02:00
fac2cf081c w800 + berry (#1629)
* w800 + berry

* fix w600

* Update XR and makefile

* Berry cmake

* BL602 lfs test

* Update w800

* Fix

* W600 heap

* sensors & bl602

* bl602 delay_us
2025-06-20 09:35:00 +02:00
b1b41f4a66 channel type - Percent 2025-05-31 01:18:37 +02:00
d6f7678dc6 TCL AC driver progress + LowMidHigh etc channels HA discovery
* Buzzer

* Update obk_config.h

* Display

* uart test stub

* unfinished TCL_DoDiscovery

* ha

* Update drv_tclAC.c

* ha mode send

* unfinished not working

* Update drv_tclAC.c

* Update hass.h

* better discovery

* Update obk_config.h
2025-05-30 16:10:36 +02:00
a2c9d19147 Fix a memory leak in http_fns.c (#1653) 2025-05-26 17:35:45 +02:00
cbf0d459fd Fix tests on linux (#1640)
The tests were segfaulting on linux, I don't know how they work on
Windows, perhaps casting `void*` to `int` happens to work there.
Generally it's not portable.

Berry has a dedicated `comptr` type, so let's use that and be portable.

Also makes `run_closure` handle arbitrary number of arguments, see
https://berry.readthedocs.io/en/latest/source/en/Chapter-5.html#function-with-variable-number-of-arguments-vararg
for docs.

Test Plan:
* CI
* make -f custom.mk, ./build/win_main -runUnitTests 2
2025-05-25 18:12:56 +02:00
acd46ad682 add PIR driver
* tt

* Update selftest_berry.c

* Update obk_config.h

* some more fixes

* fixes

* IOR_PWM_ScriptOnly_n

* fx

* Update OpenBeken.mk

* disable
2025-05-16 10:07:38 +02:00
5916fbd8a7 Update BL602 code to work with latest sdk. (#1487)
* Support new BL602 SDK

* Update .gitmodules

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2025-05-02 14:42:14 +02:00
782d478b87 fix xr806
* Update http_tcp_server.c

* Update http_tcp_server.c

* better naming

* debug print

* TRY TO CLEAR UP A BIT

* Update http_tcp_server.c

* Update http_tcp_server.c

* Update http_tcp_server.c

* Update http_tcp_server.c

* Update new_http.c

* XR auth disabled

* clear log

* Update OpenXR806

* Update OpenXR806

* Update new_http.c
2025-04-19 20:33:08 +02:00
a5a5b4b7b9 xr872 (A9 camera) 2025-04-18 18:05:04 +02:00
ac3c5d6da6 Faster wifi connecting (up to 2sec restart -> connected) (#1297)
* Wifi fast connect + extra

* --
2025-04-15 16:38:10 +02:00
00890d1cf4 API CHANGE - extend http callback for drivers so it includes bPreState boolean so we can add HTML either before state div (without refresh) or in state div (refreshing) 2025-04-13 19:18:30 +02:00
9922aec8df add prestate for berry 2025-04-13 09:45:19 +02:00
eadba42f9f Berry integration part 1
* t

* fx

* split closure handler

* setTimeout, setInterval

* split berry frm SVM, but I need to move event waiter to separate struct?

* fx

* fx

* split relations

* remvoe ode duplciaton

* POC - pass value to berry

* POC - pass str to berry

* berry preps + lfs test

* lfs test + bytes

* save

* remove code duplication

* try dpid calls

* working test for bytes

* tyuamcu to file in eberry

* str for berry test

* tuyamcu to berry glue

* fx1

* fixes

* try berry http

* fix

* tests

* test  vaar lifespan

* test

* test

* test if

* berry in html

* #if ENABLE_OBK_BERRY

* fx

* better

* fx

* test nested loop

* free mem

* simpler

* split lfs run

* arg

* fx

* fix

* #if ENABLE_OBK_BERRY

* comamnd hook

* vars access, ntp

* finalize?

* unfinished
2025-04-12 16:56:24 +02:00
XJ
04ab04ccfc HASS - Sensor name 'Battery' also for BATTERY_CHANNEL_SENSOR (#1583)
* Sensor name 'Battery' also for BATTERY_CHANNEL_SENSOR

* .

* changed unique_id to battery_ch to avoid collision

* spaces

* updated comment
2025-03-26 22:15:18 +01:00
2d43185902 Port Simulator to Linux - p1
* intial makefile for windows sim

* netdb

* tr

* fx

* fxes

* fxes

* fxes

f

* fxes

* fxes

* fxes

* fx

* fx

* fxes?

* fxes

* better?

* stubs

* more

* fxes

* fx?

* comment out sleep

* but only in self test

* add assertion keyword

---------

Co-authored-by: Alexandre Oliveira <rockytvbr@gmail.com>
2025-03-26 22:13:39 +01:00
XJ
5810db7ae1 BL0492 Frequency to HASS (MQTT) + Energy calculation in TWIN_BL_ENABLED mode for channel 2 (#1578)
* twinbl energy for channel 2

* .

* removed movavg

* Added HASS MQTT frequency (both standard and TWIN_MODE)

* .

* simplify, store total only IX0

* Ext BugFix: addChangeHandler Power < 20 appears broken #1543
2025-03-26 13:24:34 +01:00
7ace8c31ba tr6260 (#1564) 2025-03-13 09:01:58 +01:00
544f48d022 ECR6600 (#1553)
* ECR6600

* fix macstr

* uart, bl0937

* vbat adc, ota

* pwm freq

* static ip, change mac

* update partitions
2025-03-07 22:11:42 +01:00
86fbfe90e0 Mqtt-mbedtls (#960)
* Update package.json

Update repo url for build

* MQTT over TLS first build

* MQTT TLS boot ok

* Funcional version MQTT secure TLS

* Add option for mqtt to use tls in web config

* Versao funcional pendente otimizacao de rom

* Versao funcional com verify certificate disabled

* Adicao de informacoes para debug

* Versao funcional com verificacao do certificado

* Otimizacoes de rom e heap usage

* Versao com webserver enable/disable

* Versao boa para mqtt mbedtls boa uso

* Invert CFG enable_web_server to disable_web_server

* MQTT over TLS first build

* MQTT TLS boot ok

* Funcional version MQTT secure TLS

* Add option for mqtt to use tls in web config

* Versao funcional pendente otimizacao de rom

* Versao funcional com verify certificate disabled

* Adicao de informacoes para debug

* Versao funcional com verificacao do certificado

* Otimizacoes de rom e heap usage

* Versao com webserver enable/disable

* Versao boa para mqtt mbedtls boa uso

* Invert CFG enable_web_server to disable_web_server

* Same documentation

* Rever submodulos configuration

* Rever ignore submodules

Rever ignore submodules

* Fix for git actions

* Fix build start_type_pub only in platform Beken

* Fix build git w600

* Fix BL602 build

* Remove format only changes

* Delete src/driver/drv_ir.cpp

Space changes only

* Updates to pull request

* Revert space only changes

* Change cfg bool to byte and some documentation

* Fix get initial time from compile time

* Fix base64.c duplicate module

* Fix base64.c duplicate module for git workflow

* Fix strange behavior on BK7231n. Connection completed only in the second callback WIFI_STA_CONNECTED

* MQTT-MBEDTLS default disable

* Fix SERIOUS bug breaking all platforms except BK7231N (did you want to set g_bHasWiFiConnected  in #else?)

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
2025-03-05 19:27:51 +01:00
XJ
1cc0603748 Cmd Flags 64bit repair + webui (#1548)
* flags 64bit cmd repair + webui

* uint32

* flags 0 webui strange char repair
2025-03-01 06:17:38 +01:00