InsteonPLM and Linking Devices to PowerLinc V2 USB Modem Database

I highly suspect you have the wrong port. Your log file says it is trying to connect to your PLM via /dev/ttyAMA0. This is the built in serial port (I think) on the Raspberry PI, but it is almost definitely not your USB PLM. I also run OpenHAB on a RPI, but my setup is a little different where I have a USB->Serial converter with a serial PLM plugged into it.

On Linux, USB serial devices typically get enumerated as /dev/ttyUSBn where n = numbers from 0-whatever. I have two different USB->Serial converters, so I have a /dev/ttyUSB0 and a /dev/ttyUSB1. I’m not 100% sure but I believe the Insteon USB PLMs are essentially a serial PLM with a USB->Serial converter inside the PLM box so I think it might behave the same.

Since you say you are coming from an iMac, not sure how familiar you are with Linux, but I would do this:

ls -al /dev | grep tty

Hopefully you’ll see something like this (along with a bunch of other tty devices:

crw-rw----  1 root dialout 188,   0 Dec 15 11:09 ttyUSB0

If you do and you don’t have any other USB devices connected it is pretty likely to be your PLM.

Next go edit your /etc/openhab2/services/insteonplm.cfg file. You should have a line like this:

insteonplm:port_0=/dev/ttyUSB0

Note: if yo \u have more than one USB Serial device things get a little more tricky as you’ll have to write some udev rules, but I’d simplify things first and just have the PLM plugged in for now.

Once you do all that, restart OH and see if you get a modem DB to download.

Hope this helps.

Hi Tom

Results from ls -al /dev | grep tty

crw-rw---- 1 root dialout 204, 64 Dec 15 10:53 ttyAMA0

lrwxrwxrwx 1 root root 7 Dec 15 10:53 serial1 -> ttyAMA0

insteonplm.cfg

port_0=/dev/ttyAMA0
modem_db_retry_timeout=240000
poll_interval=300000
refresh=600000

I think you will need to add openhab user to dialout and tty group. You can use the openhabian tool to fix these permissions. sudo openhabian-config

Try unplugging your PLM from the RPI and run the command again. I could be wrong, but I’m pretty sure this is the built in RPI serial port.

https://www.raspberrypi.org/documentation/configuration/uart.md

If that device is still there with the PLM unplugged this is definitely not your PLM.

If this is correct and /dev/AMA0 is still seen with ls -al /dev | grep tty with the PLM unplugged, I’d try this:

With PLM unplugged: type:

dmesg

Now, plug in the PLM and immediately do the same command again. The new lines you see might provide a clue as to how the PLM is connecting or show errors that are preventing it from connecting.

Hi Tom

With the PLM plugged in dmesg shows the following:

[ 0.897268] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2

[ 1.251813] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.254495] Indeed it is in host mode hprt0 = 00001101
[ 1.492117] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[ 1.497376] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.500860] hub 1-1:1.0: USB hub found
[ 1.503764] hub 1-1:1.0: 4 ports detected
[ 1.821810] usb 1-1.1: new high-speed USB device number 3 using dwc_otg

[ 1.952212] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3

[ 1.959903] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.966339] hub 1-1.1:1.0: USB hub found
[ 1.969313] hub 1-1.1:1.0: 3 ports detected

[ 2.071819] usb 1-1.2: new low-speed USB device number 4 using dwc_otg
[ 2.225709] usb 1-1.2: New USB device found, idVendor=10bf, idProduct=0004, bcdDevice= 4.00
[ 2.232391] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2.235855] usb 1-1.2: Product: SmartHome PowerLinc USB E
[ 2.239008] usb 1-1.2: Manufacturer: SmartHome
[ 2.258411] hid-generic xxxx.xxxx.xxxx.xxxx: hiddev96,hidraw0: USB HID v1.00 Device [SmartHome SmartHome PowerLinc USB E] on usb-3f980000.usb-1.2/input0

[ 2.741827] usb 1-1.1.1: new high-speed USB device number 5 using dwc_otg

[ 2.882242] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00
[ 2.889094] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[ 3354.811790] usb 1-1.2: USB disconnect, device number 4
[ 3569.125426] usb 1-1.2: new low-speed USB device number 6 using dwc_otg
[ 3569.274761] usb 1-1.2: New USB device found, idVendor=10bf, idProduct=0004, bcdDevice= 4.00
[ 3569.274774] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3569.274784] usb 1-1.2: Product: SmartHome PowerLinc USB E
[ 3569.274794] usb 1-1.2: Manufacturer: SmartHome
[ 3569.290828] hid-generic xxxx.xxxx.xxxx.xxxx hiddev96,hidraw0: USB HID v1.00 Device [SmartHome SmartHome PowerLinc USB E] on usb-3f980000.usb-1.2/input0

hmm - I don’t see any clues here about what port it is connected to. I think I’m out of ideas unfortunately but ti seems to me that /dev/ttyAMA0 is not the PLM, but the built in RPI serial device. I’d suggest searching for how people have used USB PLMs here. Mine is serial so I can’t try to figure it out.

Hi Tom

With the PLM unplugged dmesg shows the following:

[ 0.071348] usbcore: registered new interface driver usbfs
[ 0.071430] usbcore: registered new interface driver hub
[ 0.071541] usbcore: registered new device driver usb

[ 0.305619] usbcore: registered new interface driver lan78xx
[ 0.308083] usbcore: registered new interface driver smsc95xx

[ 0.897262] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2

[ 0.797067] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.19

[ 0.801574] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.804018] usb usb1: Product: DWC OTG Controller
[ 0.806388] usb usb1: Manufacturer: Linux 4.19.75-v7+ dwc_otg_hcd
[ 0.808808] usb usb1: SerialNumber: 3f980000.usb
[ 0.811776] hub 1-0:1.0: USB hub found
[ 0.814046] hub 1-0:1.0: 1 port detected

[ 1.241811] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.244466] Indeed it is in host mode hprt0 = 00001101
[ 1.482099] usb 1-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[ 1.487361] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.490843] hub 1-1:1.0: USB hub found
[ 1.493704] hub 1-1:1.0: 4 ports detected
[ 1.811814] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.816526] systemd[1]: System time before build time, advancing clock.
[ 1.942116] usb 1-1.1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[ 1.947713] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.951334] hub 1-1.1:1.0: USB hub found
[ 1.954319] hub 1-1.1:1.0: 3 ports detected

[ 2.821830] usb 1-1.1.1: new high-speed USB device number 4 using dwc_otg

[ 2.952348] usb 1-1.1.1: New USB device found, idVendor=0424, idProduct=7800, bcdDevice= 3.00

[ 2.958734] usb 1-1.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

Have you tried to see if you can access the device using Insteon Terminal? https://github.com/pfrommerd/insteon-terminal

Hello Rob N.

Attempted to use insteon-terminal. Was able to connect to PLM but it hung at modem.getdb()

Please visit the following link for more details:

Compatibility with PowerLinc V2 USB 2414U w/ 2476S & 2476D?

Hi

Is that required if insteon-terminal can connect to the PLM using
connectToSerial(“/dev/ttyAMA0”)?

It seems that a connection can be made but modem.getdb() just hangs.

Is it false positive and insteon-terminal is not really connected?

Since /dev/ttyAMA0 is an actual serial port that insteon-terminal is pretty happy with being connected to it. Its just that no actual PLM is connected to the other end so trying to communicate with it hangs.

…or that is at least what I suspect… :~)

So something I was thinking about. Back when I was trying to get my USB-Serial converter working for one of my serial devices (I have an insteon PLM as well as an old X10 device) I couldn’t get it to register as a serial port. Turned out I needed to add a kernal module for this device. Once I did, it was automatically assigned a port when plugged in.

As an example, I unplugged one of my USB Serial converters and replugged back in. Here is what I saw:

[2222481.592728] usb 1-1.5: USB disconnect, device number 6
[2222481.593138] ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1
[2222481.593178] ftdi_sio 1-1.5:1.0: device disconnected
[2222488.802414] usb 1-1.5: new full-speed USB device number 7 using dwc_otg
[2222488.961110] usb 1-1.5: New USB device found, idVendor=0403, idProduct=6001, bcdDevice= 6.00
[2222488.961120] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2222488.961125] usb 1-1.5: Product: FT232R USB UART
[2222488.961130] usb 1-1.5: Manufacturer: FTDI
[2222488.961135] usb 1-1.5: SerialNumber: AH060VJ1
[2222488.969045] ftdi_sio 1-1.5:1.0: FTDI USB Serial Device converter detected
[2222488.969157] usb 1-1.5: Detected FT232RL
[2222488.969978] usb 1-1.5: FTDI USB Serial Device converter now attached to ttyUSB2

Notice the last line where It says it is not attached to ttyUSB2. Your output from dmesg never shows that. Infact it looks like it connects, finds no driver and disconnects, then reconnects for a 2nd attempt. This is exactly what my USB-Serial used to do too.

I think it is actually not this USB-Serial converter that I showed the example for, but I had to add the following to my /etc/modules in order to get this to load properly.

pl2303

You might want to search to see what kind of kernal module driver might need to be loaded to get a USB PLM to work.

Try running insteon terminal as root using sudo. This will eliminate permission problems with the tty device. Also, I’d also call trackPort() before connecting to the database.

Might have found the problem.

According to a post I stumbled across on the Insteon website the 2414U is a PLC and not a PLM. The protocol differs from the PLM.

Apparently the 2414U is older than the 2413U. (That’s not confusing at all.)

If the 2414U is a PLC what is a recommended replacement? The 2413U or something else?

Thanks again for everyones input.

(Egg on Face)

1 Like

I use a 2413U

Ahhh - OK that makes sense. I forgot that PLC existed. Now I know why It was connecting to a /dev/ttyUSBx port.

I have a 2413S with a USB->Serial converter.

Depending on exactly what you want to do with Insteon, it seems that the perference is somewhat in this order:

  1. ISY device with Insteon support connected to OH via the ISY plugin (I’ve never used it but others report it makes managing your Insteon Devices nice, where you have to use Insteon-Terminal without some other 3rd party config like ISY).
  2. Insteon 2413U or S PLM connected to OH via the Insteon Plugin. This is good but not great. If you are OK with configuring devices with Insteon-Terminal and OK with some wireless sensors not really functioning (like hidden door sensors - we say they are supported, but they frequently miss events) then this is cool and inexpensive. This is what I use, I don’t mind Insteon Terminal and I use Zwave wireless sensors instead of Insteon.
  3. Insteon Hub connected to OH via Insteon Plugin. Same issue as above, except add a ton of lag. Don’t waste your time trying to use motion sensors in any situation where time is important. Also, you have to basically abandon the iOS/Android app for the hub as it changes devices but has no way to inform OH of these changes so item states and actual device states get out of sync. You can use the app for some device config/linking, but it isn’t very advanced and you end up having to use Insteon-Terminal for things anyway.

These is a 4th option, but I don’t know anyone who has tried: That is using the 2413 PLM with 3rd software called Python Insteon <–> MQTT Bridge:

This software basically takes all incoming messages from the Insteon PLM and puts them onto the MQTT bus and and messages sent to the MQTT bus and executes Insteon commends. You then connect OH items to the MQTT plugin. This is supposed to be super nice and allows device configuration (thereby no longer needing Insteon Terminal) and supports all of the devices that the Native OH plugin does. It may even support the wireless devices better than the native plugin. Its on my long term list of things to play with at some point. Just havne’t gotten that far yet.

1 Like

Rob N

Thanks for the input.

Hello Tom

The 2413U seems to be the less expensive route.

I’ve read the 2413U self-destructs every year or so.

Is this happening with the newer revisions of the 2413U?

Disappointing if true as the 2414u has been operational for approximately 12 years.

With the ISY wouldn’t a PLM still be required?

Can a switch be paired with both the 2413u and the 2414u?

I’m interested, while transitioning systems, on having a backup trigger for some of the exterior lights that come on at night.

Will provide and update once I get the new device installed.

Thanks again for your input.

I’ve had my PLM for 3 years and it hasn’t destructed yet, although I’ve read the same stuff and I’m always just waiting. It sucks, but isn’t the end of the world to go and replace a PLM.

Any insteon device can be paired with a number of devices (256 I think?) including your PLM and PLC. The only issue is that if you are basically using two systems to control a device one system is always going to be out of sync. This is kind of that I described as being an issue with the Hub where you can use both OH and the Hub’s phone app.

The way this works is this:
You cross link your dimmer with your PLM (making it both a controller and responder to the PLM and the PLM is both a controller and responder to the dimmer)

If you command the dimmer On via OH, OH sends the command from the PLM (since it is a controller of the dimmer), and since the dimmer is a responder to the PLM it will turn on and send an ACK.

In the above even if the dimmer is cross linked also with the PLC, the PLC will ignore the PLM’s message to the dimmer since it is not traffic intended for the PLC and it also ignores the ACK sent from the dimmer to the PLM for the same reason, so the PLC has no clue that the state of your dimmer has changed.

Also, if you command from your PLC, for the same reason illustrated above, OH will not know that you have changed the state of the dimmer.

From the other direction, if you manually operate the dimmer locally at the paddle, all devices that are linked as responders to the dimmer will learn that the dimmer was tuned on, so that direction works.

The basic problem is at the hardware level, insteon devices do not send messages to all responders about a change in state unless is it from a local paddle / button push.

There are, however, actually two ways that OH can learn the state of the device:

  1. What I just described above where the switch is operated manually and sends to all linked responders
  2. Every so often OH polls every device on our network to which it’s PLM is linked and asks for its state. If the state is different than the OH known state for that associated item it will update the item.

Note: These polls are very infrequent and cause issues. Know that the bandwidth of the Insteon bus is EXTREMELY limited. polling can take up much of this bandwidth. So the default poll is set to 5 minutes (in your insteon.cfg file 300000ms). So every device on your network is trying to be polled every 5 minutes by default. Many people with bigger networks turn this number down to once every 30 mins or 60 mins to reduce the impact to the bandwidth of the bus. I say all of this because many people trying to deal with the issues I described above want to just dramatically shorten this polling time to get both systems to sync up faster. I’d highly recommend against that.

If you have rules in openhab that get triggered by Insteon devices changing state, this out of sync issue can cause all kind of strange behavior where you’ll change a device state from your other system, but OH doesn’t know until the next poll some minutes later, then fires your rule creating a “Gremlins in your house” effect.

I definitely get the desire to have some transition time, I’d try to keep it as short as possible, because your system will be pretty unstable in the mean time.

On the ISY device, yes, the ISY still uses a PLM, its just basically a device between the PLM and OH that makes configuration much simpler, but of course at a price…

Hello Everyone

Ordered the 2413U on Wednesday, received Friday and installed tonight.

Success. Was able to turn lights on and off via Alexa and Hue Emulation.

That is once I remembered to change the IP address in hueemulation.config. I configured WiFi on the Pi using a different IP and removed the ethernet cable.

Thanks again for everyones input.

1 Like