Skip to content

Commit eebcfb7

Browse files
committed
Various improvements and some fixes
- Various adaptations for Debian 12 (Bookworm) - showcase: Move all demo-related parts to a new subproject 'showcase' - resources: Extend API, make state attribute methods like 'isBusy()' available in 'CResource' - resources: Add new type 'rcPower'; add 'CRcValueState::ToHuman()' - resources: Add support for info/warning messages by script drivers; Fix driving for keep-running drivers; Add capturing of stderr - brownies: Add retry loop to 'IfElvI2cInit()', closes Github pull request #4 ("Retry code for failing ELV-USB-I2C device") - brownies: Fix permanent 'rcsBusy' state of shades on startup - mqtt: Correction of mqttWillPayload length (#6) - mqtt: Add support for JSON payloads - drivers: Add fingerprint driver (R503) and support tool - drivers: Add 'fronius' driver - wallclock: Add energy meter; some cleanup - wallclock: Upgrade to SDL 2.28.5 and SDL_ttf 2.20.2 - wallclock/floorplan: Improve floorplan and add support for custom icons - wallclock/floorplan: add tool 'home2l-icon' to prepare custom icons - wallclock/floorplan: add icons "fingerprint", "security" and "pool" - wallclock/floorplan: add option "attention" to customize the use state from which attention is drawn - wallclock/floorplan: improve visibility of busy resources - wallclock/floorplan, enocean: Make window handles writeable and allow to dismiss attention via UI - wallclock/music: Add option to update the database on the MPD server. - wallclock/music: Fix unsorted playlist listing - wallclock/music: Fix streamer issues and improve error handling - wallclock/calendar: Improve error handling and fix overflow on remind parsing - wallclock/calendar: Add time-out for reloading calendars - wallclock/calendar: Integrate 'patch' into Android app to fix calendar edit failures - wallclock/calendar: Integrate remind to make calendar run on Android without Linux host - wallclock/android: Rearrange directory structure for contemporary Android building using Gradle (UNTESTED, no code changes) - wallclock/android: Make APK building independent from environment settings (ANDROID_...) - wallclock/android: Cleanup APK code; drop sync2l interface; drop immersive mode - wallclock/android: Adapt to build with SDK 34 and NDK r25, OpenJDK 17 - wallclock/android: New mechanism for /etc updates without requiring root on Android device - wallclock/android + home2l-adb: Add resource to support ADB over TCP with remote enabling - wallclock/android: Upgrade to Gstreamer 1.20.7
1 parent 72d1993 commit eebcfb7

File tree

1,022 files changed

+39814
-38210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,022 files changed

+39814
-38210
lines changed

CONTENTS

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,34 @@ Gundolf Kiefer, 2018-11-21
1313

1414
2. Documentation (generated)
1515

16-
README.pdf - PDF version of README.md
17-
home2l-book.pdf - The Home2L Book
18-
home2l-api_python - Python API
19-
home2l-api_c - C/C++ API
20-
home2l-figs - Some nice figures (mainly for README.md)
21-
home2l-demo-vm.tar.gz - VirtualBox VM suitable for running the tutorial
16+
README.pdf - PDF version of README.md
17+
home2l-book.pdf - The Home2L Book
18+
home2l-api_python - Python API
19+
home2l-api_c - C/C++ API
20+
home2l-figs - Some nice figures (mainly for README.md)
21+
home2l-showcase-vbox.tar.gz
22+
- VirtualBox VM suitable for running the tutorial
2223

2324

24-
3. Main Modules
25-
26-
resources/
27-
brownies/
28-
wallclock/
29-
doorman/
25+
3. General Source Files
3026

3127
tools/ - Collection of core tools
28+
showcase/ - Examples and initial configuration files
3229
doc/ - Documentation source files
3330
locales/ - Translations
34-
35-
36-
4. Other Source Files
37-
3831
common/ - Common C source files (base, env, phone, streamer)
3932
drivers/ - Resource drivers (gpio, weather)
4033
external/ - Scripts and notes for external dependencies
4134

4235

36+
4. Main Modules
37+
38+
resources/ - Resources: library and tools
39+
brownies/ - Brownies: firmwares, library and tools
40+
wallclock/ - WallClock application
41+
doorman/ - DoorMan application
42+
43+
4344
5. Build System
4445

4546
Makefile

Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of the Home2L project.
22
#
3-
# (C) 2015-2021 Gundolf Kiefer
3+
# (C) 2015-2024 Gundolf Kiefer
44
#
55
# Home2L is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@
3737
# To run the image:
3838
# $ xhost +local:
3939
# $ docker run -ti --rm --tmpfs /tmp --name home2l-showcase --hostname home2l-showcase \
40-
# -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd \
40+
# -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --ipc=host --device /dev/snd \
4141
# gkiefer/home2l
4242

4343

@@ -83,7 +83,7 @@
8383

8484

8585
# Version of the Debian base image ...
86-
ARG DEBIAN_VERSION=bullseye
86+
ARG DEBIAN_VERSION=bookworm
8787

8888

8989
# Build version as reported by the tools ...
@@ -118,7 +118,7 @@ ARG PHONE_DEBS_BUILD
118118

119119

120120
# Install packages ...
121-
RUN sed -i.bak 's#main\$#main contrib\$#' /etc/apt/sources.list && \
121+
RUN sed -i.bak 's#main\$#main contrib\$#' /etc/apt/sources.list.d/debian.sources && \
122122
apt-get update && \
123123
apt-get -y --no-install-recommends install \
124124
make g++ git \
@@ -135,7 +135,7 @@ RUN sed -i.bak 's#main\$#main contrib\$#' /etc/apt/sources.list && \
135135
WORKDIR /tmp/src
136136
COPY . .
137137
RUN make -j8 CFG=demo WITH_PHONE=$WITH_PHONE PHONE_LIB=$PHONE_LIB BUILD_VERSION=$BUILD_VERSION install && \
138-
mkdir -p /var/opt/home2l && cp -a doc/showcase/var/* /var/opt/home2l/
138+
mkdir -p /var/opt/home2l && cp -a showcase/var/* /var/opt/home2l/
139139

140140

141141

@@ -150,7 +150,7 @@ ARG PHONE_DEBS_RUN
150150

151151

152152
# Install packages ...
153-
RUN sed -i.bak 's#main\$#main contrib\$#' /etc/apt/sources.list && \
153+
RUN sed -i.bak 's#main\$#main contrib\$#' /etc/apt/sources.list.d/debian.sources && \
154154
apt-get update && \
155155
apt-get -y --no-install-recommends install \
156156
nano less procps psmisc \
@@ -177,9 +177,9 @@ RUN adduser --uid=5000 --disabled-password --gecos "User for auto-started Home2L
177177
adduser home2l audio && \
178178
adduser home2l i2c && \
179179
adduser home2l dialout && \
180-
chown -R home2l.home2l /var/opt/home2l && \
180+
chown -R home2l:home2l /var/opt/home2l && \
181181
mkdir -p /run/mosquitto && \
182-
chown home2l.root /var/lib/mosquitto /var/log/mosquitto /run/mosquitto && \
182+
chown home2l:root /var/lib/mosquitto /var/log/mosquitto /run/mosquitto && \
183183
/opt/home2l/bin/home2l-install -y -i && \
184184
echo "export PATH=\$PATH:/opt/home2l/bin:/opt/home2l/bin/`dpkg --print-architecture`" > /home/home2l/.bashrc
185185

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ sources, which are NOT part of the Home2L project:
44
wallclock/icons
55
wallclock/sounds
66
wallclock/fonts
7+
drivers/fingerprint
78

89
To these files, the terms and conditions of their respective original license
910
apply.

Makefile

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of the Home2L project.
22
#
3-
# (C) 2015-2021 Gundolf Kiefer
3+
# (C) 2015-2024 Gundolf Kiefer
44
#
55
# Home2L is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -31,14 +31,14 @@
3131
# In all other cases, the build is performed for the current native architecture.
3232
ifeq ($(CFG),minimal)
3333
# Minimal set ...
34-
MODS ?= tools resources
34+
MODS ?= tools showcase resources
3535
DRVS ?=
3636
ARCHS ?= $(shell dpkg --print-architecture)
3737
export WITH_PYTHON ?= 0
3838
export WITH_READLINE ?= 0
3939
else ifeq ($(CFG),basic)
4040
# Basic set ...
41-
MODS ?= tools resources brownies
41+
MODS ?= tools showcase resources brownies
4242
DRVS ?= gpio mqtt brownies weather
4343
ARCHS ?= $(shell dpkg --print-architecture)
4444
# (the following WallClock settings presently have no effect, since WallClock is excluded from the basic build)
@@ -49,15 +49,15 @@ else ifeq ($(CFG),basic)
4949
export WITH_GSTREAMER ?= 0
5050
else ifeq ($(CFG),demo)
5151
# Modules for the demo image ...
52-
MODS ?= tools resources brownies wallclock locales
53-
DRVS ?= demo gpio mqtt brownies weather
52+
MODS ?= tools showcase resources brownies wallclock locales
53+
DRVS ?= demo gpio mqtt brownies weather mpd
5454
ARCHS ?= $(shell dpkg --print-architecture)
5555
export WITH_ANDROID ?= 0
5656
export WITH_PHONE ?= 0
5757
export WITH_GSTREAMER ?= 0
5858
else
5959
# Default: All modules, drivers and architectures ...
60-
MODS ?= tools resources brownies wallclock locales doorman doc
60+
MODS ?= tools showcase resources brownies wallclock locales doorman doc
6161
DRVS ?= $(shell ls drivers)
6262
ARCHS ?= amd64 armhf i386
6363
endif
@@ -205,17 +205,32 @@ docker-master:
205205

206206

207207
# Run the container (latest) ...
208+
# NOTE [2024-05-24]: The option '--ipc=host' is required to avoid WallClock crashes
209+
# but it reduces container isolation. See also:
210+
# - https://github.com/jessfraz/dockerfiles/issues/359
211+
# - https://github.com/libsdl-org/SDL/issues/4078
208212
.PHONY: docker-run
209213
docker-run:
210214
@xhost +local: && \
211215
docker run -ti --rm --tmpfs /tmp --name home2l-showcase --hostname home2l-showcase \
212-
-e DISPLAY=$$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --device /dev/snd \
216+
-e DISPLAY=$$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --ipc=host --device /dev/snd \
213217
gkiefer/home2l
214218

215219

216220

217221

218222

223+
######################### Update Copyright Notices #############################
224+
225+
226+
.PHONY: update-copyright
227+
update-copyright: clean
228+
tools/update-copyright.sh
229+
230+
231+
232+
233+
219234
############################## Main targets ####################################
220235

221236
# The following targets are equivalent to the targets of subprojects and

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ The *Home2L `[houmtu:l]`* suite is a collection of tools and libraries for autom
3333
What is New?
3434
============
3535

36-
* Several improvements and cleanups in the **Resources** library:
37-
- Support for MQTT-like and shell-like wildcards ('+', '#', '*', '?')
38-
- Default URI prefix is now always */alias*, allowing for smaller scripts
39-
- New event type *rceRequestChanged* and improved API for querying requests
40-
- Shell improvements
36+
* WallClock: Power meter for votovoltaic systems
4137

42-
* Updated **Tutorial**
38+
* WallClock: User-configurable floorplan icons
4339

44-
* Several minor improvements and fixes
40+
* WallClock: Improved and more self-contained Android app
41+
42+
* MQTT bridge: Support for JSON payloads
43+
44+
* New drivers: Fingerprint, Fronius
45+
46+
* Many small improvements and some bug fixes
4547

4648

4749

@@ -61,7 +63,7 @@ The [*Home2L Book*](home2l-book.pdf) contains a **a step-by-step tutorial demons
6163
$ docker run -ti --rm \
6264
--name home2l-showcase --hostname home2l-showcase \
6365
-e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix \
64-
--device /dev/snd \
66+
--ipc=host --device /dev/snd \
6567
gkiefer/home2l
6668

6769

README.pdf

9.8 KB
Binary file not shown.

Setup.mk

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of the Home2L project.
22
#
3-
# (C) 2015-2021 Gundolf Kiefer
3+
# (C) 2015-2024 Gundolf Kiefer
44
#
55
# Home2L is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by
@@ -72,7 +72,7 @@ SHELL := /bin/bash
7272

7373

7474
# Python (used in 'resources') ...
75-
PYTHON_INCLUDE := /usr/include/python3.9
75+
PYTHON_INCLUDE := /usr/include/python3.11
7676

7777

7878
# C/C++ Compiler & strip option for 'install'...
@@ -91,25 +91,18 @@ ifeq ($(ARCH),$(HOST_ARCH))
9191
STRIP := -s
9292
else
9393
ifeq ($(ARCH),amd64)
94-
# Note: Cross-building for 'amd64' on 'i386' under Debian Jessie (8.0) requires
95-
# the package 'g++-multilib' (and dependencies). However, 'gcc-multilib'
94+
# Note: Cross-building for 'i386' on 'amd64' under Debian Bookworm (12) requires
95+
# the package 'gcc-multilib' (and dependencies). However, 'gcc-multilib'
9696
# conflicts with the 'armhf' cross-building tools (see below).
97-
# The workaround is to install 'g++-4.9-multilib' instead.
98-
#
99-
# Under Debian Stretch, things appear to be similar. Here, 'g++-6-multilib'
100-
# has been installed manually.
101-
#
102-
# Under Debian Buster, things appear to be similar again. Here,
103-
# 'g++-8-multilib' has been installed manually. The same holds for
104-
# compiling 'i386' binaries on an 'amd64' machine.
97+
# The workaround is to install 'g++-12-multilib' instead.
10598
ifeq ($(HOST_ARCH),i386)
10699
CC := g++ -m64 -no-pie
107100
STRIP := -s
108101
endif
109102
endif
110103
ifeq ($(ARCH),i386)
111104
# Note: Cross-building for 'i386' on 'amd64' works after installing
112-
# 'g++-10-multilib' (see comments above).
105+
# 'g++-*-multilib' (see comments above).
113106
ifeq ($(HOST_ARCH),amd64)
114107
CC := g++ -m32 -no-pie
115108
STRIP := -s

brownies/avr/Family.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is part of the Home2L project.
22
#
3-
# (C) 2015-2021 Gundolf Kiefer
3+
# (C) 2015-2024 Gundolf Kiefer
44
#
55
# Home2L is free software: you can redistribute it and/or modify
66
# it under the terms of the GNU General Public License as published by

brownies/avr/configure.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of the Home2L project.
33
*
4-
* (C) 2015-2021 Gundolf Kiefer
4+
* (C) 2015-2024 Gundolf Kiefer
55
*
66
* Home2L is free software: you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by

brownies/avr/twi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is part of the Home2L project.
33
*
4-
* (C) 2015-2021 Gundolf Kiefer
4+
* (C) 2015-2024 Gundolf Kiefer
55
*
66
* Home2L is free software: you can redistribute it and/or modify
77
* it under the terms of the GNU General Public License as published by
@@ -71,7 +71,7 @@
7171
*
7272
* For handling slave communication, two actors (logical threads/processes) have to be distinguished:
7373
*
74-
* a) ISR - The slave ISR in interaction with 'TwiSlIterate()', the functionality implemented in this module.
74+
* a) ISR - The slave ISR in interaction with 'TwiSlIterate()', the functionality implemented in this module.
7575
* b) APP - The (application) routines that generate replies on requests. These may be the
7676
* application, the hub (below) or the error handler in 'TwiSlIterate()'.
7777
*
@@ -659,7 +659,7 @@ EBrStatus TwiSlIterate () {
659659

660660
case slsSendingStall:
661661
// Master is waiting for a reply, but none has been prepared yet.
662-
// If the message received so far with error, we prepare the reply here.
662+
// If the message received so far has an error, we prepare the reply here.
663663
// If the message is OK or for a child (hub), the main program must prepare the reply.
664664

665665
// Handle completed requests, reply to faulty requests to the own host ...
@@ -1067,8 +1067,8 @@ void TwiHubIterate () {
10671067
hubState = hsIdle;
10681068
}
10691069
// Fall through to 'hsIdle' handling ...
1070-
// This is important to handle the master bus locking situations that in this
1071-
// we caused ourselves.
1070+
// This is important to handle the master bus locking situations that in
1071+
// this case we caused ourselves.
10721072
case hsIdle:
10731073

10741074
// Check for resurrection request ...
@@ -1153,7 +1153,7 @@ void TwiHubIterate () {
11531153
}
11541154
}
11551155
else {
1156-
if (slReqStatus != brIncomplete) { // request comlete and completely forwarded?
1156+
if (slReqStatus != brIncomplete) { // request complete and completely forwarded?
11571157
TwiMaSendStop ();
11581158
hubState = hsIdle;
11591159
}

0 commit comments

Comments
 (0)