Here you go, @rdslw. I left in some of the things that I used to figure out what was needed. I’m not sure how you were planning on getting to the Thing, so this just iterates through all of the Z-Wave Things. Let me know if you need anything else!
from core.log import logging, LOG_PREFIX#, log_traceback
LOG = logging.getLogger("{}.TEST".format(LOG_PREFIX))
for thing in [thing for thing in things.all if thing.UID.toString().split(":")[0] == "zwave"]:
#LOG.warn(dir(thing))
#LOG.warn("thing.label: {}\nthing.UID: {}\nthing.configuration: {}\nthing.properties: {}\n".format(thing.label, thing.UID, thing.configuration, thing.properties))
#LOG.warn(thing.properties)
#LOG.warn(type(thing.properties))
#LOG.warn("zwave_lastheal: {}, zwave_lastwakeup: {}".format(thing.properties.get("zwave_lastheal"), thing.properties.get("zwave_lastwakeup")))
for zwave_property, value in thing.properties.items():
LOG.warn("{}: {}".format(zwave_property, value))
This uses scripted automation, included with the new rule engine, and Jython, but you could use any supported scripting language. The documentation, examples, and helper libraries for Jython are much more advanced. Here is a beta add-on to simplify the installation…
add section, what is NOT needed:
a. no need to instal NGRE (or if needed put it as a step) -> this is something which make me resign trying bundle, as I did not understand it
b. no need to change /etc/default/openhab2 EXTRA_JAVA_OPTS (this was asked multiple times by oldtimers in the long thread, but its missing from top post)
explain in more clarity sentence “The jar contains the core and community helper libraries, so there’s no need to copy them from the repo. However, the core scripts will need to be copied to /automation/jsr223/python/core/.” - I still do not understand difference in ‘core helper libraries’
vs ‘core scripts’. Documenting it a bit longer would be helpful, especially if do not know if this step is needed or not, and what exactly is needed. I would separate here things MUST to do (to put in first list), with the things NOT needed to do (like 1a 1b above).
Once again, thank you kindly for your work @5iver, I appreciate it!
The beta add-on is definitely easier than the manual installation, since you do not need to mess with EXTRA_JAVA_OPTS or to copy in any libraries. If you had questions or issues, you should have asked ! The only thing needed is to copy in the core scripts (everything in /automation/jsr223/python/core/), but these are only needed if you use them.
As I have said, I have doc updates to push. These include updates to the installation, including steps for using the add-ons.