How do I fix the error - Could not render template

looks fine to me. What’s the error?

When I restart. Not really a big deal just noise in the logs. Thought maybe I was doing something not quite right.

Looks like some entities are not ready when the template sensor is initialized.

@ptdalen if thats the case during startup, you can wrap your whole function in an if statement using {% if states.x.x is defined %}

I’m getting the same warning using your door code @ptdalen what did you end up doing about it?

Actually I tried a couple things, had no success got sidetracked and never fixed it. :slight_smile:
I know it’s generally an “easy” fix but just have not put the time into it since it’s just on startup.

cool thanks. It’s because HA recently restarted and when it restarts the lock state gets erased so HA is looking for a value that doesn’t exist. Is that correct?

While I have you… I saw in your code that you were able to update openzwave on 9/4/18 which fixed the clear_usercode functionality. I’m on version 1.4.3254 and still having trouble with clear_usercode no working (even by calling the service directly in HA). Did you update to 1.5 or to the current version on GitHub?

Yes I believe that is the cause of the error on start up.

For open zwave I created my own fork a few months back and added an updates file for the clear user codes. This was before HA added their own fork. So I have not upgraded the past few versions.

I just need to get the time to make a new fork.

do you remember if you were using 1.4xx when you had clear_usercode working? Trying to figure out if it’s zwave that is my problem or something else.

It was 1.4.xxx but with a specific file for clear user codes. It’s on my github

trying to figure out where I would find that file & how to incorporate it. I was expecting to see config_path: defined in your configuration.yaml file referencing the new openzwave stuff. What am I missing? Am I supposed to be looking for a file in the OpenZwave fork?

This thread sounds like the issue I’m trying to solve: https://github.com/OpenZWave/open-zwave/issues/997 and I think the changes were made here: cpp/src/command_classes/UserCode.cpp but I’m at a loss of what to do with that information if I’m even on the right track.

This is more of a rant and less a request for you to hold my hand and figure this out for me. Thank you again for all of that awesome lock functionality code.

No problem. I’m on mobile right now but this should get you started.

Basically the need to create your own fork was something that people with a specific garage door opener had to do for quite a while. In 82.x HA created their own fork to add the files needed for the garage but are not quite on board with the user code.cpp yet so it’s not included. Read through the post there are instructions on how to fork the HA branch to add the user code. I just have not made the time to do it yet.

1 Like

@ptdalen can I take a look at your zwcfg_xxx.xml and compare your entry for your Schlage BE469 to mine? If it’s on your GitHub I didn’t see it but maybe I was looking in the wrong place.

I’ll try to get it added in the next day or so. I will say that I’m still running 81.6. The version before HA added their own zwave fork. I just have not had the time to update.

1 Like

I did not get around to uploading my config, but here is the xml for one of my locks

	<Node id="104" name="" location="" basic="4" generic="64" specific="3" type="Secure Keypad Door Lock" listening="false" frequentListening="true" beaming="true" routing="true" max_baud_rate="40000" version="4" secured="true" query_stage="Complete">
		<Manufacturer id="3b" name="Schlage">
			<Product type="6341" id="5044" name="BE469 Touchscreen Deadbolt" />
		</Manufacturer>
		<CommandClasses>
			<CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" request_flags="4" issecured="true" mapping="98">
				<Instance index="1" />
			</CommandClass>
			<CommandClass id="34" name="COMMAND_CLASS_APPLICATION_STATUS" version="1" request_flags="4" innif="true">
				<Instance index="1" />
			</CommandClass>
			<CommandClass id="98" name="COMMAND_CLASS_DOOR_LOCK" version="1" request_flags="4" issecured="true" m_timeoutsupported="1" m_insidehandlemode="0" m_outsidehandlemode="0" m_timeoutmins="254" m_timeoutsecs="254">
				<Instance index="1" />
				<Value type="bool" genre="user" instance="1" index="0" label="Locked" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
				<Value type="list" genre="user" instance="1" index="1" label="Locked (Advanced)" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1">
					<Item label="Unsecure" value="0" />
					<Item label="Unsecured with Timeout" value="1" />
					<Item label="Inside Handle Unsecured" value="2" />
					<Item label="Inside Handle Unsecured with Timeout" value="3" />
					<Item label="Outside Handle Unsecured" value="4" />
					<Item label="Outside Handle Unsecured with Timeout" value="5" />
					<Item label="Secured" value="255" />
					<Item label="Invalid" value="255" />
				</Value>
				<Value type="list" genre="system" instance="1" index="2" label="Timeout Mode" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1">
					<Item label="No Timeout" value="1" />
					<Item label="Secure Lock after Timeout" value="2" />
				</Value>
				<Value type="byte" genre="system" instance="1" index="5" label="Outside Handle Control" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
				<Value type="byte" genre="system" instance="1" index="6" label="Inside Handle Control" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
			</CommandClass>
			<CommandClass id="99" name="COMMAND_CLASS_USER_CODE" version="1" request_flags="4" issecured="true" codes="30">
				<Instance index="1" />
				<Value type="raw" genre="user" instance="1" index="0" label="Enrollment Code" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="1" label="Code 1:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a" length="10" />
				<Value type="raw" genre="user" instance="1" index="2" label="Code 2:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a" length="10" />
				<Value type="raw" genre="user" instance="1" index="3" label="Code 3:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a" length="10" />
				<Value type="raw" genre="user" instance="1" index="4" label="Code 4:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a" length="10" />
				<Value type="raw" genre="user" instance="1" index="5" label="Code 5:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00" length="1" />
				<Value type="raw" genre="user" instance="1" index="6" label="Code 6:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a 0x2a" length="10" />
				<Value type="raw" genre="user" instance="1" index="7" label="Code 7:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00" length="1" />
				<Value type="raw" genre="user" instance="1" index="8" label="Code 8:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="9" label="Code 9:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="10" label="Code 10:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="11" label="Code 11:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="12" label="Code 12:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="13" label="Code 13:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="14" label="Code 14:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="15" label="Code 15:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="16" label="Code 16:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="17" label="Code 17:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="18" label="Code 18:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="19" label="Code 19:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="20" label="Code 20:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="21" label="Code 21:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="22" label="Code 22:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="23" label="Code 23:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="24" label="Code 24:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="25" label="Code 25:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="26" label="Code 26:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="27" label="Code 27:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="28" label="Code 28:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="29" label="Code 29:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="raw" genre="user" instance="1" index="30" label="Code 30:" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" length="10" />
				<Value type="button" genre="system" instance="1" index="254" label="Refresh All UserCodes" units="" read_only="false" write_only="true" verify_changes="false" poll_intensity="0" min="0" max="0" />
				<Value type="byte" genre="system" instance="1" index="255" label="Code Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="30" />
			</CommandClass>
			<CommandClass id="112" name="COMMAND_CLASS_CONFIGURATION" version="1" request_flags="4" issecured="true">
				<Instance index="1" />
				<Value type="list" genre="config" instance="1" index="3" label="Beeper" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" vindex="1" size="1">
					<Help>Enable or disable the beeper.</Help>
					<Item label="Disable Beeper" value="0" />
					<Item label="Enable Beeper" value="255" />
				</Value>
				<Value type="list" genre="config" instance="1" index="4" label="Vacation Mode" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" vindex="0" size="1">
					<Help>Prevents all user codes from unlocking the deadbolt. Enable for extra security while you are away for an extended period of time.</Help>
					<Item label="Disable Vacation Mode" value="0" />
					<Item label="Enable Vacation Mode" value="255" />
				</Value>
				<Value type="list" genre="config" instance="1" index="5" label="Lock &amp; Leave" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" vindex="1" size="1">
					<Help>When enabled: Press the Outside Schlage Button to lock the deadbolt. (Default setting). When disabled: Press the Outside Schlage Button and then enter a user code to lock the deadbolt.</Help>
					<Item label="Disable Lock &amp; Leave" value="0" />
					<Item label="Enable Lock &amp; Leave" value="255" />
				</Value>
				<Value type="list" genre="config" instance="1" index="7" label="Lock Alarm Mode" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1">
					<Help>The alarm is turned off by default. After installation, you will need to turn on your alarm. Activity Alarms when the door opens or closes. Perfect for monitoring doors while you re at home. After the alarm is triggered, there is a built-in 3-second delay for it to reset. Sounds two short beeps. Tamper Alarms when the lock is disturbed, while locked. Senses subtle activity at the lock. Sounds 15 second Alarm (90 dB) Forced Entry Alarms when significant force pushes against the door, while locked. Perfect for nighttime or when you re away from home. Least sensitive mode Sounds three-minute shrill, steady alarm (90 dB)</Help>
					<Item label="Alarm Off" value="0" />
					<Item label="Activity" value="1" />
					<Item label="Tamper" value="2" />
					<Item label="Forced Entry" value="3" />
				</Value>
				<Value type="list" genre="config" instance="1" index="8" label="Activity Alarm Sensitivity" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="2" size="1">
					<Help>Each alarm mode is preset to a sensitivity level of three. If your alarm is sounding too frequently, or not frequently enough, try changing this setting. If you change the alarm mode, the sensitivity will revert back to the default setting.</Help>
					<Item label="Most Sensitive" value="1" />
					<Item label="Medium/high Sensitivity" value="2" />
					<Item label="Medium Sensitivity" value="3" />
					<Item label="Medium/low Sensitivity" value="4" />
					<Item label="Least Sensitivity" value="5" />
				</Value>
				<Value type="list" genre="config" instance="1" index="9" label="Tamper Alarm Sensitivity" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="2" size="1">
					<Help>Each alarm mode is preset to a sensitivity level of three. If your alarm is sounding too frequently, or not frequently enough, try changing this setting. If you change the alarm mode, the sensitivity will revert back to the default setting.</Help>
					<Item label="Most Sensitive" value="1" />
					<Item label="Medium/high Sensitivity" value="2" />
					<Item label="Medium Sensitivity" value="3" />
					<Item label="Medium/low Sensitivity" value="4" />
					<Item label="Least Sensitivity" value="5" />
				</Value>
				<Value type="list" genre="config" instance="1" index="10" label="Forced Entry Alarm Sensitivity" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="2" size="1">
					<Help>Each alarm mode is preset to a sensitivity level of three. If your alarm is sounding too frequently, or not frequently enough, try changing this setting. If you change the alarm mode, the sensitivity will revert back to the default setting.</Help>
					<Item label="Most Sensitive" value="1" />
					<Item label="Medium/high Sensitivity" value="2" />
					<Item label="Medium Sensitivity" value="3" />
					<Item label="Medium/low Sensitivity" value="4" />
					<Item label="Least Sensitivity" value="5" />
				</Value>
				<Value type="list" genre="config" instance="1" index="11" label="Disable Local Alarm Controls" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="1" size="1">
					<Help>Enables/Disables local alarm on/off, mode change, sensitivity changes</Help>
					<Item label="Disable local alarm controls" value="0" />
					<Item label="Enable local alarm controls" value="255" />
				</Value>
				<Value type="int" genre="config" instance="1" index="12" label="Electronic transition count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
				<Value type="int" genre="config" instance="1" index="13" label="Mechanical transition count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0" />
				<Value type="int" genre="config" instance="1" index="14" label="Electronic failed count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0">
					<Help>Each failed electronic attempt increments this count by one.</Help>
				</Value>
				<Value type="list" genre="config" instance="1" index="15" label="Auto lock" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" vindex="0" size="1">
					<Help>When enabled, the lock will automatically relock 30 seconds after unlocking. (Disabled by default.)</Help>
					<Item label="Disable auto lock" value="0" />
					<Item label="Enable auto lock" value="255" />
				</Value>
				<Value type="byte" genre="config" instance="1" index="16" label="User code pin length" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="4" max="8" value="4">
					<Help>User Code PIN length, a value between 4 and 8. IMPORTANT: All user codes must be the same length.</Help>
				</Value>
				<Value type="int" genre="config" instance="1" index="17" label="Electrical High Preload Transition Count" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="-2147483648" max="2147483647" value="0">
					<Help>A subset of Electronic transition count, the number of transitions with high preload.</Help>
				</Value>
				<Value type="byte" genre="config" instance="1" index="18" label="Bootloader Version" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0">
					<Help>The version of the bootloader</Help>
				</Value>
			</CommandClass>
			<CommandClass id="113" name="COMMAND_CLASS_ALARM" version="3" request_flags="2" issecured="true">
				<Instance index="1" />
				<Value type="byte" genre="user" instance="1" index="0" label="Alarm Type" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="18" />
				<Value type="byte" genre="user" instance="1" index="1" label="Alarm Level" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
				<Value type="byte" genre="user" instance="1" index="2" label="SourceNodeId" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
				<Value type="byte" genre="user" instance="1" index="9" label="Access Control" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="5" />
				<Value type="byte" genre="user" instance="1" index="10" label="Burglar" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="2" />
				<Value type="byte" genre="user" instance="1" index="11" label="Power Management" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="0" />
				<Value type="byte" genre="user" instance="1" index="12" label="System" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="1" />
				<TriggerRefreshValue Genre="user" Instance="1" Index="0">
					<RefreshClassValue CommandClass="98" RequestFlags="0" Instance="1" Index="1" />
				</TriggerRefreshValue>
			</CommandClass>
			<CommandClass id="114" name="COMMAND_CLASS_MANUFACTURER_SPECIFIC" version="1" request_flags="4" innif="true">
				<Instance index="1" />
			</CommandClass>
			<CommandClass id="128" name="COMMAND_CLASS_BATTERY" version="1" request_flags="4" issecured="true">
				<Instance index="1" />
				<Value type="byte" genre="user" instance="1" index="0" label="Battery Level" units="%" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="255" value="96" />
			</CommandClass>
			<CommandClass id="133" name="COMMAND_CLASS_ASSOCIATION" version="1" request_flags="4" issecured="true">
				<Instance index="1" />
				<Associations num_groups="1">
					<Group index="1" max_associations="2" label="Group 1" auto="true">
						<Node id="1" />
					</Group>
				</Associations>
			</CommandClass>
			<CommandClass id="134" name="COMMAND_CLASS_VERSION" version="1" request_flags="4" 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="6" />
				<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="3.42" />
				<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="128.22" />
			</CommandClass>
			<CommandClass id="152" name="COMMAND_CLASS_SECURITY" version="1" request_flags="4" innif="true">
				<Instance index="1" />
				<Value type="bool" genre="system" instance="1" index="0" label="Secured" units="" read_only="true" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="True" />
			</CommandClass>
		</CommandClasses>
	</Node>

Just wanted to share. I just updated my git openzwave. I forked the HA version of open-zwave but also updated the usercode.cpp

You can use this or fork it for your own use if you’d like.

Had some time to go through this but I still don’t understand what I need to do.

I looked for differences between the xml for your lock and my lock (contained in my zwcfg_xxxxxxxxxx.xml file) and it doesn’t seem to be anything related to user code.

Your lines 38-41 are slightly different but I’m assuming that has to do with individual user codes set or not set in those slots (4, 5, 6, and 7).

Your line 143 is different, assuming because we have different values for Alarm Type

Your line 146 and 147 are different, I’m assuming it’s the same reason but for the Access Control and Burglar settings

Your line 159 has a different value for Battery Level.

All of these differences don’t seem to be connected to the user code and my inability to delete user codes through HA. I think there’s a broader problem or something I’m missing due to the fact that I don’t fully understand the way the open-wave code/libraries are stored for my HassIO install and how I would go about updating them. The only other z-wave related files I think I have to look at are pyozw.sqlite, OZW_Log.txt, and zwscene.xml

I understand that to fork your open-wave directory means to copy it for my own use but after that I have no idea what to do. I tried downloading that entire directory and moving the contents onto my RasberryPi with samba and then pointing my zwave component to it by defining config_path but that didn’t work. Should I see a similar directory somewhere on my RasberryPi?

Sorry for all the noob questions and thanks for your patience.

Ok, no worries. I am running HA in a virtual environment VENV.

Basically here is the process I used

I created my own fork that is 99.9% the same as the current HA owz branch. I made the change to the usercode.cpp manually on github.

On my HA machine I
went to my /home/homeassistant folder and ran this

git clone -b hass GitHub - ptdalen/open-zwave: a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.

This pulls down my branch with the garage cover files I needed and the updated usercode.cpp

Then I stopped HA and ran the script below.
Couple of things. I’m running Ubuntu
this line
export LOCAL_OPENZWAVE=/home/homeassistant/open-zwave/
is not 100% the same on some flavors of unix.

What the script does is removes the default version of owz, and then uses your local files.
Issues are, that every time OWZ updates, you’ll have to repeat this process. You can fork your own branch from mine (I recommend that), so you can keep as up to date as you need.


if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2
exit 1
fi

echo "Changing to user homeassistant"
sudo -H -u homeassistant /bin/bash <<EOF
echo "Activating virtual environment"
source /srv/homeassistant/bin/activate

# install cython if not already installed
# pip3 install --upgrade cython==0.24.1

# remove previously install python_openzwave
pip3 uninstall -y homeassistant-pyozw==0.1.1

# install ozwdev flavor of python_openzwave
export LOCAL_OPENZWAVE=/home/homeassistant/open-zwave/
pip install homeassistant-pyozw==0.1.1 --no-cache-dir --no-deps --install-option="--flavor=dev"


echo "Deactivating virtual environment"
deactivate
EOF
exit 0

If you are running a different version you steps might be a bit different. Even though this thread is for a garage door opener issue

I really recommend reading through this if you’re stuck. Although the forks will be different the process and concepts are the same.

Sounds like I need SSH access to my RasberryPi? HomeAssistant install? What’s the difference?

I don’t have the SSH add-on installed as listed here: addons/ssh/README.md at master · home-assistant/addons · GitHub but even if I did “This add-on will not enable you to install packages or do anything as root. This is not allowed with Hass.io.” So am I barking up the wrong tree?

I can get to what I think is my /homeassistant folder which contains the folders (addons, backup, config, share, ssl) but I do that with Samba because I’m extremely in-experienced with command line stuff and I’m not sure how I would go about running

git clone -b hass GitHub - ptdalen/open-zwave: a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.

inside of that folder. My limited knowledge tells me that this is a way of adding the folders contained in your GitHub fork to my home assistant folder via command line instead of downloading them and then a good ol’ fashion “drag-n-drop” or am I way off track?

Honestly, I’m not sure. I recommend reading the garage door the thread. There are a lot of questions in there dealing with RPI And if it can or cannot be done. For the most part I just skipped over those and they did not apply to me. But the concepts should be the same regardless of what you’re trying to branch.

1 Like