Did you ever get this sorted? I do a lot of manual “fixing” in OZW 1.4 too, renaming devices, adding Parameter XML info so I can change them, etc., but I too had a question about what you can do in such cases in zwave-js.
I didn’t want to edit the instructions, but wanted to share this. I needed more information than what the template editor could provide on my current entities as I prepare for migration from OZW 1.4 to zwave-js, and developed the following sed/awk script to pull data from the core.config_entries
file in config/.storage
and write it to a CSV file, with column headers. This works on your generic HA OS RPi installation, and should in any Linux.
To use it, open a terminal, navigate to config/.storage
, and enter the command. It will create a file called entities.csv
. It includes not only device entity data, but also automations, persons, input_booleans/numbers, counters, etc. It includes the following columns: Node_ID/UID, Entity_ID, Name, Platform, Icon (that you assigned), Original Name (assigned by OZW), and Enabled/Disabled Status.
I hope it helps someone.
sed 1,5d core.entity_registry | awk -v RS=" },\n" -v FS=" \"" '$0 ~ /entity_id/ {print $6 $2 $8 $7 $9 $15 $10}' | sed 's/.*: //;s/[",]//g;s/$/,/;s/[ ]*,//;s/node-//;s/\(^[0-9]\{1,2\}\)-[0-9]\{15,20\}/\1/' | awk -v RS="" -v FS="\n" '{printf "%s,%s,%s,%s,%s,%s,%s\n",$1,$2,$3,$4,$5,$6,$7}' | sed 's/null$/enabled/;s/user$/disabled/' | sort | awk 'BEGIN{print "node/UID,entity_id,name,platform,icon,original_name,enabled"} {print}' > entities.csv
I solved my problem by running zwave2mqtt in a custom docker (not as a Home Assistant add-on) and manually editing the config documents.
But, since then, I believe this has been made easier and possibly could be managed by creating and adding to a config sub-folder in the zwave2mqtt store folder. In my setup, this is “/usr/share/hassio/addons/data/xxxxxxxx_zwavejs2mqtt/store”. Probably similar for zwavejs, though I don’t know for sure.
I haven’t tried it, but here’s a reference:
https://zwave-js.github.io/zwavejs2mqtt/#/development/intro?id=testing-custom-devices-config
Adjusting parameters is usually not required for zwavejs, the config files are very well maintained.
Renaming devices is normally done via HA now, unless you really want to rename them in zwavejs2mqtt as well (I’ve never felt the need to) but those names/locations do get imported into HA.
Good reference, thanks!
I’m in the middle of migrating from ozw 1.4 to zwavejs2mqtt, and am have a bit of trouble with the ADD TO LOVELACE button at the bottom of the Entities card on the Devices tab of ZWave JS integration. I can pick a page to put it on, but it never appears. Can someone please confirm that this function works or doesn’t work? I’m sure I’ve used this before and it worked (in OZW Int).
On another note, and the reason I’m wanting to dump all the entities on a card, is that many of my devices created in zwave-js have one or more entities disabled, and I don’t know why or how it decided to disable them. I don’t even know if they work, so I’m wanting to put them all out there and see what I get. Can anybody clue me in on why these entities might be disabled? Some are new functions that didn’t appear in OZW 1.4.
The creation of devices in zwavejs2mqtt worked like a charm, but took multiple tries at waking up battery powered devices before they were fully interviewed. It took a total of about 4 hours for 69 devices and 512 entities. I have all my battery powered devices set to wake every 2 hours.
Now, on to renaming and testing/fixing Automations!
Finally got around to making the switch. Pretty straight forward with Petro’s guide. The only issue (if you can call it an issue) was the Aeotec multisensor 6 for burglar/motion detection was recognised as a binary sensor instead of a sensor and automations/scripts had to be updated to use boolean on and off instead of 0 and 8.
I only have 11 devices but noticeable improvement where all lights turn on/off at the same time with more complex automations instead of “in a somewhat randomly sequential order”, lux and temp triggers are quicker and HA starts up in 20 seconds rather than 4 minutes
Thanks Petro you da man
Try using the raw editor and put the entities in yaml. Back it up to a file first It’s pretty easy.
Disabled entities depend on your zwave device. Check the manufactures website for what the device offers. I have aetotec multisenors 6 / door sensors / smart switch , you can match up what sensors zwavejs picks up with what the device actually supports with a small amount of effort. E.g. ZWJS says the multisensor 6 has support for Radon level detection…which is disabled. I hope i dont need that…haha. Whether it works or not who knows, the manufacture doesn’t say anything about it. Just match the entities to your existing automations and enable any disabled that you may need ?
Again, with aeotec sensors, I found I had to physicaly bring the non-powered sensors close to the zwave USB/Hub for zwavejs2mqtt webui to wake them up and be recgonised. Took about 3 minutes for 3 sensors.
You can take your zwave USB stick out and bring it to the sensors that you can’t move but obviously that’s going to cause issues with HA having the /dev/USB-whatever removed, depending on setup. Mines passthrough to vcenter so a reboot of the VM/Host be required to recognise the USB again
You need to use the 3 dots on the top right and add the repository for the community add-ons:
https://github.com/hassio-addons/repository
Thanks a lot! This did the trick… For some reason I was so convinced it is official Addon, that I didn’t even considered such simple solution
OK, another, perhaps stupid question… Where do I enter network key? It supposed to be in settings, next to Serial Port… but there is no field available for this:
As result Addon started to discover devices, but I get error displayed at the top of web page:
Gr… this is when yoy try to follow guides blindly, not thinking about what you see on the screen…
S0 Legacy field is the answer…
Yeah - S2 is relatively new (in terms of support). That’s the secure network key that allows you to talk to door locks and things like that. I think it’s only been there about a month.
@petro might consider updating the original post to include this information since things have changed a bit since it was originally written.
Anyone can edit the post, I haven’t gone through the processs since January
Thanks for the guide and the various useful comments in this thread.
After a fair bit of hesitation I summoned the courage to migrate from legacy Zwave to Zwave JS. Did this step first and then realised I would need a network map to try and improve connection reliability for one node position that kept going dead.
So installed the ZWaveJS2MQTT addon, then worked out I needed to remove the Zwave JS ADDON and just have the Zwave JS integration alongside ZWaveJS2MQTT.
A little bit later and all is working well & network connections have been fixed up.
This is the best, most transparent zwave software I have used giving more confidence to understand and fix issues.
Well done to the Dev team!
Few questions, from perspective of few days with new integration. Perhaps someone could help:
- How Zwave network neighbors are determined for network graph? I have all devices in my network working properly for few days but graph show some of them as disconnected (same in all neigbors mode):
All these devices, but one, are mains powered and act as repeaters, so this should not be a problem of them being in Sleep state during discovery. I tried several times to heal network or individual nodes, also to reinterview them, but this did not recovered connections…
-
Also weird problem with graph itself in Safari on Mac… it seems like the frame in which graph is displayed is truncated from bottom to half of screen. Here you can see situation when chart is slightly moved and clipping is visible:
No such issue with Chrome… -
With deprecated integration all Zwave devices were showing as in zwave domain, so it was possible to use something like
{{ states.zwave | count }}
to count them. Is something similar possible now?
And final comment, the migration process, following this guide was quite smooth, even if there was quite a lot of work with renaming of entities… it turned out that I have more of them than I thought Despite this inconvenience (and really minor annoyances described above) it was very smooth and now everything is working much snappier than with old integration. Thanks so much for great work!
Thank you so much for the effort all the Devs have put into this. I was very reluctant to jump over, but these guides and the support of the community made the transition very easy. Yes like everyone I had to update some details but on a positive it gave me a chance to clean up my naming convention and work through everything room by room.
It not a “but”, I do however have one question. In the older version I had a zwave.device.status entity that told me if it a node was ready, dead or one of the 7 odd stages of start up. I can see that status in the device detail (is alive and is ready) but how can I get that into a attribute to review. I have a list of all my zwave devices that I can look at in a single entities card to show if one has fallen over?
Thanks again for all the effort to make this a success
You can use this code in a template:
{{states|selectattr('entity_id', 'search', 'node_status')|selectattr('state', '==', 'alive')|list|count}}/{{states|selectattr('entity_id', 'search', 'node_status')|list|count}}
You’ll need to enable the “node_status” sensors on each of your zwave devices tho.
This template will output something like: 34/34
or 33/34
(if you have a dead node)
Thanks for that. I think I can adapt that to a sensor to replicate what I want and have the count as a bonus.
One follow up question is the node status in zwavemqtt add-on or zwave.js integration?
Did a quick look and wasn’t sure if it’s in the new value table or elsewhere
Thanks again