You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Manually built (git clone - npm install - npm run build )
zwavejs2mqtt version: zwavejs/zwavejs2mqtt:latest as of today (2021-01-05)
Describe the bug
Following migration instructions here, I took my nodes.json file from my previous z2m installation and imported it in the zjs2m UI. It properly applied names to nodes up to a certain device, after which no names were imported. When I tried importing nodes.json a second time to see if that would load all the names, I got a toast at the bottom saying the configuration was invalid.
Opening up the nodes.json file from z2m, I saw null values for all the removed nodes that were unnamed, and I looked for the last node whose name imported successfully. Immediately following that node was an empty object rather than a null value: {}. z2m inserted this empty object here, but zjs2m did not anticipate it in the importer.
To Reproduce
Steps to reproduce the behavior:
Take a nodes.json file that zjs2m would otherwise tolerate.
Replace any element in the top-level array with an empty object, {}.
Go to the 2js2m Web UI and click the "Import nodes.json Configuration" button
Select the pathological nodes.json file that you've created in step 1.
Expected behavior
The nodes.json importer should work fine with such a file, as z2m created it like this. More specifically, it should treat an empty object (or a non-conforming object without the necessary keys) the same as null: skip over it and increment the ID.
Additional context
My workaround for this issue was to replace the empty object with null before importing my nodes.json file again. This worked fine as a quick fix.
The text was updated successfully, but these errors were encountered:
Version
Build/Run method
zwavejs2mqtt version: zwavejs/zwavejs2mqtt:latest as of today (2021-01-05)
Describe the bug
Following migration instructions here, I took my
nodes.json
file from my previous z2m installation and imported it in the zjs2m UI. It properly applied names to nodes up to a certain device, after which no names were imported. When I tried importingnodes.json
a second time to see if that would load all the names, I got a toast at the bottom saying the configuration was invalid.Opening up the
nodes.json
file from z2m, I sawnull
values for all the removed nodes that were unnamed, and I looked for the last node whose name imported successfully. Immediately following that node was an empty object rather than anull
value:{}
. z2m inserted this empty object here, but zjs2m did not anticipate it in the importer.To Reproduce
Steps to reproduce the behavior:
nodes.json
file that zjs2m would otherwise tolerate.{}
.nodes.json
file that you've created in step 1.Expected behavior
The
nodes.json
importer should work fine with such a file, as z2m created it like this. More specifically, it should treat an empty object (or a non-conforming object without the necessary keys) the same asnull
: skip over it and increment the ID.Additional context
My workaround for this issue was to replace the empty object with
null
before importing mynodes.json
file again. This worked fine as a quick fix.The text was updated successfully, but these errors were encountered: