Inspecting file defined Bridges

Hi,

I’m playing with z-Wave on a FreeBSD Box (OH3.0.1).

After the last reboot, the zwave.me stick had changed from /dev/cuaU0 to /dev/cuaU1 (haven’t recherched yet, why).
The gui correctly says bridge is on error, but won’t let me edit the bridge, so I cannot change the port.

So, I think I try again with a text based Thing (.thing file).

I read configuration/things.html but how can I see if the bridge works? Is there a console command that shows me the Thing status?

A textual bridge never appears in the Gui, does it? Or can I start with a text bridge and have the Gui discover devices?

Thanks,
Juergen

you may need to setup a udev rule to always get the same device being created for your hardware.
Some more information can be found e.g. at An introduction to Udev: The Linux subsystem for managing device events | Opensource.com

I’m not sure that moving to a textual .things files is going to help you with this. Did you happen to restart openHAB after the device moved? What happens when you try to edit the bridge? On my system at least that field can be edited by clicking on it and editing the text. It doesn’t appear to have a drop down to select a discovered serial device once the Thing is created.

There are lots of ways. It should appear in the GUI even if it’s defined in a .things file. You just can’t edit it through the GUI. And in the GUI it should show whether or not it is online.

You can get the status of the Thing through the REST API.

I’m pretty sure you can query it and get the status from the Karaf Console. See The Console | openHAB for more details.

You can create a Rule that is triggered based on changes in the Thing’s status.

Yes, you can define the bridge in a text file and discover the rest through the GUI. But I would recommend going back to figure out exactly what the problem is with the Thing in the UI rather than heading down this particular path.

Did you happen to unplug the device while OH was still running and then replug it in? If FreeBSD works the same as Linux (and I think it does), then openHAB will still have a file lock on the /dev/cuaU0 file when you plug the device back in. Therefore it can’t reuse that file so it creates a new one for the serial device.

OP is using FreeBSD so that page probably won’t apply. It’s been a really long time since I’ve messed with devices on FreeBSD but IIRC it’s handled differently from Linux.

I guess posting here sends good vibrations, when I just restarted, I can edit the bridge via the Gui.

When you edit a Thing, there is a short moment in Chrome when all fields are grey. This stayed forever, so I guess, a rest service was gone.

With Wolfgang’s input I found that devd is the way to go in FreeBSD.

Thanks, Juergen