-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanded to all lighting applications - backward compatible #36
Open
CABrouwers
wants to merge
16
commits into
micolous:master
Choose a base branch
from
CABrouwers:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add command to Dockerfile to automatically remove any CRLF line termination from the entry point script. They are sometimes added by git when it runs on Windows and they prevent the script from running when the file is copied back on a Linux image. Add code in cmqttd.py that is triggered when the Python code is run directly on Windows. It deals with an issue related to windows ports' behavior within the event loop that results in an error. The issue is documented here: Configuration of windows event loop for libraries python/cpython#81554 It is useful when porting the python code to a Windows system.
Files in directory cmqttd__config are copied to image director etc/cmqttd.
CABrouwers
changed the title
Improve Windows compatibility
Improve Windows compatibility + added mechanism to initiate content of etc/cmqttd folder
Apr 21, 2022
CABrouwers
changed the title
Improve Windows compatibility + added mechanism to initiate content of etc/cmqttd folder
Improves Windows compatibility + adds mechanism to initiate content of etc/cmqttd folder
Apr 21, 2022
ElementTree.parse(...) does not accept a bufferReader as argument but accepts a file path
Add option to select a specific cbus network if the project file contains multiple networks. Backward compatibility is retained The argument --bus-network add to the main cmqttd call and the argument CMQTTD_CBUS_NETWORK is added to the entrypoint-cmqttd.sh
This necessary to enable to the lightingSAL class to work with multilple lighting applications
Change CNI parameters to enable relaying of all applications packets.
Application argument added to mttq client and Cbus handler
Extract label from all lighting applications. Default label generation is moved here (from MQTT onconnect event. Default labels only generated if no label availabl for application
Python 3.10 required. At this time only alpine edge includes the release. Docker pull will need to be modified after next regular release
Updated test code with application argument where necessary. No change/addition to the test case.
CABrouwers
changed the title
Improves Windows compatibility + adds mechanism to initiate content of etc/cmqttd folder
Expanded to all lighting applications - backward compatible
Apr 26, 2022
isLighting(val) not needed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improved Windows compatibility
Added command to Dockerfile to automatically remove any CRLF line termination from the entry point script. They are sometimes added by git when it runs on Windows, and they prevent the script from running when the file is copied back on a Linux image.
Added code in cmqttd.py triggered when the code is run directly on a Windows machine. It deals with an issue related to windows ports' behavior within the event loop that results in an error. The issue is documented here: https://bugs.python.org/issue37373
Added directory cmqttd_config/ to received project file and MQTT credential files. The content is copied on the image in directory etc/cmqttd/
Added
application
argument to SAL class and all derived classes. It is necessary to enable LightingSAL classes to address multiple applications. The argument is ignored/optional for other SAL application classes.Adapted daemon to process all lighting applications.
Improved label extraction logic:
Upgraded version requirements for libraries. Python 3.10 is now required (due to the use of new typing syntax), thus forcing to pull alpine:edge docker image (Should be changed after the next alpine upgrade)
Updated test code by adding application parameter to function calls when necessary. Test cases have not been modified otherwise.
Added processing of level status report. The daemon automatically requests a report on all lighting applications at startup