Cannot wire up dimmers and battery switch. (zwave)

Hi Andrew, I am software developer by trade so I am very keen on keeping stuff in files and thinks it will pay off in the long run. Any idea to what might be my problem?

Like it says, there is no type here -

You’re on a hiding to nothing by avoiding use of UI auto configuration with zwave Things.
At least refer to what it discovers for reference.

1 Like

well the log file says there are validation issues with the things file…
you know the UI stores everything in a… well… big text file right?

To be faced with a situation which is pointless, as a successful outcome is impossible.
from The saying 'On a hiding to nothing' - meaning and origin.
you are a funny guy Rossko

I am an olde farte. I sometimes forget I use figures of speech that you young beatniks won’t understand :wink:

2 Likes

Hi Christian,

I have everything in files also, except the thing definitions. I strongly support @Andrew_Rowe in his approach to let the GUI find the devices and define the things. It is the least hardest way.

And for the next steps to success I advise not to take too many steps in one go rather to take one step after the other. (Take it from someone who has suffered from the wrong approached too often :wink: )

1 Like

Hi Stefan, thanks for the advice. I may try that approach. Is the “internal” things file available somewhere for backup purpose? I would like really like to able to do a clean install of openHAB (whenever it breaks) and easily just copy all items, rules, addons, services, etc to get back to a fresh and working openHAB.

Welcome,

As others have hinted it is not recommended to use text files for Things because that is so error-prone. Many people, including me, use text files for Items and Rules but configure Things through the UI.

Ah, I think I solved the validation issue. I was mixing syntax for defining things “inside” the bridge vs outside the bridge. Once I moved my thing definition outside the bridge definition (deleted the curly brackets) - the validation warning disappeared.

There are so few people defining Things in files that getting future community support could be difficult but it is your choice how you configure your system…

Yes, it is stored in the JSONDB file. Use the forum search to find info on where to find. Some users use git to back up and version the file.

Use the openHAB integrated openhab-cli tool (opens new window) to interactively backup/restore your openHAB config

there ya go… keep at it, you’ll figure it out. I’ve written exactly one things file so not much help
off topic question Christian… you said you were a beginner and yet your profile says Joined Oct 25, '16
???

2 Likes

My backup is done in a script automatically. But for restore I would do it interactively, for sure :wink:

1 Like

Yes Stefan, I read your thread on your script, very slick, good on ya :+1:

Ok, thank you for all the advice.

I am now trying the UI approach instead of the things file - and have now arrived at the same place as before.

I added both the controller and the battery button using the UI

My items files only contains this now:

Number sButton "Button" {channel="zwave:device:5bfdd57b46:node9:scene_number"}

My Rules file contains this:

rule "SwitchTester"
when
	Item sButton changed
then
    logInfo("SwitchTester", "battery buttons changed")
    logInfo("State", sButton.state.toString)
end

The rule is not triggered when clicking any buttons on the button device, so am I using a wrong approach - or did I forget a step somewhere?

Log file looks clean, no errors or warnings.

I am trying to follow this thread as my inspiration:

That is a battery operated device and may not have been fully discovered by the binding. Is there an xml file in the zwave folder of userdata? Many times battery operated devices need to be woken up many times during discovery until they properly respond to the NIF request as required by the standard,

Thanks @Bruce_Osborne I was not aware of that.

What is the best way to fix that? Should I try and exclude and include it again? or just start include mode again on the controller?

When I included the battery device I was pressing 2 buttons on the same time for 3 seconds - but the controller kept “scanning” for longer. Should I keep pressing random buttons during this scan or repeat the 3 second press?

Currrently I see “Node initialising: STATIC_VALUES” on the device

Is that what I should expect or?

Sorry, not real familar with OH3 yet but do you see any channels for the device? The binding appears to know what the device is, in OH2, if it was not fully initialized, in would show as unknown device and wouldn’t have any channels

try changing your trigger from

Item sButton changed

to

Item sButton received command

When you save the rules file (I’m guessing your rule is in a rules file) do you see something like this in the log?

16:56:31.875 [INFO ] [del.core.internal.ModelRepositoryImpl] - Refreshing model 'myrules.rules'

every time you edit a rules file, you should have your log viewer open and make sure the rule loaded by looking for an entry in the log like above. If there is an error in the file, you will see a message similar to this

16:49:05.797 [WARN ] [del.core.internal.ModelRepositoryImpl] - Configuration model 'myrules.rules' is either empty or cannot be parsed correctly!

also, make sure every rule has a unique name

Don’t think you’ll be getting an OH command here.

Do you see any channels associated with your node9 Thing in the UI?
If no channels, you can’t make them up just by naming them in your Items file.
If no channels, its probably not finished initializing just like it says in the screenshot.

@Bruce_Osborne Your input was spot on. After an evening of repeating “including mode” on the controller and wake up / inclusion of the battery device - it is now triggering the rule. Everything else was working as is.

Does anyone have any good dimming rules example?

I get a scene_number value of e.g. 1.2 when I hold a button down and 1.1 when I release it. I have not been able to find a good example of combining these to dim a dimmer. E.g. “dim by increments of 5 until release”

Found lots of on/off examples and that works fine.