Commit Graph

543 Commits

Author SHA1 Message Date
3a1c3e9bbf BatteryLevelPercent for HA 2025-01-05 14:39:19 +01:00
2a9a7270f2 RTL8710C/RTL8720C support (#1468)
* Move delay us and wdt to hals, update workflow

* rtl8720c initial

* move uart to hal

* rtl uart

* obk adjustments

* sdk adjustments, fix ota

* add some features

* fix some warnings

* esp uart + tr6260/esp tcp_msl

* add bl0937, adjust ota

* enable artifacts merge

* add forgotten ln882h delay

* fix mqtt, pwm on boot

* irq fix

* fix wifi disconnect

* update sdk, change lfs location and size

* Update Makefile
2025-01-01 12:11:49 +01:00
f80457a631 submit test code - pin visualize and bl0942 dump 2024-12-31 15:29:27 +01:00
1f51f65816 OTA for W800 + "Simple OTA" w/o httpd (#1471)
* OTA for W800
Removed unnecessary (and wasting resources) fetching of "index?status=1" on pages not using "state" div
Added simple "internal OTA" (just POST-ing a file)
Basic tests done - try avoiding other TCP connections to save memory
Somtimes there are memory related messages in log like "Thread create HTTP Client - errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY".

OTA working in most cases, somtimes device crashes during update.
Device will immediatly reboot after OTA completion, even printfs after writing last bytes was not visible in console.

* Add some more warnings
Make file selector accepting images on extension for platform
For Beken: Check magic "RBL" and future Platform name in header

* Changed way to verify firmware files: must match OBK file structure for the platform
As suggested by @NonPIayerCharacter added "NO_PLATFORM_OTA" in obk_config.h
For platforms w/o OTA the page will be only showing a hint.

* Fix page for non OTA devices

* streamlined tests
moved platform dependent #define for OTA extension to obk_config.h

* Optimized JS code

Only show hint for ".rbl" file on Beken platforms

Added a #define OBK_OTA_NAME_EXTENSION, actually only for LN882H
(here UART and OTA file are identicaly except an "_OTA" in the file name).
Otherwise the UART file would also match the template
(this file would not be flashed because of additional checks, but if we can prevent this ...)
2024-12-30 23:20:21 +01:00
532a90313c TR6260 support (#1446)
* TR6260 initial

* fix gh-actions

* various fixes/features

* wifi fast connect fix

* fix gpio, add i2c

* move config to obk
2024-12-12 18:55:26 +01:00
dbc2cc4b49 proj 2024-12-01 13:08:16 +01:00
XJ
5201043ab8 Ssid2 retain mod - last used SSID will be preserved /Beken Only/ (#1440)
* SSID2 add retain SSID on reboot using setLastSSIDChannel command in early.bat

* func name

* save repair

* Cmd StartupSSID

* save repair 2

* cmd text

* .

* .

* Cmd disable on platforms without SSID2
2024-11-27 09:21:04 +01:00
c50515603a ESP32 support (#1344)
* esp-idf

* fix, add s2, s3

* fix + ci

* fix naming

* ota

* adc

* reboot reason

* wdt + uart

* dht + ds1820

* fix esp32

* pwm

* uart hack

* fix build

* charts

* increase stack size

* tests

* fix timer

* optimize

* further c2 optimization

* gpio test, wifi reconnect fix

* gpio test

* Revert ledc freq

* cht83xx, increase inttemp stack size

* fix

* S3 fix, enable sht3x, pwm freq selection

* gpio & i2c fix attempt

* s2 fix

* Update defines for DHT

* Update sdk

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2024-11-06 14:47:22 +01:00
df400e3d73 config menu button label capitalisation consistency (#1410)
* config menu button label capitalisation consistency

* WebApp?
2024-11-03 20:54:36 +01:00
cc73ba88ac wifi&web page grammar/consistency (#1411)
* wifi&web page grammar/consistency

* colon spacing

* button capitals

* T
2024-11-02 21:38:51 +01:00
c0a2566f4a stub custom HASS publish, self test, part 1 of sim power 2024-11-01 11:48:35 +01:00
539a427789 Clearify "internal Temperature" as SoC temperature (#1395)
* Clearify "internal Temperature" as SoC temperature

* Change to "Chip temperature"
2024-10-28 07:27:40 +01:00
b2b4d2b338 Ssid2modv2 (#1274)
* SSID2 autoswitch BEKEN only

* SSID2 autoswitch BEKEN only v2

---------

Co-authored-by: Tester23 <openshwprojects@gmail.com>
2024-10-20 10:05:39 +02:00
46fa0b18e0 drivers define change
* Charts test for Ln882h and w800

* Update cmd_if.c

Try fix for DRV_GetReading without ENABLE_DRIVER_BL0937

* Update obk_config.h

* Update cmd_if.c

next try to fix Drivers w/o OBK_DISABLE_ALL_DRIVERS

* Update cmd_channels.c

... and another "DRV_GetReading" ...

* Update hass.c

... next problem: DRV_GetEnergySensorNames

* Update hass.c

.. more disabling code w/o energy driver

* Update http_fns.c

... and even more

* Update json_interface.c

... and energy drivers in json_interface.c

* Update user_main.c

another use of BL09X

* Update obk_config.h to remove define for charts driver
2024-09-29 21:54:54 +02:00
94f370ba8a allow get sufix removal 2024-09-29 20:01:39 +02:00
2c7cfd5909 Pin cfg: Sort Driver / pin function list alphabeticaly (#1361)
* Pin cfg: Sort Driver / pin function list alphabeticaly

* Let pins alias have fixed size
2024-09-29 19:39:23 +02:00
8cf98cfa1e nges to charts without changes to obk_config (#1364) 2024-09-29 07:49:24 +02:00
400e48f242 fix warnings p2 2024-09-27 18:10:44 +02:00
89f49da09e LN882H - static ip (#1342)
* First changes for static IP on LN882H - WiP - need to set DNS server IP

Needs change in SDK in components/net/lwip-2.1.3/src/port/ln_osal/netif/ethernetif.c
to make sure, DHCP isn't called after we set the IP:

diff --git a/components/net/lwip-2.1.3/src/port/ln_osal/netif/ethernetif.c b/components/net/lwip-2.1.3/src/port/ln_osal/netif/ethernetif.c
index e2b485e..2884ef3 100644
--- a/components/net/lwip-2.1.3/src/port/ln_osal/netif/ethernetif.c
+++ b/components/net/lwip-2.1.3/src/port/ln_osal/netif/ethernetif.c
@@ -16,6 +16,7 @@

 #define IF_NAME_STA "ST" // Only support two ascii characters
 #define IF_NAME_AP  "AP" // Only support two ascii characters
+static int STA_USE_DHCP = 1;

 typedef struct {
     struct netif              nif;
@@ -267,9 +268,10 @@ int netdev_set_state(netif_idx_t nif_idx, netdev_state_t state)

             netif_set_status_callback(nif, sta_netif_status_changed_cb);
             netif_set_link_callback(nif, sta_netif_link_changed_cb);
-
             netifapi_dhcp_stop(nif);
+       if (STA_USE_DHCP) {
             netifapi_dhcp_start(nif);
+            }
         }
         else
         {
@@ -362,6 +364,8 @@ int netdev_set_ip_info(netif_idx_t nif_idx, tcpip_ip_info_t *ip_info)

     if (ndev && ip_info) {
         netifapi_netif_set_addr(netdev2netif(ndev), &ip_info->ip, &ip_info->netmask, &ip_info->gw);
+        // we set an IP in STA mode? --> disable DHCP, or it will be overwritten
+        if (nif_idx == NETIF_IDX_STA) STA_USE_DHCP = 0;
         return 0;
     }
     return -1;

* set DNS with dns_setserver()

* Changed code so during STA init a golbal variable is set, wheter static IP is used.
This will be respected in netif (see OpenLN882H PR#17)
2024-09-09 12:44:22 +02:00
d491a71a93 made avty disable global 2024-09-05 18:19:26 +02:00
b09addeca9 motion invertex fix and motion self test 2024-08-24 23:10:30 +02:00
3e5a71fd74 Motion_n 2024-08-24 15:38:53 +02:00
9acb13af35 Add channel label to dimmer (#1329) 2024-08-24 00:07:40 +02:00
989ac1eb46 Add flag to hide ON / OFF values on GUI (showing only green / red buttons) for relays (#1327) 2024-08-23 16:14:07 +02:00
d950a9d96b clarity, grammar, consistency changes (#1317) 2024-08-19 17:11:25 +02:00
1b2fc53f7d grammar and missing colon (#1318) 2024-08-19 17:10:37 +02:00
27e0189875 spelling (#1319) 2024-08-19 17:10:17 +02:00
e1f8e59e13 simple IR2 driver for sending captures from flipper zero
* test

* Update drv_ir2.c

* fx

* fx

* fx

* qq

* test3

* tok

* test duty

* fx

* hdr

* fx

* fx

* tr

* n header

* tr

* tr

* fx

* fx

* test

* tr

tr

* fx

* simpler

* fx

* test

* fx

* dbg

* tr

* tr

* fx

* fx

* fx

* tr

* fx

* pin select

* fx

* fx

* Update drv_ir2.c

* Update drv_ir2.c

* try

* Update drv_ir2.c

* Update drv_ir2.c

* fx

* Update drv_ir2.c

* args len

* http_fn_cmd_tool: len

* better buffer handling

* try lager buffer

* clear

* Update drv_ir2.c

* long packet self tests

* Update drv_ir2.c

* Update drv_ir2.c

* alternate alias

* Queue size

* fx

* fx

* disable

* sample
2024-07-06 00:42:25 +02:00
9423561ca0 Add water quality PH Type (#1283)
* Update new_pins.h

* Update new_pins.h

* Update new_pins.c

* Update hass.c

* Update http_fns.c

* Update hass.h

* Update new_pins.c

* Update new_pins.h

* Update new_pins.c

* Update http_fns.c

* Orp Channel Type

* Add Orp Channel Title

* Bugfix Case Type

* TDS Water Quality Type

* tds change channelname

* Add Tds Pin
2024-07-04 18:30:31 +02:00
22dec3702f add requested readonly types 2024-06-30 14:00:30 +02:00
46964bd2fd copy/paste bugfix 2024-06-24 11:31:26 +02:00
b7e182abdd correct warning 2024-06-24 11:17:19 +02:00
f910f743c8 rewrite enum handling 2024-06-24 11:14:07 +02:00
9d651f15a8 merge lowmidhigh 2024-06-24 11:01:43 +02:00
a70bd96ee1 display readonlylowmidhigh 2024-06-20 00:26:44 +02:00
2c6686e8ac Publish IP and SSID to Home Assistant (#1262) 2024-06-14 08:34:02 +02:00
0ea29bb7b4 BL602: WiFi AP Scan (#1269) 2024-06-12 23:57:51 +02:00
aae07cf27b simple addition to allow clear text passwords for WiFi (#1245) 2024-06-11 11:06:55 +02:00
768ea19ea8 pixelanim - allow RGB IC + PWM CW combo 2024-05-31 15:48:47 +02:00
e609f37264 Publish internal temperature to Home Assistant (#1243) 2024-05-20 00:49:45 +02:00
5b737ca90b Fix possible wrong index / shorten JS code (#1238)
* extend pin cfg page:
introduce a function te get number of channels for an IO role
in JS code generate all elements, but hide and disable unused fields. This way the should not count for POST action

* Fix for possible wrong index when pin can't be PWM
shorten code

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2024-05-14 21:07:04 +02:00
c11a8d1e55 allow disabling Tasmota JSON API (#1236)
* allow disabling Tasmota JSON API

* test enable
2024-05-14 11:53:26 +02:00
6648537db4 extend pin cfg page: (#1228)
introduce a function te get number of channels for an IO role
in JS code generate all elements, but hide and disable unused fields. This way the should not count for POST action
2024-05-13 14:01:29 +02:00
5dd30c66ad pins page is now down to 8kb (was 90kb, then 10kb) 2024-05-11 15:25:18 +02:00
8cad88ab5e filter 2024-05-11 14:29:33 +02:00
b3db6df997 optimized pins page? - part 1 2024-05-11 13:46:01 +02:00
6d58d85bc7 second fix for channel type priority 2024-05-07 16:55:08 +02:00
47c4f4e3b3 self test for motion 2024-05-07 12:59:36 +02:00
44b0d7c5ef add Motion channeltype 2024-05-07 12:39:05 +02:00
19345af307 fix typo pointed by Wolfieee 2024-05-06 08:34:51 +02:00