Commit Graph

60 Commits

Author SHA1 Message Date
98a115cb54 match Tasmtoas DS18B20 standard 2025-09-28 10:20:34 +02:00
c1d258fb60 Add DS1820 to JSON sensor output (#1809)
* first try for DS1820 sensors

* fix windows build

* Fix wrong comment format

* Fix code

* fix missing includes

* fix missing defines (only check if driver is included)

* Add DS1820 to sensors in "DRV_IsSensor
Fix string might be not empty

* fix output for long string in case of many DS1820 sensors
2025-09-27 09:15:20 +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
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
570feeef37 tasmota fields 2025-07-10 08:49:24 +02:00
3b99b17cc2 Xradios (#1695)
* Xradios

* deep sleep

* xr806

* small adjustments
2025-06-30 18:47:47 +02:00
eb5b1ca2d0 Allow to disable more drivers and features in order to reduce binary size (#1500)
* Update obk_config.h

* Update obk_config.h

* shared

* fx

* he

* fix

* fx

* ffff

* F

* T

* tre

* fcx

* leeed

* ww

* w

* fx

* t

* ENABLE_OLD_YAML_GENERATOR

* w

* startyuip[

* dis all

* remove test post

* ENABLE_HTTP_SEND

* extra guard

* ENABLE_TCP_COMMANDLINE

* better OBK_DISABLE_ALL_DRIVERS

* tr

* ENABLE_PING_WATCHDOG

* ENABLE_HA_DISCOVERY

* TEST WITH EMPTY USER_MAIN

* fx

* no mqtt

* nm

* tr

* ENABLE_MQTT

* Update cmd_newLEDDriver.c

* tr

* header

* fx

* Update user_main.c

* t

* Update hal_main_bk7231.c

* w

* ENABLE_DRIVER_IR

* RESTORE

* fx

* #warning "Platform not defined"

* fx 1

* Update obk_config.h

* ENABLE_DRIVER_TESTPOWER

* DS1820

* fx

* fx

* enable DHT on W800

* Update Makefile

* ntp w800

* ntp

* ssdp

* OWM AND CHARTS

* why utils net has flash pub included

* nmakefile only, no refs

* makefile only

* drv

* Update Makefile

* drcs

* ENABLE_DRIVER_BMP280

* Update Makefile

* d

* ENABLE_I2C

* Update Makefile

* fin
2025-01-10 19:50:17 +01:00
5490fac28d extend Ch command so that it can also force an index to send... 2024-12-02 00:31:56 +01: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
027fb842ac Fix json_interface.c (#1312)
Requesting "STATUS" or "STATUS 5" on W800 was crashing the module.
Reason was "tmpStr" was too short, now it works.
Might have caused instability on other platforms, too
2024-08-14 20:22:09 +02:00
8a7a68cb09 Rebase and squash, add ALERT to CHT831X (#1259) 2024-07-28 13:24:24 +02:00
26470dc762 add dht to tas json 2024-06-05 16:14:18 +02:00
c11a8d1e55 allow disabling Tasmota JSON API (#1236)
* allow disabling Tasmota JSON API

* test enable
2024-05-14 11:53:26 +02:00
7a0f73193b Remove strftime to save space (#1210)
strftime takes a lot of space and we only use simple number printing for it. Should save 8kb
2024-05-05 10:50:26 +02:00
eaaa3848b0 Some more fixes to usage of gmtime (#1150)
* Some more fixes to usage of gmtime

* Second version for drv_ntp_events.c - changing to time_t (hence do casting in calculations)

* Fix for unset NTP time if no NTP drivers present. Rely on "fake" definitions of
NTP_GetCurrentTime() and NTP_GetCurrentTimeWithoutOffset() to make sure
code using time is not called, if it is not set.

* If time is not set, give 1970-01-01T00:00:00 as startupUTC
2024-03-27 23:47:28 +01:00
bc124fc873 App warnings fixed. (#1118) 2024-03-09 08:02:26 +01:00
29cc2cc323 Add energy sensors to MQTT + HA discovery for active power, reactive power, power factor (#1102)
* HASS discovery energy stats fixed except energycounter_clear_date

* HASS: add friendly entity names, remove timestamp class from energycounter_clear_date as workaround for hass-incompatible date format

* HA energycounter_clear_date fixed for correct interpreting as home assistant timestamp sensor

* refactor HA power sensors discovery info

* refactor HA power sensors discovery more

* add apparent power, reactive power, power factor to mqtt + hass discovery, refactor some vars into new energy_sensors[] struct

* amend hass sensor unique_ids due to mqtt topic/channel too long; 'Error:MQTT:Unable to queue! Topic (13), channel (66) or value (437) exceeds size limit'

* hass sensors: add 'energy 2 days ago', 'energy 3 days ago', 'uptime'
web UI: energy sensors apply their rounding setting
drv_bl_shared.c: add enum for daily_stats[], put rearrange energy_sensor[] struct to expose only names via DRV_GetEnergySensorNames()

* -HA energy sensor uniq_id values made consistent with prior builds via .hass_uniq_id_suffix
-Refactor drv_bl_shared sensor/counter vars into energy_sensors[] to simplify mqtt transmissions etc
-Add energy '2 days ago'/'3 days ago' to main web ui, data from vars already being saved to/from flash
-NTP fix html formatting in web ui

* -HA energy sensor uniq_id values made consistent with prior builds via .hass_uniq_id_suffix
-Refactor drv_bl_shared sensor/counter vars into energy_sensors[] to simplify mqtt transmissions etc
-Add energy '2 days ago'/'3 days ago' to main web ui, data from vars already being saved to/from flash
-NTP fix html formatting in web ui

* Update settings.json

ignore vscode settings...

* Update settings.json

* Update settings.json

* minor fix

* fix OBK_CONSUMPTION_LAST_HOUR missing from mqtt

---------

Co-authored-by: Stefan Smith <stefan064>
2024-03-02 07:55:01 +01:00
231b87aea8 Warnings in OpenBK7231T_App fixed. (#1098)
* Warnings in AppT fixed.

* Remove ota include file added by mistake in drv_sm2235.
2024-02-23 08:45:28 +01:00
23c4c4d408 add Yesterday to ENERGY 2024-02-07 09:07:33 +01:00
55e2a66f7d Tuyamcu raw access (#1048)
* working/?

* winnermicro fix

* ENABLE_DRIVER_TUYAMCU fx

* some fixes, some unfiished

* extra check
2024-01-24 11:18:29 +01:00
87868f2559 Get sunrise/sunset (#1030)
* Get the next sunset or sunrise values as TimerSeconds to allow setting a light's initial sate.

* Fix BL602 & W600 builds, and add some self test asserts for get sunrise/sunset

* Clock based self tests fail if they are not run in Europe time zone.

Update all usages of localtime to be gmtime. On windows local time is has the timezone applied on top of the sourceTime parameter, OpenBK app manages its own timezone and applies it to g_ntpTime appropriately, so gmtime will avoid the additional timezone application on windows machines.

* Simplify sample autoexec to avoid functionality that has not been implemented yet.

* Update docs

* Small fix in autoexe file

No brackets allowed, multiplications before addition appears to work
2024-01-20 13:50:40 +01:00
bed281a890 friendlyName fix 2024-01-02 19:35:01 +01:00
79c0f6d862 temporary disable IP print 2023-11-02 17:21:50 +01:00
d772bb4938 prit more ip info (#974) 2023-11-02 08:54:36 +01:00
bff7bb5d9e correct invalid HSB scaling 2023-10-21 18:15:51 +02:00
0a4330a1e3 obk define for batter driver 2023-08-14 17:59:04 +02:00
a3032662d4 Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 2023-08-11 09:43:28 +02:00
5ca43c9792 comment 2023-08-11 09:42:46 +02:00
6de16f0792 support http_tasmota_json_status_STS for STATUS 11? 2023-06-05 10:05:33 +02:00
a437da53b8 alternate ssid dp1, led save for flag 2023-04-29 12:37:36 +02:00
6e22209ee4 NTP_SendRequest: Unable to send message - retry quickly after reboot 2023-04-25 11:34:04 +02:00
28556c06c7 Adding SGP Air Sensor I2C Driver (#769)
* Adding new driver for SGP30

* correct tasmota detection for SGP

* Correct mqtt publish

* Adding dependency in drv_tuyaMCU for bl0602
2023-04-14 08:37:12 +02:00
9adb991274 uart fake hex can now take hex with spaces, also fix warning 2023-04-13 10:23:48 +02:00
0541402e6d Ch command for easier channel JSON access 2023-04-13 09:08:41 +02:00
c67144a3ea add missing power factor 2023-04-11 08:54:18 +02:00
424e247773 typo fix 2023-04-10 22:40:10 +02:00
2d8600687b add missing json variables for power metering 2023-04-10 20:51:59 +02:00
568c7fdbf1 fix pwm count to count multiple pwms on single channel as one, so we can allow users to turn, for example, rgb led controller strip into high power triple output single color controller 2023-04-06 12:44:30 +02:00
677526967a add my MAX72XX clock driver 2023-04-02 10:05:19 +02:00
122946539b FIX missing uptime feormat 2023-04-01 19:00:30 +02:00
947d4ab6e0 make ntp time variable public 2023-04-01 08:37:13 +02:00
c7de3c7b28 optimizing strings - p1 2023-03-26 15:24:38 +02:00
653e3cd102 Merge branch 'main' of https://github.com/openshwprojects/OpenBK7231T_App 2023-03-18 17:20:01 +01:00
52566ee6fb expose flags and short comman 2023-03-18 17:19:52 +01:00
b3d6d90e61 Tasmota Json correction for TasmotaAdmin (#737)
* Correct bug on TasmotaAdmin
When no relay and no led.

* test

* Correct preffix typo
2023-03-18 09:48:49 +01:00
1e508c064d led_map interface, allow getting command results in old post command api 2023-03-17 15:24:07 +01:00
78965377a2 Correct issue with discovery (#721)
* Correct issue with discovery

* Forget declaration for bl0602
2023-03-11 18:03:54 +01:00
81f981cba0 Adding Tasmota mecanism for Sensor (#701)
* Adding Tasmota mecanism for Sensor

* Correct for BL0602

* Correct issue on value.
Adding SensorRetain.

* Adding dummy statestext and prefix for tasmoadmin

* Adding more dynamic parameter to tasmota.
AP, Uptime, Start time (rely on ntp), battery and vcc, prefix mqtt

* RSSI calculation for tasmota

* Correct compile for nonbeken chip

* correct W600 build

* correct lastreading call

* Trying to force battery_lastreading for other chip

* force to For Beken only

* correct declaration

* Update drv_battery.h

Correct comment

---------

Co-authored-by: openshwprojects <85486843+openshwprojects@users.noreply.github.com>
2023-03-08 08:42:38 +01:00
a27df7b6c6 json replies and self test for cfg commansd 2023-02-23 20:51:54 +01:00
c4d7b7131f rest interface for channe ltypes 2023-02-20 17:03:52 +01:00