* fix for TypeError: The "path" argument must be of type string in writeDevicesOrGroups
* added test case that produces the error when running on old implementation
Summary of all failing tests
FAIL test/settings.test.js
● Settings › Should add devices even when devices exist empty
TypeError: The "path" argument must be of type string. Received undefined
275 |
276 | jest.mock('../../lib/util/data', () => ({
> 277 | joinPath: (file) => require('path').join(mockDir, file),
| ^
278 | getPath: () => mockDir,
279 | }));
280 |
at Object.join [as joinPath] (test/stub/data.js:277:41)
at joinPath (lib/util/settings.ts:245:38)
at writeDevicesOrGroups (lib/util/settings.ts:250:5)
at Object.write [as addDevice] (lib/util/settings.ts:555:5)
at Object.addDevice (test/settings.test.js:128:18)
The most commonly used transport for remote syslog is port 514/udp.
It also is the only defined method for BSD syslog (RFC 3164). RFCs
5424+5425 specify an additional TLS transport via 6514/tcp, which
does not seem to be supported by zigbee2mqtt, as evidenced by the
lack of TLS-related configuration options in this area. RFC 6587
describes legacy uses of syslog over TCP, recommending against them.
Port 123, the previous default, was probably used by accident and
is reserved for NTP.
| $ grep -w -e 123 -e 514 -e 601 -e 6514 /etc/services
| ntp 123/udp # Network Time Protocol
| shell 514/tcp cmd syslog # no passwords used
| syslog 514/udp
| syslog-tls 6514/tcp # Syslog over TLS [RFC5425]
* Adding 2 config params under 'frontend' : 'ssl_cert' and 'ssl_key' to contain file patch of certificate files to expose frontend in HTTPS.
* Taking all PR remarks in account.
Co-authored-by: phil <phil@8godsprod.com>
* Extract parsing of value reference '!' in settings into a function
* Allow to specify full file name in value reference '!'
This `network_key: '!secret network_key'` is really confusing because
it looks like a YAML tag named 'secret' and a value "network_key".
When we write `network_key: '!secret.yaml network_key'` instead, it's
a little clearer what's going on. Also, it's more consistent with file
references in 'devices' and 'groups'.
This allows specifying a path outside of the data directory using an
absolute path (e.g. /path/to/devices.yaml) or a path relative to the data
directory (e.g. devices.yaml, foo/devices.yaml, ../../devices.yaml, ...).
This change is backward compatible because file names and nested paths are
just a special case of a relative path.
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
* Fix mnodule resolution
Allows the correct module path to be found if installed as a package
* Correct signature to avoid TS error
* Allow module to be included in another module
Only create hash ot auto-start if it is the main module, otherwise export the `start` function
* 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 server, pan_id, ext_pan_id to secrets
* fix tests
* clean secrets before every test run
* add interpolation of mqtt.server, advanced.pan_id, advanced.ext_pan_id and split mqtt.user, mqtt.pass requirement
* remove pan_id and ext_pan_id from secrets processing
* Add a configuration option to override OTA index file
* Cleanup
* Code review corrections
* Move zigbee_ota_override_index_location to ota section of the configuration file
* Suport both local and remote (HTTP) OTA override index files
* Updates
* updates
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>