Commit Graph

77 Commits

Author SHA1 Message Date
CaCO3
9d5846d0ce Renamed variables and added debug log (#1537)
* add debug logs

* renamed variables

* renamed TAGs, added flow status logging

* .

* .

Co-authored-by: CaCO3 <caco@ruinelli.ch>
2022-12-10 20:39:43 +01:00
CaCO3
2768667eb1 Refactor JSON (#1518)
* use correct log level

* corrected logging

* typo

* refactored JSON generagion: removed unused parameters, consolidated into singel function, added "pre"

* Wrapped 'rate' into double quotes, like all other JSON values

Co-authored-by: CaCO3 <caco@ruinelli.ch>
2022-12-09 17:49:26 +01:00
CaCO3
5867e90f69 Extend mqtt json (#1489)
* add whitespaces in JSON in MQTT

* re-added pre-value

Co-authored-by: CaCO3 <caco@ruinelli.ch>
2022-12-05 18:44:43 +01:00
CaCO3
e87b91f6eb MQTT improvements (#1487)
* removed no longer used code

* updated logs

* increased heap memory. this most likely was the reason that the MQTT init failed, see https://github.com/jomjol/AI-on-the-edge-device/issues/1455#issuecomment-1336450501

Co-authored-by: CaCO3 <caco@ruinelli.ch>
2022-12-05 06:55:08 +01:00
jomjol
a122b37c81 Quick Fix for MQTT Init Problem 2022-12-04 15:12:20 +01:00
Slider0007
85905a7045 Improve MQTT connection handling (#1462)
* modify mqtt init at startup + after disconnection

* mqtt_init only when not initialized

* Minor udapte

* Apply suggestions from code review

Co-authored-by: CaCO3 <caco3@ruinelli.ch>

* Correct typo

Co-authored-by: CaCO3 <caco3@ruinelli.ch>
2022-12-03 19:10:44 +01:00
CaCO3
880d9eae20 replace division by a multiplication (#1352)
Co-authored-by: CaCO3 <caco@ruinelli.ch>
2022-11-16 07:50:59 +01:00
CaCO3
c64ed36fa4 Support white space and equal in passwords (#1327)
* Updated the web Installer page, removed all redudnant files in the docs folder, updated the main README

* .

* consolidate the 2 identical ZerlegeZeile() function and move it to Helper.cpp and add workaround for whitespace and equal sign in password fields

* remove redundant code in HelperZerlegeZeile()

* Updated the web Installer page, removed all redudnant files in the docs folder, updated the main README

* .

* consolidate the 2 identical ZerlegeZeile() function and move it to Helper.cpp and add workaround for whitespace and equal sign in password fields

* remove redundant code in HelperZerlegeZeile()
2022-11-11 19:11:53 +01:00
CaCO3
2b0e0f7d4e MQTT improvements (#1302)
* Update server_mqtt.cpp

* Update server_mqtt.cpp

* skipp all MQTT publishing until the next round if an error occures

* improve logging

* only use group for uid and topic if there is more than one number

* .

* .
2022-11-09 18:25:24 +01:00
CaCO3
d1e7ef1fce Add tag to logfile write (#1287)
* HTML: implement data viewer

* Correct CSV error

* Improve OTA

* Use consistent Log TAG syntax, name TAG variable the same in every file.

* .

* .

* .

* .

* .

* Update server_tflite.cpp

* Correct CSV error

* Improve OTA

* Use consistent Log TAG syntax, name TAG variable the same in every file.

* .

* .

* .

* .

* .

* Update server_tflite.cpp

* .

* .

* .

* .

* .

* .

* .

* .

Co-authored-by: jomjol <30766535+jomjol@users.noreply.github.com>
2022-11-06 08:13:53 +01:00
CaCO3
3e082ed06e Enhance homeassistant discovery (V5) (#1275)
* manual re-creation of #1246

* removed non-working approach to get interval

* postpone the MQTT service start until the ClassFlowControll::ReadParameter() gets called

* Increase the max_uri_handlers to 35 (was 30)

* removed newlines in logs

* added parameter to UI

* Register handler to re-start MQTT Discovery

* fix param
2022-11-05 19:32:58 +01:00
jomjol
7e26744e2e Revert "Revert "System instable""
This reverts commit 1d9ef7e634.
2022-11-04 21:59:22 +01:00
CaCO3
1d9ef7e634 Revert "System instable"
This reverts commit cb84074981339d44266a1a999a7567a722af11f4.

Cleanup REST API (#1255)

* Replaced URIs:
- value.html => value
- statusflow.html => statusflow
- cputemp.html => cputemp
- rssi.html => rssi
- statusflow.html => statusflow

Removed URLs:
 - wasserzaehler.html

* keep legacy API

* .

* .

* .

* .

* .

* .

* updated links

Remove ErrorMessage

Fix various warnings which become fatal with later gcc versons in esp-idf 5.x (#1268)

- we cannot use partial initialisation of structs in C++ files (copied from example C files initially it seems)
- IRAM_ATTR uses a COUNTER, do not use the attribute on the implementation
- provide missing copy implementations for Rgb and Hsv
- one no longer can |= on volatile variables; use = | instead
- fix project and header includes
- avoid redefining BLINK_GPIO
- Remove defined but unused variables
- Fix printf formats
- Add missing case statement (HTTP_EVENT_REDIRECT)
- RMT needs to be updated to new interface (CONFIG_RMT_SUPPRESS_DEPRECATE_WARN is on currently; see https://docs.espressif.com/projects/esp-idf/en/release-v5.0/esp32/api-reference/peripherals/rmt.html)
- Adjust tcpip_adpater_* to esp_netif_*
- Use buffered versions of *ntoa* functions for IPv4 addresses and not a static on the stack (also fixes warnings)
- Whatever I missed

Correct spelling of "Hostname" (#1270)

Correct sdkonfig

Increase max handler due to new handlers

Revert "Cleanup REST API (#1255)"

This reverts commit f3e73ec64a.

Revert "Increase max handler due to new handlers"

This reverts commit cbd63ad4bd.

System instable

Revert "Revert "Cleanup REST API (#1255)""

This reverts commit 2793c761413ffb987ab6a75da372e00e9f2f2cbd.

Co-Authored-By: Bjoern A. Zeeb <patch@zabbadoz.net>
2022-11-04 21:59:01 +01:00
CaCO3
ff726485ba Improve MQTT (#1232)
added shared variable for autointerval to use it as MQTT LWT timeout
2022-10-30 20:08:14 +01:00
CaCO3
d21a38f42f Added parameter to enable/disable Homeassistant Discovery 2022-10-29 18:45:47 +02:00
CaCO3
9b9a7537f1 . 2022-10-29 12:06:20 +02:00
CaCO3
56d8c65008 add maintopic to entity name to get a better entity ID. For some undocumented reason, HA removes the maintopic again in the name, so it looks ok :) 2022-10-29 11:50:19 +02:00
CaCO3
0867dcc6da . 2022-10-28 22:58:39 +02:00
CaCO3
b9f57edb92 added separate binary sensor "problem" indicating an error state 2022-10-28 22:53:23 +02:00
CaCO3
7ebbba3cf2 refactoring 2022-10-28 17:50:27 +02:00
CaCO3
5188734c8b added device classes 2022-10-28 17:09:32 +02:00
CaCO3
4e476a75ca changed error topic to a binary sensor, removed meas unit if it has no unit 2022-10-28 16:53:55 +02:00
CaCO3
7a037a3254 adjusted icons 2022-10-28 16:27:00 +02:00
CaCO3
f6b44ac905 renaming 2022-10-28 16:11:09 +02:00
CaCO3
deecc128be added user friendly name, corrected Wifi icon 2022-10-28 16:00:13 +02:00
CaCO3
6cdbe38717 . 2022-10-27 23:35:48 +02:00
CaCO3
fe0d0c2590 . 2022-10-27 23:16:15 +02:00
CaCO3
44f61c7c91 . 2022-10-27 23:10:39 +02:00
CaCO3
af8b7d6824 . 2022-10-27 22:26:56 +02:00
CaCO3
648a35e4d7 Add HomeAssistant Discovery Topics 2022-10-27 22:02:21 +02:00
CaCO3
bfc7c2b8b7 . 2022-10-27 19:06:47 +02:00
CaCO3
7a280bc7c6 added callback on connected 2022-10-27 12:18:23 +02:00
CaCO3
f4ae688527 refactored check if logfile is enabled. error messages always get logged now 2022-10-27 10:44:28 +02:00
CaCO3
ca45d0a278 . 2022-10-27 10:03:05 +02:00
CaCO3
30549ac5af refactored MQTT 2022-10-27 01:09:09 +02:00
CaCO3
72e3570dc4 . 2022-10-26 22:46:01 +02:00
CaCO3
724169b059 . 2022-10-26 22:46:01 +02:00
CaCO3
96b3d7cc2f . 2022-10-26 22:46:01 +02:00
CaCO3
74c9eada47 . 2022-10-26 22:46:01 +02:00
CaCO3
98451c8fc7 renamed mainerrortopic with lwt, only send it once on connecting, minor fixes and cleanups 2022-10-26 22:46:01 +02:00
CaCO3
6b47eef4cd use unique MQTT client ID. Without this (and multiple running deevices with same ID), they disconnect each other! 2022-10-26 22:46:01 +02:00
George Ruinelli
1e698440f9 added log level to logfile, adjusted some loglevels 2022-10-22 18:05:08 +02:00
George Ruinelli
0bf8182728 . 2022-10-21 22:55:36 +02:00
jomjol
88a074dfa9 Rolling 20220928 2022-09-28 07:16:56 +02:00
CaCO3
395b471700 added return codes. Try to publish. If it fails, run MQTT init and publish again. Increased Keep Alive timeout to make sure it is greater than the flow interval 2022-09-04 17:55:22 +02:00
CaCO3
eafcdb01c2 moved log entry 2022-09-03 00:26:16 +02:00
CaCO3
3f58086aa1 Re-init MQTT if it failed last time, added log messages 2022-09-03 00:09:50 +02:00
Anthony
090f8d5cc9 Added CPU temperature to MQTT. 2022-08-27 23:59:06 -04:00
jomjol
00028010ee Rolling 20220526 2022-05-26 20:31:26 +02:00
jomjol
0e90bcb2ef Rolling 20220320 2022-03-20 21:36:44 +01:00