Commit Graph

3852 Commits

Author SHA1 Message Date
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
1.18.92
2025-04-19 20:33:08 +02:00
5d09349b9d also add XR806 to online builds (it boots but there is some issue with WiFi?)
* Update .gitmodules

* w

* Manually added submodule OpenXR

* Update Makefile

* Update Makefile

* Update Makefile

* Update OpenXR806

* Update OpenXR806

* Update OpenXR806

* Update hal_wifi_xr809.c
1.18.91
2025-04-19 11:58:35 +02:00
379f7cb00e XR872 online builds (#1609)
* Update workflow.yaml

* Update Makefile

* Update .gitmodules

* Update .gitmodules

* Manually added submodule OpenXR872

* Update workflow.yaml

* Update .gitmodules

* Update OpenXR872

* Update OpenXR872

* Update OpenXR872

* Update OpenXR872

* Update OpenXR872

* Update workflow.yaml

* Update OpenXR872
1.18.90
2025-04-19 08:17:56 +02:00
fd853eb203 Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 1.18.89 2025-04-18 20:29:43 +02:00
d70e9e93e1 xr fixes 2025-04-18 20:29:23 +02:00
3fd49d4fae Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 1.18.88 2025-04-18 18:35:12 +02:00
5b763e3194 Update hal_pins_xr809.c 2025-04-18 18:32:27 +02:00
0ea1983049 add IRRemoteESP8266 IR alternate version to online builds (vfonov PR)
* add IRRemoteSP

* fx

* Update IRsend.cpp

* f

* fix

* s

* irRemoteESP

* Update obk_config_irRemoteESP.h

* w
1.18.87
2025-04-18 18:24:13 +02:00
a5a5b4b7b9 xr872 (A9 camera) 1.18.86 2025-04-18 18:05:04 +02:00
64ec573482 EXPERIMENT: allow alternate build permutations (with berry), should not break anything
* Update obk_config.h

* Update workflow.yaml

* Update obk_config.h

* v2

* Update workflow.yaml

* test

* tr3

* ffs

* save fx

* Update workflow.yaml

* APP NAME FX?

* Update workflow.yaml

* Update workflow.yaml

* Update workflow.yaml

* Update workflow.yaml

* test

* Update obk_config.h

* Update win_main.c

* Update Makefile

* test

* Update obk_config_berry.h

* test

* test

* matrix

* Update workflow.yaml

* Update obk_config.h
1.18.85
2025-04-17 22:51:58 +02:00
9a7447fd4b Fix T build (#1607) 1.18.84 2025-04-16 09:11:50 +02:00
ac3c5d6da6 Faster wifi connecting (up to 2sec restart -> connected) (#1297)
* Wifi fast connect + extra

* --
2025-04-15 16:38:10 +02:00
714d9c9ab1 Update cmd_public.h (#1605) 1.18.83 2025-04-14 16:41:04 +02:00
5a78713c90 add missing prestate check 1.18.82 2025-04-13 19:34:37 +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) 1.18.81 2025-04-13 19:18:30 +02:00
db1942c10c fix Berry - add missing be_pop 1.18.80 2025-04-13 15:38:09 +02:00
b21ca34812 Berry stack size test - part 1 2025-04-13 14:13:54 +02:00
dc6ced4102 Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 1.18.79 2025-04-13 10:04:16 +02:00
9922aec8df add prestate for berry 2025-04-13 09:45:19 +02:00
f2c1133b47 futher berry fixes 1.18.78 2025-04-12 17:55:52 +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
1.18.77
2025-04-12 16:56:24 +02:00
8ac653b89a Update safeMode.md (#1599) 1.18.76 2025-04-11 08:51:52 +02:00
4973295415 tuyaMCU: avoid state machine interfering with reset AP mode (#1597)
Don't continue with the state machine if the device is in Open WiFi mode
based on a user button press.

This avoids the device shutting down itself when in recovery mode. The
MCU will reset the device after 90 seconds automatically.

Communicate to the MCU the device is in configuration mode. This will
change the status LED blink pattern to reflect the state.

Signed-off-by: David Bauer <mail@david-bauer.net>
1.18.75
2025-04-06 09:10:26 +02:00
9e3bcf72af tuyaMCU: replace network state magic values (#1596)
Replace magic values present in the code with the more descriptive
macros.

As these macros are redundant with the comments, drop the repsective
comments.

Signed-off-by: David Bauer <mail@david-bauer.net>
1.18.74
2025-04-05 21:51:03 +02:00
f43f5238be ecr6600 gh actions hack (#1589) 1.18.73 2025-04-02 22:25:23 +02:00
e96097debf Update README.md 2025-04-02 08:58:15 +02:00
8fad535e4e typos + releaserc update (#1575)
* Update drv_tuyaMCU.c

* Update drv_spi.c

* Update drv_spi.h

* Update .releaserc.yaml
1.18.72
2025-03-31 00:27:31 +02:00
XJ
be5aca62b3 ENABLE_BL_TWIN mode - reset energy_today also for channel B (#1587) 1.18.71 2025-03-30 21:03:19 +02:00
7e1afd0fdf [POC] Run berry-lang (#1544)
* setChannel(ch, v) in Berry

* try

* t2

* b

* fx

* update to berry with autogenerated files

* Add debug to find out whether the submodule is really checked out

* Revert "Add debug to find out whether the submodule is really checked out"

This reverts commit 40ec2f6677.

* Add src/berry checkout to every build

* berry separate file p1

* #define ENABLE_OBK_BERRY 1 on Beken only

* Compile in obkSimulator

Compiles, but crashes in parser.
Seems like the Berry code has not been tested under MSVC2017.

* Checkout with submodules in obkSimulator workflow

* berry with ffs msvc fix

* berry autogen fiasco fix

* OpenBK7231T compiles from official berry, handle prebuild

Breaks obkSimulator

* Fix botched rebase on .gitmodules

* Build in msvc with a berry prebuild step (requires python)

* MSVC: also extend include directories for Release

* Fix BK723x build, extract common berry build rules into berry.mk

* Fix OpenBL602 build

This doesn't actually compile berry for OpenBL602, but makes compile
errors go away and marks where further work will be needed.

* working delayMs

Test Plan:
```
berry state = 1; var tick; def tick() state = 1 - state; channelSet(1, state); delayMs(1000, tick); end; tick();
```
can be stopped with `stopAllScripts`

* only use os_realloc on PLATFORM_BK7231T

* Move as much berry logic as possible out of cmd_script

* Guard more with ENABLE_OBK_BERRY

* upload script

* file operations & working import

* enough to implement "Advanced turn off after time with timer on UI and timer setting on UI and kept in flash"

* experiments

* clang-format -i src/berry/be_*.{h,c} src/cmnds/cmd_berry.c

* Remove redundant hfile != NULL

Calling with hfile == NULL would be bug in some other part of the code

* Don't checkout other submodules for simulator build

* remove stray debug & .user files

* Use be_newcomobj

* Build sim on linux

* build linux sim [2]

* threads & tests

* Leave enabled on Windows, disable on BEKEN

* SIM_RunWindow fix?

* allow "startScript test.be" as a shorthand for "berry import test" ??

* test?

* fix /

* test arg

* test2

* test

* test add

* fx

* test

* just checking if i can use import without module?

* test with module

* CMD_StopBerry fix?

* run obk command from berry? probably not good idea due to the stack size, will delay execution later?

* str arg

* test to see if i have to repeat import

* submit unfinished code

* concat tst

* more tests

* fix copy/paste mistake, add fib test

* fx

* channelSet

* fx

* try

* tester.fib(11)

* rename

---------

Co-authored-by: Tester23 <85486843+openshwprojects@users.noreply.github.com>
Co-authored-by: NonPIayerCharacter <18557343+NonPIayerCharacter@users.noreply.github.com>
2025-03-30 20:37:37 +02:00
XJ
28ba3622e6 Moving Avg mod {default disabled) (#1586) 1.18.70 2025-03-29 18:10:15 +01:00
XJ
71ce6d33bc tuyaMcu_sendCmd without second param bugfix (#1585) 1.18.69 2025-03-28 23:23:28 +01: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
1.18.68
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
1.18.67
2025-03-26 13:24:34 +01:00
33c844bae1 added Tasmota command json to get compatibility with SmartThings Tasmota Edge Driver (#1581)
* added Tasmota command json in order to get compatibility with SmartThings Tasmota Edge driver

* revert missing parts
1.18.66
2025-03-25 10:52:14 +01:00
b80fff5d40 added TuyaMCU delta option for per-dpID calibration like temperature, etc 1.18.65 2025-03-23 09:23:57 +01:00
64b4136283 command to send mqtt group 1.18.64 2025-03-23 08:49:14 +01:00
ebbd2ffa15 Readme updates (#1568)
* BEGIN

* LAB

* love

* heart

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
1.18.63
2025-03-21 17:12:12 +01:00
c30dcbf205 DS1820: Fixes and style improvement (#1572)
* drv_ds1820_simple.c: Refactor using "Return Early Pattern"

Function DS1820_OnEverySecond() has too much nesting conditions.
Nonlinear flow of the code is hard to follow.

Also added define for magic constants.

* drv_ds1820_simple.c: Fixed incorrect first reading

DS1820_DiscoverFamily() call between OWReset() and OWWriteByte(Pin, COMMAND) causes command to ignore.

Closes: #1571

* drv_ds1820_simple.c: reset all state variables on driver start

* drv_ds1820_simple.c: Implemented DS1820_SetResolution command

* drv_ds1820_simple.c: Mark functions as static

* drv_ds1820_simple.c: Call DS1820_DiscoverFamily() from DS1820_driver_Init() so DS1820_SetResolution could be called from autoexec.bat
1.18.62
2025-03-17 08:38:45 +01:00
9ad08c17b6 bl0937 (#1569) 1.18.61 2025-03-16 08:25:42 +01:00
4bedca5321 Update .releaserc.yaml 1.18.60 2025-03-14 20:42:41 +01:00
7ace8c31ba tr6260 (#1564) 1.18.59 2025-03-13 09:01:58 +01:00
a7673b9765 Update ECR6600 sdk (#1562)
* Update ECR6600 sdk

* Update to v2.1.23.3
1.18.58
2025-03-13 08:55:47 +01:00
9af814c490 Expand testRealloc (#1563)
* Expand testRealloc

I was debugging an issue in another pull request and I noticed that
`realloc` was behaving weird on my OpenBK7231T device.

I've found #298, so it looked like a known problem.

The old test doesn't hang my device, so extended it and it looks like
sometimes reallocated memory gets overwritten.

Here's a log from my device:
```
Info:CMD:Realloc difference: rep 90, i 2 j 0 initialra1 230 ra1 242 msg[j] 8 (j % 100) 0
Info:CMD:Realloc difference: rep 90, i 2 j 1 initialra1 230 ra1 242 msg[j] 121 (j % 100) 1
Info:CMD:Realloc difference: rep 90, i 2 j 2 initialra1 230 ra1 242 msg[j] 66 (j % 100) 2
Info:CMD:Realloc difference: rep 90, i 2 j 3 initialra1 230 ra1 242 msg[j] 0 (j % 100) 3
Info:CMD:Realloc difference: rep 90, i 2 j 4 initialra1 230 ra1 242 msg[j] 88 (j % 100) 4
Info:CMD:Realloc difference: rep 90, i 2 j 5 initialra1 230 ra1 242 msg[j] 1 (j % 100) 5
Info:CMD:Realloc difference: rep 90, i 2 j 6 initialra1 230 ra1 242 msg[j] 0 (j % 100) 6
Info:CMD:Realloc difference: rep 90, i 2 j 7 initialra1 230 ra1 242 msg[j] 0 (j % 100) 7
Info:CMD:Realloc has been tested! Total calls 90, reps now 100, reallocBroken 1
```

It's pretty non-deterministic, but during my debugging I've noticed it's
related to timers and one way we use timers is logging.

Issue #298 mentions eaf4e1a606/platforms/bk7231t/bk7231t_os/beken378/os/mem_arch.c (L30)
which references `platform_is_in_interrupt_context` which I assume is
related to timers as well.

* Technically malloc and realloc could return NULL

* Unbreak CI by restoring obk_config.h
2025-03-12 15:00:34 +01:00
544f48d022 ECR6600 (#1553)
* ECR6600

* fix macstr

* uart, bl0937

* vbat adc, ota

* pwm freq

* static ip, change mac

* update partitions
1.18.57
2025-03-07 22:11:42 +01:00
a5301939a7 Update hal_wifi_bk7231.c (#1560)
Ensure that connected event is triggered only once.
1.18.56
2025-03-06 21:07:46 +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
49a466aecb float change callback temp fix 1.18.55 2025-03-05 08:51:37 +01:00
8c01b0cf83 test for addChangeHandler Channel20 != 0 1.18.54 2025-03-05 07:27:02 +01:00
30c12c69d9 update submodule OpenBK7231N 1.18.53 2025-03-02 23:02:13 +01:00