-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.6 Update - UserCode CommandClass (python-openzwave) #169
Comments
I have some questions. on this. A usercode gets stored into it's own value I am guessing. because of the access to a specific usercode via the index. Since support for changing labels has been added, does this also include the labels for the usecodes? It would be nice if the user was able to provide a human friendly name to a usercode instead of an index. I added a class that acts partially like a list and partially like an array that has key, value pairs. use example print(node.usercodes[1])
node.usercodes[1] = '123456789'
print(node.usercodes['Some Code Name'])
node.usercodes['Some Code Name'] = '123456789 there are several ways to add a code node.usercodes += ['123456789']
node.usercodes.append('123456789')
# if you want to add a bunch of codes
node.usercodes += ['123456789', '987654321', '567894321']
node.usercodes.extend(['123456789', '987654321', '567894321']) the append and extend mechanisms will return True if the code(s) were added successfully and False if not. Not added would mean that the device cannot store any more codes. for removing you can specify the index, code or label node.remove(;123456789')
node.remove(1)
node.remove('Some Code Name') the remove mechanism also return True or False adding the above was all done in 80ish lines of code. |
There is a Manager::SetValueLabel call, but I've honestly never seen anybody use it :) |
And it works?? LOL I ask that because it is a really simple idea. I am shocked that no one is doing it. This would be a fantastic use for it. because it is far easier to remember say a persons name then the index. plus if an application has user authentication then the logged in user would only be able to change their own password. and this is the bonus.
I bet you will see it get used now. LOL |
The only challenge with using it is if you lose the ozwcache file the information gets lost. I’d encourage people to do it in the application and not in OZW 😜 |
you will lose the name to code mapping.. not the actual values. correct? I may be wrong in this assumption as I have not looked at the contents of an ozwcache file. In that file I would image is the node name, node location. things of that nature. Those things are not actually stored on the controller or on the nodes themselves. so if the file gets lost then the names do as well. and it would have to be recreated. if that is the case then the same would apply here. This is for anyone that happens to read this issue. this is a suggestion and some information. This is the reason why backups are essential. and not a backup on the same machine. or even in the same location. google drive, microsoft onedrive..... there are 100's of available free cloud storage servers.. Quite a few of them have applications that allow a type of drive/folder mapping to the storage space. so a simple file copy utility or script can be used to make a copy of the file. Windows use RoboCopy to set up an automatic copy of the file. this can be done so it will make the copy if the file changes at all. Linux or the like. I am sure a script can be made to perform the same operation as in Windows and add the script as a daemon. as with any backup software/utility/script. it only knows 1's and 0's. it does not know what is and is not corrupted. so backing up corrupted data = restoring corrupted data. If you are paranoid and think that Google or Microsoft is going to be peering into your data.. encrypt the data then put it on their servers. 256 bit encryption (approximates)
those are some really large numbers. |
As per the OZW 1.6 Release Notes, The UserCode CommandClass has been rewritten
Refer the the release notes on the background, but basically, the UserCode CommandClass will not expose all usercodes as a String ValueID rather than a RAW ValueID. As there are some devices that are not compliant with the specifications, a config option will revert those devices to a Raw ValueID type.
Need to confirm no update is required.
The text was updated successfully, but these errors were encountered: