From 8094f058dbe9658f72e2a995065a927841e59fa8 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 1 May 2022 18:11:26 +0200 Subject: [PATCH 1/9] updated --- ChangeLog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 2714923f..4295b89b 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,6 +5,7 @@ * fix missing MQTT topic prefix with "--mqttint=..." * fix weird SSL connect errors * fix for /decode endpoint +* fix for Home Assistant MQTT discovery config to truncate long updatecheck string ## Features * add timeout check to arbitration @@ -12,6 +13,7 @@ * add "isreverse" to /datatype endpoint * add high speed serial mode to enhanced protocol * add support for flashing via network to ebuspicloader +* add possibility to use "--mqttvar=..." multiple times to easy overriding integration settings # 22.2 (2022-02-27) From 35b8156ba26ecc3f7ecc81f6d9b617ee3227f06c Mon Sep 17 00:00:00 2001 From: John Date: Sun, 8 May 2022 19:23:39 +0200 Subject: [PATCH 2/9] add short grab result --- src/ebusd/bushandler.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ebusd/bushandler.cpp b/src/ebusd/bushandler.cpp index d268f4ef..edebc5c8 100644 --- a/src/ebusd/bushandler.cpp +++ b/src/ebusd/bushandler.cpp @@ -268,6 +268,18 @@ bool GrabbedMessage::dump(bool unknown, MessageMap* messages, bool first, Output } symbol_t dstAddress = m_lastMaster[1]; if (outputFormat & OF_JSON) { + if (outputFormat & OF_SHORT) { + *output << '"' << m_lastMaster.getStr() << '/'; + if (dstAddress != BROADCAST && !isMaster(dstAddress)) { + *output << m_lastSlave.getStr(); + } + *output << '/' << static_cast(m_count); + if (message) { + *output << '/' << message->getName(); + } + *output << '"'; + return true; + } *output << "\n{"; if (m_lastMaster.dumpJson(false, output)) { *output << ", "; @@ -1498,13 +1510,18 @@ void BusHandler::formatUpdateInfo(ostringstream* output) const { << ",\"co\":" << (m_addressConflict ? 1 : 0); if (m_grabMessages) { size_t unknownCnt = 0; + *output << ",\"gm\":["; + bool first = true; for (auto it : m_grabbedMessages) { + if (it.second.dump(false, m_messages, first, OF_JSON|OF_SHORT, output)) { + first = false; + } Message* message = m_messages->find(it.second.getLastMasterData()); if (!message) { unknownCnt++; } } - *output << ",\"gu\":" << unknownCnt; + *output << "],\"gu\":" << unknownCnt; } unsigned char address = 0; for (int index = 0; index < 256; index++, address++) { From 35a4642672f960b427bdddaa564042f5c1ce213b Mon Sep 17 00:00:00 2001 From: John Date: Sun, 8 May 2022 19:36:50 +0200 Subject: [PATCH 3/9] updated --- ChangeLog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 4295b89b..bb9c2922 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,4 @@ -# 22.3 (tbd) +# 22.3 (2022-05-08) ## Bug Fixes * fix potential race condition in connection handling * fix ebusctl final read @@ -13,7 +13,7 @@ * add "isreverse" to /datatype endpoint * add high speed serial mode to enhanced protocol * add support for flashing via network to ebuspicloader -* add possibility to use "--mqttvar=..." multiple times to easy overriding integration settings +* add allow using "--mqttvar=..." multiple times to ease overriding integration settings # 22.2 (2022-02-27) From 1b1aed540457e5722d7c1e5f2a777a4d92f3ffe9 Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 8 May 2022 19:50:35 +0200 Subject: [PATCH 4/9] updated version to 22.3 --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + VERSION | 2 +- contrib/alpine/APKBUILD | 2 +- contrib/archlinux/PKGBUILD | 2 +- contrib/archlinux/PKGBUILD.git | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 96e30b87..6cb7c50e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -36,6 +36,7 @@ body: options: - current source from git - latest release + - '22.3' - '22.2' - '22.1' - '21.3' diff --git a/VERSION b/VERSION index e14b86cd..0fed423e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -22.2 \ No newline at end of file +22.3 \ No newline at end of file diff --git a/contrib/alpine/APKBUILD b/contrib/alpine/APKBUILD index 96a227a2..aba2c5dc 100644 --- a/contrib/alpine/APKBUILD +++ b/contrib/alpine/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Tim # Maintainer: Tim pkgname=ebusd -pkgver=22.2 +pkgver=22.3 pkgrel=0 pkgdesc="Daemon for communication with eBUS heating systems" url="https://github.com/john30/ebusd" diff --git a/contrib/archlinux/PKGBUILD b/contrib/archlinux/PKGBUILD index 90e6e9b2..53c48ecd 100644 --- a/contrib/archlinux/PKGBUILD +++ b/contrib/archlinux/PKGBUILD @@ -2,7 +2,7 @@ # Contributor: Milan Knizek # Usage: makepkg pkgname=ebusd -pkgver=22.2 +pkgver=22.3 pkgrel=1 pkgdesc="ebusd, the daemon for communication with eBUS heating systems." arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') diff --git a/contrib/archlinux/PKGBUILD.git b/contrib/archlinux/PKGBUILD.git index 69e05189..40547a7e 100644 --- a/contrib/archlinux/PKGBUILD.git +++ b/contrib/archlinux/PKGBUILD.git @@ -3,7 +3,7 @@ # Usage: makepkg -p PKGBUILD.git pkgname=ebusd-git _gitname=ebusd -pkgver=22.2 +pkgver=22.3 pkgrel=1 pkgdesc="ebusd, the daemon for communication with eBUS heating systems." arch=('i686' 'x86_64' 'armv6h' 'armv7h' 'aarch64') From 7f17cca8effa694b6981506b482a2299ef2cefba Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 8 May 2022 21:22:00 +0200 Subject: [PATCH 5/9] updated to 22.3 --- contrib/alpine/APKBUILD | 2 +- contrib/archlinux/PKGBUILD | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/alpine/APKBUILD b/contrib/alpine/APKBUILD index aba2c5dc..36d1c328 100644 --- a/contrib/alpine/APKBUILD +++ b/contrib/alpine/APKBUILD @@ -30,5 +30,5 @@ package() { } sha512sums=" -e98471b56d1a875f1fdc966a1f91776d8675d244836c7c8e2987fef9dce48d76b55b612fe51dfeab4a134763f20ca9ec6e1ef5f814690f63505c8c56570432cb ebusd-22.2.tar.gz +565a2a95841680825a29a67dfed2277188951574b3bee7ac75667e264163288d7ebda03112ca5dbeafa96f44e22480203dcde50a46b8cc82597e385e4fa134c2 ebusd-22.3.tar.gz " diff --git a/contrib/archlinux/PKGBUILD b/contrib/archlinux/PKGBUILD index 53c48ecd..96bf2ad1 100644 --- a/contrib/archlinux/PKGBUILD +++ b/contrib/archlinux/PKGBUILD @@ -41,4 +41,4 @@ package() { install -m 0644 contrib/etc/ebusd/mqtt-integration.cfg "${pkgdir}/etc/ebusd/mqtt-integration.cfg" } # update md5sums: updpkgsums -md5sums=('88c67b36d4fc90d1e2026cdbb9b496e3') +md5sums=('8e2d7e6fe8021dc792e381f4a7468e9d') From ec40589a4a97a48d4bb8fd80b1a8a6766b736062 Mon Sep 17 00:00:00 2001 From: John Date: Sun, 8 May 2022 21:30:29 +0200 Subject: [PATCH 6/9] add sponsor badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1baf9d66..e7a537d6 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ ebusd is a daemon for handling communication with eBUS devices connected to a [![Docker Downloads](https://img.shields.io/docker/pulls/john30/ebusd)](https://hub.docker.com/repository/docker/john30/ebusd) [![Release](https://img.shields.io/github/v/release/john30/ebusd)](https://github.com/john30/ebusd/releases/latest) [![GitHub Discussions](https://img.shields.io/github/discussions/john30/ebusd)](https://github.com/john30/ebusd/discussions) +[![Sponsors](https://img.shields.io/github/sponsors/john30)](https://github.com/sponsors/john30) Features -------- From 38388a8a93d94f61f0aa470969187d218f033cb8 Mon Sep 17 00:00:00 2001 From: john30 Date: Mon, 9 May 2022 20:54:18 +0200 Subject: [PATCH 7/9] use glob to find mqtt cfg files (fixes #601) --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b89c0a3..43743b7a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,5 +165,6 @@ if(EXISTS "${ROOT}/etc/debian_version") install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/systemd/ebusd.service DESTINATION /lib/systemd/system/) endif() if(HAVE_MQTT) - install(FILES ${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/mqtt-*.cfg DESTINATION /etc/ebusd/) -endif(HAVE_MQTT) \ No newline at end of file + FILE(GLOB MQTT_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/mqtt-*.cfg") + install(FILES ${MQTT_CFG_FILES} DESTINATION /etc/ebusd/) +endif(HAVE_MQTT) From 5d51534670f6a6fc1f8ac1bfc79cf814983bffb2 Mon Sep 17 00:00:00 2001 From: john30 Date: Mon, 9 May 2022 21:25:32 +0200 Subject: [PATCH 8/9] remove unnecessary install cmds --- contrib/alpine/APKBUILD | 2 -- 1 file changed, 2 deletions(-) diff --git a/contrib/alpine/APKBUILD b/contrib/alpine/APKBUILD index 36d1c328..d9c494c1 100644 --- a/contrib/alpine/APKBUILD +++ b/contrib/alpine/APKBUILD @@ -25,8 +25,6 @@ check() { package() { DESTDIR="$pkgdir" cmake --install build - install -D -m 644 "$srcdir"/"$pkgname-$pkgver"/contrib/etc/ebusd/mqtt-hassio.cfg "$pkgdir"/etc/ebusd/mqtt-hassio.cfg - install -D -m 644 "$srcdir"/"$pkgname-$pkgver"/contrib/etc/ebusd/mqtt-integration.cfg "$pkgdir"/etc/ebusd/mqtt-integration.cfg } sha512sums=" From 458c8dfbc7006a415720bb3e0f90301de0359a2b Mon Sep 17 00:00:00 2001 From: john30 Date: Fri, 13 May 2022 18:10:38 +0200 Subject: [PATCH 9/9] fix invalid short char option names --- src/ebusd/main.cpp | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/ebusd/main.cpp b/src/ebusd/main.cpp index 73c23156..01ba4653 100644 --- a/src/ebusd/main.cpp +++ b/src/ebusd/main.cpp @@ -158,40 +158,40 @@ static HttpClient* s_configHttpClient = nullptr; static const char argpdoc[] = "A daemon for communication with eBUS heating systems."; -#define O_INISND 1 -#define O_DEVLAT (O_INISND+1) -#define O_CFGLNG (O_DEVLAT+1) -#define O_CHKCFG (O_CFGLNG+1) -#define O_DMPCFG (O_CHKCFG+1) -#define O_DMPCTO (O_DMPCFG+1) -#define O_POLINT (O_DMPCTO+1) -#define O_CAFILE (O_POLINT+1) -#define O_CAPATH (O_CAFILE+1) -#define O_ANSWER (O_CAPATH+1) -#define O_ACQTIM (O_ANSWER+1) -#define O_ACQRET (O_ACQTIM+1) -#define O_SNDRET (O_ACQRET+1) -#define O_RCVTIM (O_SNDRET+1) -#define O_MASCNT (O_RCVTIM+1) -#define O_GENSYN (O_MASCNT+1) -#define O_ACLDEF (O_GENSYN+1) -#define O_ACLFIL (O_ACLDEF+1) -#define O_HEXCMD (O_ACLFIL+1) -#define O_DEFCMD (O_HEXCMD+1) -#define O_PIDFIL (O_DEFCMD+1) -#define O_LOCAL (O_PIDFIL+1) -#define O_HTTPPT (O_LOCAL+1) -#define O_HTMLPA (O_HTTPPT+1) -#define O_UPDCHK (O_HTMLPA+1) -#define O_LOG (O_UPDCHK+1) -#define O_LOGARE (O_LOG+1) -#define O_LOGLEV (O_LOGARE+1) -#define O_RAW (O_LOGLEV+1) -#define O_RAWFIL (O_RAW+1) -#define O_RAWSIZ (O_RAWFIL+1) -#define O_DMPFIL (O_RAWSIZ+1) -#define O_DMPSIZ (O_DMPFIL+1) -#define O_DMPFLU (O_DMPSIZ+1) +#define O_INISND -2 +#define O_DEVLAT (O_INISND-1) +#define O_CFGLNG (O_DEVLAT-1) +#define O_CHKCFG (O_CFGLNG-1) +#define O_DMPCFG (O_CHKCFG-1) +#define O_DMPCTO (O_DMPCFG-1) +#define O_POLINT (O_DMPCTO-1) +#define O_CAFILE (O_POLINT-1) +#define O_CAPATH (O_CAFILE-1) +#define O_ANSWER (O_CAPATH-1) +#define O_ACQTIM (O_ANSWER-1) +#define O_ACQRET (O_ACQTIM-1) +#define O_SNDRET (O_ACQRET-1) +#define O_RCVTIM (O_SNDRET-1) +#define O_MASCNT (O_RCVTIM-1) +#define O_GENSYN (O_MASCNT-1) +#define O_ACLDEF (O_GENSYN-1) +#define O_ACLFIL (O_ACLDEF-1) +#define O_HEXCMD (O_ACLFIL-1) +#define O_DEFCMD (O_HEXCMD-1) +#define O_PIDFIL (O_DEFCMD-1) +#define O_LOCAL (O_PIDFIL-1) +#define O_HTTPPT (O_LOCAL-1) +#define O_HTMLPA (O_HTTPPT-1) +#define O_UPDCHK (O_HTMLPA-1) +#define O_LOG (O_UPDCHK-1) +#define O_LOGARE (O_LOG-1) +#define O_LOGLEV (O_LOGARE-1) +#define O_RAW (O_LOGLEV-1) +#define O_RAWFIL (O_RAW-1) +#define O_RAWSIZ (O_RAWFIL-1) +#define O_DMPFIL (O_RAWSIZ-1) +#define O_DMPSIZ (O_DMPFIL-1) +#define O_DMPFLU (O_DMPSIZ-1) /** the definition of the known program arguments. */ static const struct argp_option argpoptions[] = {