(SOLVED) Z-Wave device setup using configuration.yaml rather than discovery

I have a Z-Wave 2 channel switch that controls my central heating and hot water. How would I set this up using configuration.yaml rather than lovelace discovery?
I guess I need to somehow interrogate the device to find out what keys/pairs/lists/attributes I need to define in my yaml file.

Not really sure what you are asking.

You have never been able to manually set up any zwave device in HA.

The nature of zwave is that the you have to pair the device with the zwave controller that then relays that device pairing info to HA.

Why would you want to do it any differently? what benefit do you think you’ll gain?

2 Likes

What I was asking was fairly straight forward, as per OP, how to configure Zwave components in HA yaml files. Very clear I thought ? sorry.

To be serious though, I do have various reasons , without wishing to enter into a lengthy protracted debate, suffice to say the setup in yaml would be an opportunity for me to provide a clear specific configuration from which to perform various tests and reconfigure of the network.

Has anyone else any ideas please or can provide examples, thank you all in advance.

Can you maybe provide a specific example of what you are trying to achieve? Without that information it’s hard to give you any directions and provide you with the required files to modify.

Trying to setup a Danfoss RX 2 channel switch so that I could remove it from HA where the devices and entities have been created by discovery i believe. Then, to reintroduce the devices and entities using yaml.

I cant say any more without specific questions where i will happily provide current config, logs, etc … but i do not know where these are in HA .

so…
can you help or do you need more info, if so, what info? I’ll upload any files you need. I do not know myself where or how to override Z-Wave config that appears as devices and entities in the front end - as discovered items I guess.

Currently in the front end I have a Danfoss RXZ which I have not setup so it’s been discovered:

That comes with two switches:
Capture

So the question is, how do I define these in yaml.

Reason I want to do this is so that I can use yaml in my package file setup, and also the yaml provides a means to migrate settings easily to another machine I use, and finally, because each time the integration is updated, subtle changes to config occurs which invalidates my automations, scripts and so on, because the entity names change.

How can it be done?

Have you checked zwave2mqtt?

I have no exierience with it, but I also prefer to set things manually, especially through mqtt.

Anyway, once you get data into mqtt, you can use mqtt integration, which allows/require manual configuration of ha entities

No. Because it works perfectly so I do not need mqtt and this is just another layer of complexity. Plus, I am not seeking to map discovered entities to mqtt channels.And finally, it’s an addon to hassio and I run HA container.

What I would like to do is setup the z-wave device config.

I note an xml file named zwcfg_0xe72762f2.xml that contains the following.

<?xml version="1.0" encoding="utf-8" ?>
<Driver xmlns="http://code.google.com/p/open-zwave/" version="3" home_id="0xe72762f2" node_id="1" api_capabilities="8" controller_capabilities="28" poll_interval="60000" poll_interval_between="true">
        <Node id="1" name="" location="" basic="2" generic="2" specific="1" type="Static PC Controller" listening="true" frequentListening="false" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
                <Manufacturer id="115" name="Z-Wave.Me">
                        <Product type="400" id="1" name="ZME_UZB1 USB Stick" />
                </Manufacturer>
                <CommandClasses>
                        <CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" after_mark="true">
                                <Instance index="1" />
                                <Value type="byte" genre="basic" instance="1" index="0" label="Basic" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
                        </CommandClass>
                </CommandClasses>
        </Node>
        <Node id="3" name="" location="" basic="2" generic="16" specific="0" type="Binary Switch" listening="true" frequentListening="false" beaming="false" routing="true" max_baud_rate="40000" version="3" query_stage="Complete">
                <Manufacturer id="2" name="Danfoss">
                        <Product type="8004" id="2000" name="RXZ3 RF relay Switching Unit" />
                </Manufacturer>
                <CommandClasses>
                        <CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" request_flags="5" mapping="37">
                                <Instance index="1" />
                                <Instance index="2" endpoint="1" />
                                <Instance index="3" endpoint="2" />
                        </CommandClass>
                        <CommandClass id="37" name="COMMAND_CLASS_SWITCH_BINARY" version="1" request_flags="5" innif="true">
                                <Instance index="1" />
                                <Instance index="2" endpoint="1" />
                                <Instance index="3" endpoint="2" />
                                <Value type="bool" genre="user" instance="1" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
                                <Value type="bool" genre="user" instance="2" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
                                <Value type="bool" genre="user" instance="3" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
                        </CommandClass>
                        <CommandClass id="67" name="COMMAND_CLASS_THERMOSTAT_SETPOINT" version="1" request_flags="1" innif="true" base="1" typeInterpretation="B">
                                <Instance index="1" />
                                <Instance index="2" endpoint="1" />
                                <Instance index="3" endpoint="2" />
                                <Value type="decimal" genre="user" instance="1" index="2" label="Cooling 1" units="C" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.0" />
                                <Value type="decimal" genre="user" instance="2" index="2" label="Cooling 1" units="C" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.0" />
                                <Value type="decimal" genre="user" instance="3" index="2" label="Cooling 1" units="C" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0.0" />
                        </CommandClass>
                        <CommandClass id="96" name="COMMAND_CLASS_MULTI_INSTANCE/CHANNEL" version="3" request_flags="1" innif="true">
                                <Instance index="1" />
                        </CommandClass>
                        <CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="5" innif="true">
                                <Instance index="1" />
                        </CommandClass>
                        <CommandClass id="132" name="COMMAND_CLASS_WAKE_UP" version="2" request_flags="3" after_mark="true" innif="true">
                                <Instance index="1" />
                                <Value type="int" genre="system" instance="1" index="0" label="Wake-up Interval" units="Seconds" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="3600" />
                                <Value type="int" genre="system" instance="1" index="1" label="Minimum Wake-up Interval" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
                                <Value type="int" genre="system" instance="1" index="2" label="Maximum Wake-up Interval" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
                                <Value type="int" genre="system" instance="1" index="3" label="Default Wake-up Interval" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
                                <Value type="int" genre="system" instance="1" index="4" label="Wake-up Interval Step" units="Seconds" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
                        </CommandClass>
                        <CommandClass id="133" name="COMMAND_CLASS_ASSOCIATION" version="1" request_flags="7" after_mark="true" innif="true">
                                <Instance index="1" />
                                <Associations num_groups="0" />
                        </CommandClass>
                        <CommandClass id="134" name="COMMAND_CLASS_VERSION" version="1" request_flags="5" innif="true">
                                <Instance index="1" />
                                <Value type="string" genre="system" instance="1" index="0" label="Library Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="1" />
                                <Value type="string" genre="system" instance="1" index="1" label="Protocol Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="2.67" />
                                <Value type="string" genre="system" instance="1" index="2" label="Application Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="5.05" />
                        </CommandClass>
                        <CommandClass id="142" name="COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION" version="1" request_flags="7" after_mark="true" innif="true">
                                <Instance index="1" />
                                <Associations num_groups="0" />
                        </CommandClass>
                        <CommandClass id="143" name="COMMAND_CLASS_MULTI_CMD" version="1" request_flags="5" innif="true">
                                <Instance index="1" />
                        </CommandClass>
                        <CommandClass id="145" name="COMMAND_CLASS_MANUFACTURER_PROPRIETARY" version="1" request_flags="5" innif="true">
                                <Instance index="1" />
                        </CommandClass>
                </CommandClasses>
        </Node>
</Driver>

The xml file gets written by HA when it shuts down. Changes can be made to the xml that are persistent when HA starts.

But how do I craft a yaml file - or is the xml the way Z-wave/HA works , as in there is no yaml file that can be used ? If so this doesn’t follow the HA design model where configs are either made in the front-end or in yaml.

EDIT:
This explains OpenZwave operation and setup/config for devices. But HA doesnt need this across the board, it uses yaml, which does beg the question why does the Z-Wave integration not cater for yaml setup - assuming it indeed does not.

I believe the reason why you aren’t getting any help on this is because you are asking for something that can’t be done as I stated above.

As far as I know the xml file is the only place in HA that the info from the stick gets transferred into HA. From there it uses that info to set up the different entities based on the different command classes.

It is all done thru the discovery process and there is no way to create a zwave entity/device thru yaml.

I guess you may be able to dig in and find the location of the json files for the devices but I’m not sure how that will help you since you can’t remove the device from there and re-create it thru yaml as you seem to want to do.

1 Like

Ah damm it. I didn’t read your second line on your OP.
Sorry.
Yes, I have since read on other forums, how to code up the XML for the Z-Wave devices.
Useful links for those who find this thread via serach:-

Open Z-Wave guide over on GitHub

XML Z-Wave editor guide:

An excellent database and explanation from a guy over at OpenHab but the principles of setup apply.
https://www.cd-jackson.com/index.php/zwave/zwave-device-database/zwave-device-database-guide

So you’re right. It cannot be done in HA as OZW is dependant on the current database (or copies/links thereof).