I have not touched my Domotica stuff for a (too) long time but a couple of weeks ago I decided to move from Indigo to openHAB.
Platform (for now) is the Raspberry Pi 3 running Raspbian.
I am pretty happy with how things proceed (one step at a time).
I started with my z-wave sensors and I now want to restart my MySensors project.
I added one of my NRF24+ components to the raspi and followed the instructions to call the gateway application.
The application is running without errors (see below for the config file I used).
Next step was adding the gateway to openHAB (a Thing) using the port '/dev/ttyMySensorsGateway'.
The port is there, checked it, and I have none of the leds blinking.
I downloaded the latest binding from GitHub and use the latest nightly build of openHAB (updated this morning).
In the below log entries you see that the Thing keeps retrying and throws an error while rebooting the system.
This is proof that the port really shows (although in another colour but I assume that this has to do with the fact that it is a symbolic link).
Any idea what is going on?
Alternatively I could use another Raspberry to serve as an ethernet gateway next to serving as a backup server but the current setup is more appealing to me...
/dev/tty /dev/tty20 /dev/tty33 /dev/tty46 /dev/tty59 /dev/tty0 /dev/tty21 /dev/tty34 /dev/tty47 /dev/tty6 /dev/tty1 /dev/tty22 /dev/tty35 /dev/tty48 /dev/tty60 /dev/tty10 /dev/tty23 /dev/tty36 /dev/tty49 /dev/tty61 /dev/tty11 /dev/tty24 /dev/tty37 /dev/tty5 /dev/tty62 /dev/tty12 /dev/tty25 /dev/tty38 /dev/tty50 /dev/tty63 /dev/tty13 /dev/tty26 /dev/tty39 /dev/tty51 /dev/tty7 /dev/tty14 /dev/tty27 /dev/tty4 /dev/tty52 /dev/tty8 /dev/tty15 /dev/tty28 /dev/tty40 /dev/tty53 /dev/tty9 /dev/tty16 /dev/tty29 /dev/tty41 /dev/tty54 /dev/ttyAMA0 /dev/tty17 /dev/tty3 /dev/tty42 /dev/tty55 /dev/ttyMySensorsGateway /dev/tty18 /dev/tty30 /dev/tty43 /dev/tty56 /dev/ttyS0 /dev/tty19 /dev/tty31 /dev/tty44 /dev/tty57 /dev/ttyUSB0 /dev/tty2 /dev/tty32 /dev/tty45 /dev/tty58 /dev/ttyprintk
2017-01-09 11:27:40.201 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 2017-01-09 11:27:40.203 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:4233) 2017-01-09 11:27:41.079 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while disposing handler of thing 'mysensors:bridge-ser:44a5fcb2': java.lang.NullPointerException at org.openhab.binding.mysensors.internal.handler.MySensorsBridgeHandler.saveCacheFile(MySensorsBridgeHandler.java:253)[198:org.openhab.binding.mysensors:126.96.36.199701051119] at org.openhab.binding.mysensors.internal.handler.MySensorsBridgeHandler.dispose(MySensorsBridgeHandler.java:102)[198:org.openhab.binding.mysensors:188.8.131.52701051119] 2017-01-09 11:31:41.290 [ERROR] [col.serial.MySensorsSerialConnection] - Can't connect to serial port. Wrong port? 2017-01-09 11:31:41.305 [ERROR] [col.serial.MySensorsSerialConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)
sudo ./configure \ --my-gateway=serial \ --my-controller-ip-address=127.0.0.1 \ --my-port=5003 \ --my-serial-is-pty \ --my-serial-pty=/dev/ttyMySensorsGateway \ --my-transport=nrf24 \ --my-rf24-irq-pin=15 \ --my-leds-err-pin=12 \ --my-leds-rx-pin=16 \ --my-leds-tx-pin=18
@marceltrapman Could you please check the permissions of "/dev/ttyMySensorsGateway"? Is the user openhab allowed to read/write?
As posted here, it works with an mygw as ethernet gateway on the same RPi, but serial should be doable too. The serial library in OH2 that is used by the binding was a little picky with serial ports but was changed recently.
The openHAB user has rights for tty and dialout so that should be ok.
I had connection errors with the ethernet gateway as well but that was before I changed the user rights so that could have caused that.
The binding caused a couple of crashes so I need to fix that first but I will let you know how things go.
@TimO I moved the gateway to another Raspberry Pi (just for fun ).
It works now.
There seems to be an issue with the binding though.
Adding and removing the gateway does not show with the correct status until resetting OpenHAB.
@TimO Issue solved with latest release
@marceltrapman I'm glad it is solved.
@TimO Maybe not completely.
I have OpenHAB 2 installed on a Raspberry Pi 3.
I am using a Raspberry Pi Ethernet Gateway.
At first connected on the controller Raspberry but that seems to be unreliable.
Will debug that later.
I am now using a Pi B and that works.
While moving to MySensors 2.1.1 and debugging my sensors I am using the Gateway in debug mode (manual start).
Yesterday I closed the Gateway down, started it up again this morning but the OpenHab/the binding did not see the Gateway until I restarted OpenHAB.
That is not really nice because I need to know that, if one or more components go down and up again, everything will be working again.
Any idea how this can happen or what to do about it?
@marceltrapman We're currently working on a huge refactoring and this will hopefully be solved with the next version.
@TimO OK, Thank you !