Skip to content

Commit

Permalink
Merge pull request #5391 from domoticz/2022.2-dp
Browse files Browse the repository at this point in the history
stable 2022.2
  • Loading branch information
gizmocuz committed Nov 5, 2022
2 parents c952685 + 77c468a commit eea9db7
Show file tree
Hide file tree
Showing 272 changed files with 14,526 additions and 11,702 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ name: Domoticz Development (Beta)

on:
push:
branches: [ development ]
branches:
- development
paths-ignore:
- 'msbuild/**'
- '.github/**'
- 'tools/**'
- '**.md'
- '**.txt'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
72 changes: 45 additions & 27 deletions .github/workflows/pull_request_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@ on:
branches:
- development
- master
paths-ignore:
- 'msbuild/**'
- '.github/**'
- 'tools/**'
- '**.md'
- '**.txt'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
PR_NR: ${{ github.event.pull_request.number }}

jobs:
# This workflow contains a single job called "build"
build:
Expand All @@ -26,15 +35,16 @@ jobs:
- name: prepare environment
run: |
sudo timedatectl set-timezone Europe/Amsterdam
buildnr=$(git rev-list HEAD --count)
echo "BUILDNR=$(($buildnr + 2107))" >> $GITHUB_ENV
if [ "${GITHUB_EVENT_NAME}" == 'pull_request' ]; then
echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
echo "PRNUMBER=$(echo ${GITHUB_EVENT_ISSUE_NUMBER})" >> $GITHUB_ENV
echo "PRNUMBER=$(echo ${PR_NR})" >> $GITHUB_ENV
echo "Domoticz build for PR ${PR_NR}! Building version $(($buildnr + 2107)) from branch ${GITHUB_HEAD_REF}"
else
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
echo "PRNUMBER=$(echo ${GITHUB_SHA})" >> $GITHUB_ENV
fi
buildnr=$(git rev-list HEAD --count)
echo "BUILDNR=$(($buildnr + 2107))" >> $GITHUB_ENV
# install dependencies
- name: dependencies
Expand All @@ -45,21 +55,21 @@ jobs:
sudo apt-get install lua5.3 luarocks
sudo luarocks install busted
sudo luarocks install luacov
sudo luarocks install lodash
# Disabled March 2022 - sudo luarocks install lodash

# get CMake
- name: cmake-compile
run: |
curl -sSL https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.tar.gz -o cmake.tar.gz;
curl -sSL https://github.com/Kitware/CMake/releases/download/v3.24.0/cmake-3.24.0-Linux-x86_64.tar.gz -o cmake.tar.gz;
sudo tar xf cmake.tar.gz --strip 1 -C /usr/local;
export PATH=/usr/local/bin:$PATH;
# Boost
- name: build boost libraries
run: |
wget https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz >> /dev/null 2>&1
tar xfz boost_1_76_0.tar.gz
cd boost_1_76_0/
wget https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.gz >> /dev/null 2>&1
tar xfz boost_1_79_0.tar.gz
cd boost_1_79_0/
./bootstrap.sh
./b2 stage threading=multi link=static --with-thread --with-system --with-chrono >> /dev/null 2>&1
sudo ./b2 install threading=multi link=static --with-thread --with-system --with-chrono >> /dev/null 2>&1
Expand All @@ -81,14 +91,14 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=open-zwave-read-only CMakeLists.txt
make
# Run automated tests
- name: unit-tests domoticz-dzVents
run: |
cd $GITHUB_WORKSPACE/dzVents/runtime/tests
busted --coverage -o TAP *
luacov
tail -19 luacov.report.out
continue-on-error: true
# Run automated tests (disabled March 2022)
#- name: unit-tests domoticz-dzVents
# run: |
# cd $GITHUB_WORKSPACE/dzVents/runtime/tests
# busted --coverage -o TAP *
# luacov
# tail -19 luacov.report.out
# continue-on-error: true

- name: functional-tests domoticz
run: |
Expand All @@ -99,14 +109,22 @@ jobs:
sudo kill -s TERM `sudo cat /var/run/domoticz.pid`
continue-on-error: true

# Upload artifacts
#- uses: actions/upload-artifact@v2
# with:
# name: Domoticz-${{ env.BUILDNR }}-${{ env.BRANCH_NAME }}
# path: |
# domoticz
# appversion.h.txt
# www/
# lib/
# !**/*.tar.gz
# retention-days: 7
# Packaging
- name: package domoticz
# if: ${{ false }}
run: |
cd $GITHUB_WORKSPACE
mkdir package
tar czf package/domoticz_linux_x86_64.tgz domoticz History.txt License.txt domoticz.sh server_cert.pem updatebeta updaterelease www/ scripts/ Config/ dzVents/
shasum -a 256 package/domoticz_linux_x86_64.tgz > package/domoticz_linux_x86_64.tgz.sha256sum
cp appversion.h.txt package/version_linux_x86_64.h
cp History.txt package/history_linux_x86_64.txt
# Artifact upload
- name: Upload artifacts
# if: ${{ false }}
uses: actions/upload-artifact@v2
with:
name: domoticz_linux_x86_64-${{ github.event.pull_request.number }}-${{ github.run_number }}
path: package/domoticz_linux_x86_64.tgz
retention-days: 7
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ CMakeFiles
*.tlog
CMakeCache.txt
domoticz
domoticztester
!scripts/logrotate/domoticz
stdafx.h.gch
.DS_Store
.AppleDouble
Config/OZW_Log.txt
Config/zwscene.xml
backups/
build/
domocookie.txt
domoticz.exe
nohup.out
Expand All @@ -51,3 +53,4 @@ sqlite3_config.h
/node_modules/
/domoticz.iml
__pycache__
/.vs/
43 changes: 39 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ hardware/SolarMaxTCP.cpp
hardware/Sterbox.cpp
hardware/SysfsGpio.cpp
hardware/Tado.cpp
hardware/TCPProxy/tcpproxy_server.cpp
hardware/TE923.cpp
hardware/TE923Tool.cpp
hardware/TeleinfoBase.cpp
Expand Down Expand Up @@ -366,8 +365,6 @@ webserver/connection_manager.cpp
webserver/cWebem.cpp
webserver/fastcgi.cpp
webserver/mime_types.cpp
webserver/proxycereal.cpp
webserver/proxyclient.cpp
webserver/reply.cpp
webserver/request_handler.cpp
webserver/request_parser.cpp
Expand Down Expand Up @@ -396,6 +393,28 @@ add_executable(domoticz ${domoticz_SRCS})
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
#SET(EXECUTABLE_OUTPUT_PATH "" CACHE INTERNAL "Where to put the executables for Domoticz")

# Target
set(
domoticztester_SRCS
main/stdafx.cpp
main/Helper.cpp
main/CmdLine.cpp
main/domoticz_tester.cpp
main/BaroForecastCalculator.cpp
main/HTMLSanitizer.cpp
main/localtime_r.cpp
main/SunRiseSet.cpp
main/TrendCalculator.cpp
main/WindCalculation.cpp
main/json_helper.cpp
hardware/ColorSwitch.cpp
)

#main/IFTTT.cpp

add_executable(domoticztester ${domoticztester_SRCS})
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})

#
# LUA
#
Expand Down Expand Up @@ -513,6 +532,7 @@ IF(USE_BUILTIN_JSONCPP)
set(JSONCPP_WITH_PKGCONFIG_SUPPORT OFF CACHE BOOL "Enable jsoncpp pkgconfig support" FORCE)
add_subdirectory (extern/jsoncpp EXCLUDE_FROM_ALL)
target_link_libraries(domoticz jsoncpp_static)
target_link_libraries(domoticztester jsoncpp_static)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extern/jsoncpp/include)
ELSE(USE_BUILTIN_JSONCPP)
find_package(PkgConfig)
Expand All @@ -522,18 +542,22 @@ ELSE(USE_BUILTIN_JSONCPP)
target_include_directories(domoticz PRIVATE ${JSONCPP_INCLUDE_DIRS})
target_link_directories(domoticz PRIVATE ${JSONCPP_LIBRARY_DIRS})
target_link_libraries(domoticz ${JSONCPP_LIBRARIES})
target_include_directories(domoticztester PRIVATE ${JSONCPP_INCLUDE_DIRS})
target_link_directories(domoticztester PRIVATE ${JSONCPP_LIBRARY_DIRS})
target_link_libraries(domoticztester ${JSONCPP_LIBRARIES})
ELSE(JSONCPP_FOUND)
MESSAGE(FATAL_ERROR "JSONCPP not found on your system! try 'sudo apt-get install jsoncpp-dev'")
ENDIF(JSONCPP_FOUND)
ENDIF(USE_BUILTIN_JSONCPP)

# mosquitto
IF(USE_BUILTIN_MQTT)
MESSAGE(STATUS "Using builtin Mosquitto library")
option(WITH_STATIC_LIBRARIES "Build static versions of the libmosquitto/pp libraries?" ON)
option(DOCUMENTATION "Build documentation?" OFF)
add_subdirectory (extern/mosquitto EXCLUDE_FROM_ALL)
target_link_libraries(domoticz libmosquitto_static)
target_link_libraries(domoticztester libmosquitto_static)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extern/mosquitto/include)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extern/mosquitto/lib)
ELSE(USE_BUILTIN_MQTT)
Expand All @@ -552,6 +576,7 @@ IF(USE_BUILTIN_SQLITE)
MESSAGE(STATUS "Using builtin SQLite library")
add_subdirectory (extern/sqlite-amalgamation EXCLUDE_FROM_ALL)
target_link_libraries(domoticz SQLite3)
target_link_libraries(domoticztester SQLite3)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extern/sqlite-amalgamation)
ELSE(USE_BUILTIN_SQLITE)
find_package(SQLite3)
Expand All @@ -560,6 +585,7 @@ ELSE(USE_BUILTIN_SQLITE)
MESSAGE(STATUS "SQLite includes found at: ${SQLite3_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES(${SQLite3_INCLUDE_DIRS})
target_link_libraries(domoticz ${SQLite3_LIBRARIES})
target_link_libraries(domoticztester ${SQLite3_LIBRARIES})
ELSE(SQLite3_FOUND)
MESSAGE(FATAL_ERROR "SQLite3 not found on your system! try 'sudo apt-get install libsqlite3-dev'")
ENDIF(SQLite3_FOUND)
Expand All @@ -569,6 +595,7 @@ ENDIF(USE_BUILTIN_SQLITE)
IF(USE_BUILTIN_MINIZIP)
add_subdirectory (extern/minizip EXCLUDE_FROM_ALL)
target_link_libraries(domoticz minizip)
target_link_libraries(domoticztester minizip)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/extern/minizip)
ELSE(USE_BUILTIN_MINIZIP)
find_package(PkgConfig)
Expand All @@ -578,6 +605,9 @@ ELSE(USE_BUILTIN_MINIZIP)
target_include_directories(domoticz PRIVATE ${MINIZIP_INCLUDE_DIRS})
target_link_directories(domoticz PRIVATE ${MINIZIP_LIBRARY_DIRS})
target_link_libraries(domoticz ${MINIZIP_LIBRARIES})
target_include_directories(domoticztester PRIVATE ${MINIZIP_INCLUDE_DIRS})
target_link_directories(domoticztester PRIVATE ${MINIZIP_LIBRARY_DIRS})
target_link_libraries(domoticztester ${MINIZIP_LIBRARIES})
ELSE(MINIZIP_FOUND)
MESSAGE(FATAL_ERROR "MINIZIP not found on your system! try 'sudo apt-get install minizip-dev'")
ENDIF(MINIZIP_FOUND)
Expand All @@ -599,13 +629,15 @@ IF(NOT OPENSSL_FOUND)
find_library(MD_LIBRARY NAMES md)
IF(MD_LIBRARY)
target_link_libraries(domoticz ${MD_LIBRARY})
target_link_libraries(domoticztester ${MD_LIBRARY})
ENDIF(MD_LIBRARY)
ELSE()
message(STATUS "OPENSSL library found at: ${OPENSSL_LIBRARIES}")
add_definitions(-DWWW_ENABLE_SSL)
add_definitions(-DWITH_TLS)
include_directories(${OPENSSL_INCLUDE_DIR})
target_link_libraries(domoticz ${OPENSSL_LIBRARIES})
target_link_libraries(domoticztester ${OPENSSL_LIBRARIES})
ENDIF()

#
Expand Down Expand Up @@ -746,6 +778,7 @@ ELSE()
ENDIF(TELLDUSCORE_INCLUDE)

target_link_libraries(domoticz ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${MQTT_LIBRARIES} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES})
target_link_libraries(domoticztester ${Boost_LIBRARIES} ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${CURL_LIBRARIES} pthread ${MQTT_LIBRARIES} ${LUA_LIBRARIES} ${CMAKE_DL_LIBS} ${TELLDUS_LIBRARIES})

IF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(domoticz -lresolv)
Expand All @@ -755,11 +788,13 @@ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(domoticz ${EXECINFO_LIBRARIES})
ELSE()
target_link_libraries(domoticz -lrt -lresolv ${EXECINFO_LIBRARIES})
target_link_libraries(domoticztester -lrt -lresolv ${EXECINFO_LIBRARIES})
ENDIF()

IF(USE_PRECOMPILED_HEADER)
message(STATUS "Using precompiled headers")
target_precompile_headers(domoticz PRIVATE "main/stdafx.h")
target_precompile_headers(domoticztester PRIVATE "main/stdafx.h")
ENDIF(USE_PRECOMPILED_HEADER)

IF(CMAKE_COMPILER_IS_GNUCXX)
Expand Down
45 changes: 45 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
Version 2022.2 (November 5 2022)
- Implemented: Blockly, added 'Toggle' set command
- Implemented: Camera, camera Aspect Ratio
- Implemented: Commandline option '-weblog <weblogfile>' which creates Apache Combined Logformat logs containg all webrequests
- Implemented: Counters, support for larger counter values/usage
- Implemented: Dashboard, temperature Trend indication
- Implemented: Docker startup script (for instance to install additional packages)
- Implemented: EcoDevices, complete support for EcoDevices RT2 with firmware 3.00.xx
- Implemented: FritzBox, more statistics
- Implemented: Fritzbox, up/download statistics
- Implemented: MQTT Auto Discovery Protocol (Zigbee2MQTT/ Z-Wave JS UI)
- Implemented: P1 Meter, added Current L1/L2/L3 sensor for delivered
- Implemented: Philips Hue, support color change on some vendors bulb (like LIDL)
- Implemented: RFXCom, added internal support for Novy Mood, Level Sensor
- Implemented: SolarEdge, more sensors support
- Implemented: UVI device, added multiply field to widget
- Implemented: Xiaomi Gateway, new model for wired single key switch
- Updated: Mercedes EV, new Token URL (changed November 2022)
- Changed: All inverted Blinds types should not be used anymore, instead use the regular blinds and set the needed Reverse option
- Changed: Blinds working (see https://www.domoticz.com/wiki/Blinds)
- Changed: Energy devices have more precision
- Changed: kWh devices MAX Power per phase from 10000 to 18400 (230V*80A)
- Changed: P1 Meter, changed P1 Max W from 17250 (25A) to 55200 (80A)
- Changed: P1 Meter, speed up CRC calculation
- Changed: Webserver, removing AppCache, switching to service worker
- Fixed: Blockly, keeping last dim level when switching OFF, option for Close state
- Fixed: Counter incremental, counter in report (when used with meter offset)
- Fixed: Counter short-term log 1 hour offset
- Fixed: Counters, rounding (number of decimals) in GUI
- Fixed: Crash when secure webserver could not start and applying settings
- Fixed: Dimmer, better handling of last dimmer level when switching on/off
- Fixed: EvoHome, correct state/mode for EvoHome type
- Fixed: Floorplan, custom utility icons corrected in Floorplan
- Fixed: Floorplan, fixed blinds state icon/switching
- Fixed: Floorplan, making sure the Door Lock is switchable in the Floorplan
- Fixed: Floorplans, fixed issues with the displaying of some icons
- Fixed: Notification system, prevent double start
- Fixed: P1 Meter, fix for Sibelga smart meters that use a too long string as an identifier
- Fixed: RFXCom, corrected RFXCom solar sensor reading
- Fixed: Temperature, corrected chill calculation
- Fixed: WebGUI, making sure status does not wrap in mobile mode
- Removed: AppCache
- Deprecated: OpenZWave, please move to MQTT Auto Discovery and ZWave JS UI (Project stopped a long time ago!)
- For a full detailed overview visit: https://www.domoticz.com/wiki/Domoticz_versions_-_Commits

Version 2022.1 (January 31 2022)
- Implemented: Added Irrigation icon (also thanks to dbemowsk)
- Implemented: Build system, implemented unit tests
Expand Down
Loading

0 comments on commit eea9db7

Please sign in to comment.