Raspi + openHAB + Razberry offline

Tags: #<Tag:0x00007f3870243808> #<Tag:0x00007f38702436c8> #<Tag:0x00007f3870243588>

Hello I am the new one and would like to have a problem: lol:

I have now beaten the WE around the ears with my project and thought through a lot of reading and so on the result but unfortunately not quite so.

To my project:
Raspi 3B + ordered by Raspishop with the Z-Wave module ( https://www.rasppishop.de/Raspberry-Pi-3-Modell-B-Plus-Z-Wave-Bundle-in-Schwarz )
Z-Wave (ZMEERAZ2 Rev. 2.1 SN 26.18.01 HW Rev. 2.0 11/04/2018)
5 Eurotronic Thermostats to start

On the WE everything put together and looked: OpenHAB installed first and after a few minutes I could already search and record Bluetooth and network components.
But unfortunately no Z-Wave components of this always remained offline

Also with ioBroker etc the same result. Several attempts always failed because the Z-Wave module did not work.

Yesterday then taken the standard Z-Wave software and lo and behold, everything works but this Z-Wave ME can not Bluetooth and I can not synonymous my Unify etc with record. Also I would like to use a ZigBEE stick later.

Therefore my questions:

  1. How do I successfully integrate my Razberry and then teach and link my devices?
  2. Can problems arise if I want to attach and use a ZigBEE stick later on?
  3. Which ZigBee stick is good and does not cause much problems?
  4. Should I move the RazBerry and use another, if so which one?
    5 and last. Which hardware is perhaps better than a Raspi and consumes less power?

Thanks for your help and if you need more information then ask!

It sounds like you’re looking for a starting place, I’ve been working an a product called S.A.R.A.H. that is, in essence, a companion product to OpenHAB that allows you to generate a complete working system with speech, mariadb, internet radio, weather/astronomical data, a fully functioning alarm system and tamper alarm system, etc., which will allow you to manage the entire system through a built-in web site. I also have a working soultion for garage door openers using mqtt that I can share with you. I’m looking to launch it initally in June, so it should be ready in a couple of weeks. If nothing else it will give you a set of working config files that you can tailor as you see fit. You can look at the instructions here… https://rpi-ha.com. The site is not yet complete either, but should also be ready in a couple of weeks.

Cheers

There is a lot that can be going on here. How did you install? Did you use openHABian, apt, manual?

  1. The Razberry will appear on your Raspberry Pi as a file under /dev. I think /dev/ttyAM0 or /dev/ttyUSB0 or something like that. This file will have an ownership along the lines of root:dialout meaning that only root or users who are members of the group dialout can read/write to the device. Is the openhab user a member of this group? You can run the command id openhab and see if dialout is in the list.

Check out https://www.openhab.org/docs/installation/linux.html#privileges-for-common-peripherals. Did you do all those extra steps? Note that the group stuff discussed above is one of those steps.

Now I assume that you’ve installed the binding. Once installed, as described in the binding readme you need to manually create a Zwave Controller Thing. Click the + icon in the Inbox, select “Manually add Thing” and choose Zwave. Enter in the appropriate info for the Razberry, namely /dev/tty* file.

Next you need to include the devices on the controller, if this hasn’t been done already. Click the inbox again and click the scan icon (upper right). Choose zwave from the list and it will put the controller into inclusion mode. You have 30 seconds to perform what ever action is required by the device to include it on the controller. See the manual for the device. Once included, the device will appear in the inbox. If it is a battery device you may need to repeat the action on the device a few times to wake it up to give the binding a chance to figure out what it is. It will show up as “Unkown device” if that is the case. Click on the device in the inbox to accept the Thing and link your Items to the Channels.

  1. No. In fact many of us run the HUSZB-1 which is a combo Zwave controller/Zigbee coordinator.

  2. I can’t answer that. I haven’t used Zigbee much yet.

  3. Lots of people use the RazBerry. I see no reason to not to continue using it.

  4. Better depends on what your definition of “better” is. You are unlikely to find any hardware that is capable of running OH that consumes less power.

Hello rlkoshak
thanks for the many tips

I have only ever used the image and then just waited until it was installed.

How would you recommend. Install Raspian lite and then use everything about APT or Image as before?

I will install again today and hope that it works better with your information?

openHABian installation is just fine. If you are running on Raspberry Pis that is the recommended approach. But there can be a lot of differences based on how OH is installed and a set of assumptions that we can/cannot make based on how it is installed.

I think that openHABian sets up the group membership for you automatically but if not, you can run sudo openhabian-config and if you run:

  • 10 Apply Improvements -> 14 Fix Permissions
  • 30 System Settings -> 35 Prepare serial ports…

One or both of these commands should prepare OH to access the Razberry.

I’ve used the openHABian image a fair amount… it works great on the Pi. Once you get that setup and running you’ll find that that the PaperUI will be your best bet for getting your Things installed. Don’t forget to use the log viewer http://{your pi’s name}.local:9001… you can also turn up the verbosity of the logging if you need more, but it should give you enough info to help.

Hello So I’ve followed your tips.

The user was included in all groups and otherwise I could not find any error.

This one line looks like this:
EXTRA_JAVA_OPTS="-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
but should look like this:
EXTRA_JAVA_OPTS = “- Dgnu.io.rxtx.SerialPorts = / dev / ttyUSB0: / dev / ttyS0 / dev / ttyS2 / dev / ttyACM0: / dev / ttyAMA0”

if I enter this “setcap ‘cap_net_raw, cap_net_admin = + eip cap_net_bind_service = + ep’ $ (realpath / usr / bin / java)” on the console this comes here:
[16:57:52] openhabian @ openHABianPi: / etc / default $ setcap ‘cap_net_raw, cap_net_admin = + eip cap_net_bind_service = + ep’ $ (realpath / usr / bin / java)
unable to set CAP_SETFCAP effective capability: Operation not permitted
Where do I have to enter this?

If I add the controller via Manuel then I can only choose / dev / ttyAMA0, I can not enter anything there myself.

If I go to save then comes immediately in the view
Status: OFFLINE - BRIDGE_OFFLINE Controller is offline

In my logfiles this comes here:

2019-06-13 17:17:37.989 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:44171fb5’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port {0} is in use

2019-06-13 17:17:53.238 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:44171fb5’ changed from OFFLINE (COMMUNICATION_ERROR): Serial Error: Port {0} is in use to REMOVING

2019-06-13 17:17:53.262 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:44171fb5’ changed from REMOVING to REMOVED

==> /var/log/openhab2/openhab.log <==

2019-06-13 17:17:54.272 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2019-06-13 17:17:54.285 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:44171fb5’ changed from REMOVED to UNINITIALIZED

2019-06-13 17:17:54.302 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:44171fb5’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

2019-06-13 17:22:35.669 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:68bd604e’ changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to REMOVING

2019-06-13 17:22:35.687 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:68bd604e’ changed from REMOVING to REMOVED

2019-06-13 17:22:36.684 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:68bd604e’ changed from REMOVED to UNINITIALIZED

==> /var/log/openhab2/openhab.log <==

2019-06-13 17:22:36.793 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Stopped ZWave serial handler

==> /var/log/openhab2/events.log <==

2019-06-13 17:22:36.820 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:68bd604e’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

2019-06-13 17:23:17.019 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:ae6f94eb’ changed from UNINITIALIZED to INITIALIZING

2019-06-13 17:23:17.241 [me.event.ThingUpdatedEvent] - Thing ‘zwave:serial_zstick:ae6f94eb’ has been updated.

==> /var/log/openhab2/openhab.log <==

2019-06-13 17:23:17.247 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port ‘/dev/ttyAMA0’

==> /var/log/openhab2/events.log <==

2019-06-13 17:23:17.254 [hingStatusInfoChangedEvent] - ‘zwave:serial_zstick:ae6f94eb’ changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline

==> /var/log/openhab2/openhab.log <==

2019-06-13 17:23:17.261 [INFO ] [ing.zwave.handler.ZWaveSerialHandler] - Serial port is initialized

2019-06-13 17:23:17.264 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller

2019-06-13 17:23:17.266 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.

No, it should look like the way it looks. There should not be spaces after the /.

To avoid the forum from mangling your pasted in code/logs/shell commands please How to use code fences which will preserve everything without mangling it.

Correct, because the binding is seeing /dev/ttyAMA0, which is I believe the usual place a RazBerry will show up if you don’t have any other devices plugged into the RPi.

You can only run one program at a time that uses a serial device. Are you still running ZWay or some other zwave software?

no, the only binding is Z-Wave which is installed.

Z-Wave Binding

binding-zwave - 2.4.0

Not binding. External software. You can only have one program running on a computer at a time that has access to the Zwave device. The error indicates that some other software is installed and running that has a lock on the device.

Or do you have more than one device plugged into this RPi? The /dev/ttyAMA0 might be that device in which case the RazBerry might be ttyAMA1 or one of the other device types. That would explain the lock.

It’s also a good idea to reboot to clear any stale locks that might be hanging around.

Or the error may indicate that there is a permission problem.

I do not know anything about running.

The Raspi is installed with the image. I then raspi-config only enlarged the partition and set the locales.

Finally, I have openVB via openhabian-config under Serial-Port => Prepare-Serial Port => Add Common serial ports to open JVM enabled.
This should activate the Razberry right?

Otherwise only Bluetooth is activated but no binding is installed.

What do you see when you run

ls -l /dev/tty*

I installed my razberry about 1.5 years ago so I am not sure, are the razberry and bluetooth not using the same internal port?
I think I had to deactivate bluetooth in order to get the razberry running.
I could be wrong, but is worth a try …

That’s a good point. I think I’ve read before as well that the RazBerry and on board BT cannot both be enabled at the same time.

First I would like to thank you.
After disabling the BlueToorh controller via openhabian-config I was able to successfully activate the RazBerry and see the controller online. Also my thermostats are found.

Now I have to read in sodas so I can see the temperature, etc. and adjust synonymous.

Too bad that it does not work with the Bluetooth controller at the same time.

2 Likes

It might still work if you get an external USB Bluetooth dongle.