InsteonPLM on raspberry pi

I just moved my openhab setup to a raspberrypi2 and I can’t for the life of me figure out why my insteon plm won’t talk to openhab

I’m assuming I’m missing a driver or something, but from what I’ve read it should have been installed with raspian out of the box,

I’m runing openhab 1.7.1, brand new installation, with just the insteonplm binding

when i run dmesg i get:

[ 146.776357] ftdi_sio 1-1.5:1.0: FTDI USB Serial Device converter detected
[ 146.776859] usb 1-1.5: Detected FT232RL
[ 146.778125] usb 1-1.5: FTDI USB Serial Device converter now attached to ttyUSB0

which I believe to be my insteonplm, so I put:

insteonplm:port_0=/dev/ttyUSB0

in my openhab.cfg

but when I start openhab I get this:

2015-09-23 21:39:02.239 [ERROR] [.o.b.i.i.driver.SerialIOStream] - got no such port for /dev/insteon (Linux, with serial port symlinked to /dev/insteon)

And I have not control of the lights, can somebody please point me in a direction that will help solve this problem?

Sorry the error i get is:
2015-09-23 21:43:39.267 [ERROR] [.o.b.i.i.driver.SerialIOStream] - got no such port for /dev/ttyUSB0 (Linux, with usb based PLM modem)
2015-09-23 21:43:39.269 [ERROR] [.o.b.i.InsteonPLMActiveBinding] - initialization complete, but found no ports!

I had tried another configuration and didn’t realize I had left it.

All RPi’s I’ve installed so far did have /dev/ttyACM0 instead of /dev/ttyUSB0 with one USB stick attached.

What does dmesg | grep tty instead of only dmesg say?

I would bet it shows /dev/ttyACM0

Good luck

This is what i get after dmesg | grep tty:

[ 0.000000] Kernel command line: dma.dmachans=0x7f35
bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10
bcm2708.serial=0xe8161c76 smsc95xx.macaddr=B8:27:EB:16:1C:76
bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0
sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000
vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1
root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 0.001739] console [tty1] enabled
[ 0.139326] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 83,
base_baud = 0) is a PL011 rev2
[ 5.697359] usb 1-1.2: FTDI USB Serial Device converter now attached to
ttyUSB0

This is what i get when i type dmesg | grep tty:

[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x10 bcm2708.serial=0xe8161c76 smsc95xx.macaddr=B8:27:EB:16:1C:76 bcm2708_fb.fbswap=1 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 0.001739] console [tty1] enabled
[ 0.139326] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 83, base_baud = 0) is a PL011 rev2
[ 5.697359] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0

So I would try

insteonplm:port_0=/dev/ttyAMA0

instead of insteonplm:port_0=/dev/ttyUSB0

No luck, I get this error:
2015-09-24 00:58:28.043 [ERROR] [.o.b.i.i.driver.SerialIOStream] - got no such port for /dev/ttyAMA0 (Linux, with usb based PLM modem)
2015-09-24 00:58:28.055 [ERROR] [.o.b.i.InsteonPLMActiveBinding] - initialization complete, but found no ports!

could there be a permissions issue? I’m running under the pi accound and I start with sudo ./start.sh I would think that would grant all ther permissions needed, but I’m newish to linux so IDK.

Yes, could be a permission error, but when you start with “sudo …” openhab runs with root permission.
I do the same and have no problems at all.
Sorry, my knowledge about Linux ends at this point, you have to wait for more experienced users … :joy:

Thanks for trying

Maybe you should try what Chris recommends here:

… ls /dev/tty*` - do this with and without the stick plugged in and see what changes

Continuing the discussion from How-to Article on MakeUseOf:

Did you add the port to your startup script?
Last hint here?

Good point, but only valid for more than one usb stick attached.
It looks like @l1t7l3ph0o7 has only one stick attached …

That is correct, I only have one stick.

I have enabled debug logging and here is what it has yeilded:
2015-09-24 02:00:25.267 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - activating binding
2015-09-24 02:00:25.271 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - global binding config has arrived.
2015-09-24 02:00:25.274 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - dead device timeout set to 3000s
2015-09-24 02:00:25.282 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - configuration update complete!
2015-09-24 02:00:25.291 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - initializing…
2015-09-24 02:00:25.295 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - config: port_0 -> /dev/ttyUSB0 (Linux, with usb based PLM modem)
2015-09-24 02:00:25.298 [INFO ] [.service.AbstractActiveService] - InsteonPLM has been started
2015-09-24 02:00:25.358 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - devices: 0 configured, 0 polling, msgs received: 0
2015-09-24 02:00:25.361 [DEBUG] [o.o.b.i.internal.driver.Poller] - starting poll thread.
2015-09-24 02:00:25.611 [DEBUG] [o.o.b.i.internal.driver.Driver] - added new port: port_0 /dev/ttyUSB0 (Linux, with usb based PLM modem)
2015-09-24 02:00:25.617 [INFO ] [.o.b.i.InsteonPLMActiveBinding] - config: service.pid -> org.openhab.insteonplm
2015-09-24 02:00:25.619 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - setting driver listener
2015-09-24 02:00:25.624 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - starting 0 ports
2015-09-24 02:00:25.631 [DEBUG] [o.o.b.i.internal.driver.Port ] - starting port /dev/ttyUSB0 (Linux, with usb based PLM modem)
2015-09-24 02:00:25.900 [ERROR] [.o.b.i.i.driver.SerialIOStream] - got no such port for /dev/ttyUSB0 (Linux, with usb based PLM modem)
2015-09-24 02:00:25.906 [DEBUG] [o.o.b.i.internal.driver.Port ] - failed to open port /dev/ttyUSB0 (Linux, with usb based PLM modem)
2015-09-24 02:00:25.909 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - ports started
2015-09-24 02:00:25.917 [ERROR] [.o.b.i.InsteonPLMActiveBinding] - initialization complete, but found no ports!
2015-09-24 02:00:25.925 [DEBUG] [.o.b.i.InsteonPLMActiveBinding] - item lampLeft binding changed: addr=27.2A.C7|prodKey:F00.00.05|feature:dimmer

I meant have you added this to your startup:

-Dgnu.io.rxtx.SerialPorts=/dev/USBrfxcom:/dev/ttyUSB0

No I have not, what file would i need to alter? and its location please, sorry I’m still learning raspbian.

If you start it via script then check the symlink description.
Otherwise your normal start-script (how do you start open hab)

I’ve added -Dgnu.io.rxtx.SerialPorts=/dev/USBrfxcom:/dev/ttyUSB0 to the bottom of start.sh

but I’m still getting the same errors

Are you starting it with start.sh oder with a script?
And can you please copy the insteon-part of your config here?

[quote=“l1t7l3ph0o7, post:17, topic:2759, full:true”][/quote]

By the way, did you put your password as username?

(Just joking …) :wink:

Good luck with solving your error …

The first thing to establish is that you can actually connect to the FTDI device at a lower level.
I use the “cu” tool like this:

cu -l /dev/ttyUSB0

just to see if I can open the port. There are a host of other tools like this (screen etc), or you could actually just try to write to the port via

echo "foo" > /dev/ttyUSB0

Run this as sudo first, then try under the userid you want to run. You may have to set udev rules (does raspian even run udev?) to create the device under group “plugdev”, and make your user id a member of “plugdev”.

There is no point trying to run the insteonplm binding until you have established at the OS level that the device is present and working.

Once you have that going, proceed with getting rxtx/java/insteonplm working.I usually don’t have to add any magic rxtx flags into the startup script. In fact I would first try without them.