Coming from HomeSeer to openHAB but not able to include devices

Howdy,

Not really a beginner with SBC and home automation, but new to openHAB. I have a HomeSeer HA that sucks in so many ways that I am finally tired enough of the issues to look at a new solution. I got my Pi 4B imaged with no problems and configured and running. I am using the Zooz S2 Zwave dongle.

For the first couple of hours, the Zwave binding was green and ONLINE, but now it is red and OFFLINE but not sure why.

When it was online, I was trying to scan for a device. I excluded an existing GE wall outlet from my HomeSeer network and verified on HomeSeer that it was indeed excluded. I am not able to include it on my openHAB network. I am able to exclude and re-include at will on the HomeSeer device, so I know the device is working and is being excluded. Scanning using the Zwave binding had no results.

Now as I am typing this, the Zwave device is just offline. Any guidance in where to find the logs and how to figure out why it is now offline would be appreciated.

Thanks!

runtimeInfo:
version: 3.0.0
buildString: Release Build
locale: en_US
systemInfo:
configFolder: /etc/openhab
userdataFolder: /var/lib/openhab
logFolder: /var/log/openhab
javaVersion: 11.0.9
javaVendor: Azul Systems, Inc.
javaVendorVersion: Zulu11.43+88-CA
osName: Linux
osVersion: 5.4.79-v7l+
osArchitecture: arm
availableProcessors: 4
freeMemory: 78913224
totalMemory: 194969600
bindings:

  • http
  • icalendar
  • insteon
  • ipcamera
  • lutron
  • weatherunderground
  • yamahareceiver
  • zwave
    clientInfo:
    device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: true
    windows: false
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: macos
    pixelRatio: 2
    prefersColorScheme: light
    isSecureContext: false
    locationbarVisible: true
    menubarVisible: true
    navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: en-US
    languages:
    • en-US
    • en
      onLine: true
      platform: MacIntel
      screen:
      width: 1680
      height: 1050
      colorDepth: 24
      support:
      touch: false
      pointerEvents: true
      observer: true
      passiveListener: true
      gestures: false
      intersectionObserver: true
      themeOptions:
      dark: light
      filled: true
      pageTransitionAnimation: default
      bars: filled
      homeNavbar: default
      homeBackground: default
      expandableCardAnimation: default
      userAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
      (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
      timestamp: 2020-12-29T23:34:18.655Z

Welcome. It is always good to start by reading the documentation. The binding documentation even gives instructions on what to do when things do not go as planned.

An additional aid may be the log viewer.

Thanks for the prompt reply. So I read the instructions you pointed me to and followed them:

To enable debug logging, log on to the [console (opens new window)]. 
(https://www.openhab.org/docs/administration/console.html)and enter the following command -:

```
log:set DEBUG org.openhab.binding.zwave
```

and got:

[00:56:47] openhabian@openHABianDevice:~$ log:set DEBUG org.openhab.binding.zwave
-bash: log:set: command not found

Since log:set is not a proper shell command, my guess is that I am not actually in the console even though I have ssh’d onto the device? I clicked on the link (The Console | openHAB) to see what I was doing, but wasnt clear. I tried ssh’ing to port 8101 as instructed assuming maybe there was a console process hanging on that port, but only got another error:

➜  ~ ssh -p 8101 openhabian@192.168.1.62
ssh: connect to host 192.168.1.62 port 8101: Connection refused

Not sure what I am doing wrong and yeah, I have not read all of the documentation as I was really hoping to get up and running quickly.

The documentation said that I could also add the entries to userdata/etc/org.ops4j.pax.logging.cfg to separate out the log files, which I did and rebooted…

org.ops4j.pax.logging.log4j2.config.file=${karaf.etc}/log4j2.xml

### Zwave custom logger
log4j2.logger.Zwave.name = org.openhab.binding.zwave
log4j2.logger.Zwave.level = DEBUG
log4j2.logger.Zwave.additivity = false
log4j2.logger.Zwave.appenderRefs = Zwave
log4j2.logger.Zwave.appenderRef.Zwave.ref = ZWAVE

### Zwave custom appender
log4j2.appender.Zwave.name = ZWAVE
log4j2.appender.Zwave.type = RollingRandomAccessFile
log4j2.appender.Zwave.fileName = ${openhab.logdir}/zwave.log
log4j2.appender.Zwave.filePattern = ${openhab.logdir}/zwave.log.%i
log4j2.appender.Zwave.immediateFlush = true
log4j2.appender.Zwave.append = true
log4j2.appender.Zwave.layout.type = PatternLayout
log4j2.appender.Zwave.layout.pattern = %d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-50.50c] - %m%n
log4j2.appender.Zwave.policies.type = Policies
log4j2.appender.Zwave.policies.size.type = SizeBasedTriggeringPolicy
log4j2.appender.Zwave.policies.size.size = 10MB
log4j2.appender.Zwave.strategy.type = DefaultRolloverStrategy
log4j2.appender.Zwave.strategy.max = 10

Unfortunately there is no such file on the device.

Cheers,
Bryan

I am realizing that while there is a LOT of documentation for openHAB, it is overwhelming and not actually good documentation, especially for people new to it. My issue was simply and in plain sight, but completely buried.

To get to the console, you need to use the CLI tool. Yes, it is mentioned for linux users at the top of the section, but actually quietly buried. Simple stuff like making it is own bullet point would save some grief. And yes, I just forked the repo to and am making the change.

Yep this tripped me up the first time too.

The note solved it for me

Note

By default, connections are only allowed from localhost, i.e. only from the machine running openHAB. Connections are intentionally not allowed from remote hosts due to security concerns

So you ssh into the pi and then enter ssh -p 8101 openhab@localhost into that ssh session.
The default username/password is openhab:habopen, so enter habopen at the password prompt.

If you are going to use config file to setup openHAB I highly recommend the VSCode Extension
I also use SSH to connect to the PI not samba.


It puts everything in one window it just depends on you’re level of experience and the way you want to do it.

1 Like

Thanks for the reply! I am off and running. Have two outlets moved over. So far so good. I am just really used to ssh’ing into the Pi and controlling it so the helpful console tripped me up. It has flavors of a REPL which is definitely welcome. Sadly I am not VSCode guy - by day I am either vi or jetbrains guy (IntelliJ, GoLand, and PyCharm) for my IDE. Still, will definitely check it out. :+1:

2 Likes

In Linux vim ( vi Improved) works like vi and you can use that for text file editing.

Very familiar with vim :slight_smile: - I alias it as vi

1 Like

Or after ssh

openhab-cli console

should also work.

1 Like

If you are running just one command, you can append that too, I believe.

Awesome. Thanks for the help everyone. Much appreciated.

Quick question. For the VSCode integration, the documentation says just to use the samba network shares that are already configured on the openHABian. Is this how you are connecting with VSCode? I am a little confused when you say you dont use samba. Also, I have never used samba before.

Thanks!

Excellent this works too

No Samba

First setup logging into PI without a password.
https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md

Then setup logging in to pi with VSCode extension

Login to your PI and open folder /etc/openhab2

You need to install the openhab extention on the pi

1 Like