Fix state attribute definitions and build issues - #157
Open
astra0815 wants to merge 7 commits into
Open
Conversation
…igiert - dataRefresh: setTimeout feuerte nur einmal, da rekursiver Aufruf fehlte. Nach jeder Ausführung wird dataRefresh nun erneut aufgerufen, sodass der Polling-Zyklus dauerhaft läuft. - apiCall: HTTP-Antwort-Chunks wurden mit überschrieben statt zusammengeführt. Ersetzt durch chunks-Array mit Buffer.concat(), damit auch mehrteilige Antworten korrekt verarbeitet werden.
- intervallSettings: SmartLock und SmartLockUltra ergänzt (Default 30 Min.) - onReady(): Intervall-Konfiguration für beide Lock-Typen wird geladen - defineIntervallTime(): Cases für 'Smart Lock' und 'Smart Lock Ultra' - loadDevices(): lock/unlock Button-States werden beim Start angelegt - onStateChange(): lock/unlock Kommandos werden an die API gesendet - state_attr.js: lock und unlock als Button-States definiert - jsonConfig.json: Intervall-Felder für Smart Lock und Smart Lock Ultra - io-package.json: Default-Werte (30 Min.) für neue Intervalle Hinweis: deviceType-Strings 'Smart Lock' / 'Smart Lock Ultra' müssen ggf. nach erstem API-Test anhand des Debug-Logs verifiziert werden.
This file contains hidden or 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
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.
Description
This PR addresses several issues encountered during adapter installation and runtime:
Adds missing state attribute definitions for keyList, lockDeviceId, status, doorState, lockState, onlineStatus, and lockDevicesIds to prevent "State attribute definition missing" warnings.
Fixes TypeScript configuration by updating moduleResolution to "node16" for compatibility.
Adds canvas dependency with version override to avoid compilation issues on ARM platforms.
Updates package.json with proper overrides for canvas to use prebuilt binaries.
Changes
lib/state_attr.js: Added definitions for new state attributes.
tsconfig.json: Changed moduleResolution from "node" to "node16".
package.json: Added canvas to devDependencies and overrides for canvas version.
Testing
Verified that the adapter installs without canvas compilation errors.
Confirmed that state creation warnings are resolved.