* Fix extension path to make debugginge easier in VScode
* Fix linting error
* Add setting "cache_state_persist_on_leave" (default false)
This setting does not remove a device from State if it leaves the network
* Merge from upstream kk/dev
* Re-define cache_state_persist_on_leave to be a timeout
Allows the config to specify how long the state should be held (and the device to re-join & maintain the state).
Remove all pending deletions if the system is stopped
* Add debug. Fix "time" test
* Disable esline warnings for long debug lines
* Simplify state maintenance for leave/join devices
* Restore default configuration.yaml
* Don't track device presence via events, but examine herdsman on system stop
* Update configuration.yaml
* Update state.ts
* Update state.ts
* Update controller.test.js
* Update eventBus.ts
* Update eventBus.ts
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* Ensure filtered_attributes and filtered_optimistic are also regex
Bring filtered_attributes and filtered_optimistic in line with the newer filtered_cache.
All three of them are now regex matches instead of absolute matches.
* update tests to use regex ^$ anchors
* utils: add filterProperties
* want a way to prevent attribute from being cached
* Update filtered_cache description to be more clear
* Fix emitStateChange was returning wrong payload in to parameter
* Directly get filtered_cache from entity and forgo parameter to State.set()
* Add tests to cover filtered_cache
* Update state.ts
* Update controller.test.js
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* Add tests gh action
* Fix zigbee_ota_override_index_location
* Fix Shouldnt crash when it cannot save state test
* Add node17
* Update tests.yml
* Drop old versions
* Move to ci.yml
* Update controller.test.js
* Fix linebraks on windows
* Ignore windows and node 17
* Fail on error
* Add comment
* Mark node 18 as supported
Co-authored-by: nurikk <ainur@yojee.com>
* support configurable retain on mqtt settings since some servers throw errors and drop the connections if you try (e.g. aws iot)
* Revert "support configurable retain on mqtt settings since some servers throw errors and drop the connections if you try (e.g. aws iot)"
This reverts commit 40d3a9c0bc84c83d2b167e2e3c3a06ca6df80f47.
* support configurable retain on mqtt settings
* support subscribing to the whole base prefix
* Update mqtt.js
* Fixes
* Fixes
* Fix tests
* Updates
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Also one comment typo lol
`node-static` was abandoned and vulnerable, which might matter since
it's used in production usage and not development.
replaced with popular `serve-static` + `finalhandler`
`json-stable-stringify` depended on an unneeded and unlicensed
polyfill for JSON builtin.