Insteonplm.cfg not working correctly

I am having peculiar happenings on my Openhab system.

My Insteonplm.cfg has the following code in it.

port_0=COM1 (Windows, with serial/usb modem on COM1)

But my log file shows this just after my karaf files closes automatically.


2019-08-11 00:33:26.026 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: port_0 -> COM1	  (Windows, with serial/usb modem on COM1)
2019-08-11 00:33:26.037 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: port_1 -> COM1	  (Windows, with serial/usb modem on COM1)
2019-08-11 00:33:26.037 [WARN ] [ng.insteonplm.internal.driver.Driver] - ignored attempt to add duplicate port: port_1 COM1	  (Windows, with serial/usb modem on COM1)
2019-08-11 00:33:26.038 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: port_5 -> COM6	  (Windows, with serial/usb modem on COM1)
2019-08-11 00:33:26.038 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: port_6 -> COM7	  (Windows, with serial/usb modem on COM1)

2019-08-11 00:33:27.952 [ERROR] [onplm.internal.driver.SerialIOStream] - got no such port for COM6	  (Windows, with serial/usb modem on COM1)

I do not see how my insteonplm.cfg file can contain only the one line, yet my log file contains every thing I have tried in the insteonplm.cfg file for the last half hour.

Please help.

Change the config file to:

port_0=COM1

I have, yet the log shows when it shuts down, that I have com5, com6, and even com1. I do not know where it is, so I can eliminate it.

This is the last line of my log file:

2019-08-11 15:19:50.826 [ERROR] [onplm.internal.driver.SerialIOStream] - got no such port for COM6	  (Windows, with serial/usb modem on COM1)

Yet this is my cfg file:

# port_0=COM1	  (Windows, with serial/usb modem on COM1)

#
# to connect to an Insteon Hub2 (the 2014 version) on port 25105, with
# a poll interval of 1000ms = 1sec:
#
# port_0=/hub2/Tower156:cN2yiVA3@192.168.0.228:25105,poll_time=1000

This might be of interest

I cannot find it under openhab. Is it hiding somewhere else? BTW, I failed to mention it, but I am running 2.4.0.

So far as I know, all legacy bindings use a xxx.config working copy. I’d be surprised if there were not insteonplm.config in same folder as insteonplm.cfg - but maybe that would indicate it cannot be parsed properly (or is empty).

There isn’t a copy of xx.config in the working directory. I cannot find, anywhere, a copy that shows the com6 or com7 in it.

I don’t know how the binding behaves if it does not get valid insteonplm.cfg content. I think I’d give it some valid content, without the bracketed comment.

Try changing windows search to search file contents. Here’s one of many sites with instructions on how to do do this: https://www.groovypost.com/howto/search-through-file-contents-windows-10/. Then Search for COM1 and see where you get matches.

I have even tried deleting the devices in Device Manager that are under Com6 and COM7. No luck. I now have another hub on the same address to run, but until I can get Openhab running, I am dead in the water.

Can you post EXACTLY what is in your config file? I think you may have an issue with a part that is supposed to be a comment not commented.

Ok.

# The insteon PLM controller port, one for each modem or hub.
# You can have multiple ports, but that has never been tested, use at your own peril.
#
# examples of valid port configurations for serial or usb modems:
#
# port_0=/dev/insteon  (Linux, with serial port symlinked to /dev/insteon)
# port_0=/dev/ttyS0    (Linux, with plain old serial modem)
# port_0=/dev/ttyUSB0  (Linux, with usb based PLM modem)
# port_0=COM1	  (Windows, with serial/usb modem on COM1)

#
# to connect to an Insteon Hub2 (the 2014 version) on port 25105, with
# a poll interval of 1000ms = 1sec:
#
port_0=/hub2/myhub:xxxxxxxx@192.168.0.244:25105,poll_time=1000

#
# to connect to the raw tcp feed on an older Insteon Hub (pre 2014 version) on port 9761
#
# port_0=/hub/localhost:9761

# Poll interval (optional, in milliseconds, defaults to 300000).
# Poll too often and you will overload the insteon network,
# leading to sluggish or no response when trying to send messages to devices.
# The default poll interval of 300s has been tested and found to be a good
# compromise in a configuration of about 110 switches/dimmers.
#
poll_interval=300000

# Refresh value (optional, in milliseconds, defaults to 600000)
# The refresh interval is not critical, since only device statistics are logged
# upon refresh (the polling operates under different timers).
#
refresh=600000

# optional file with additional device types. The syntax of
# the file is identical to the device_types.xml file in the
# source tree. Please remember to post successfully added
# device types to the openhab group so the developers
# can include them into the device_types.xml file!

#more_devices=/path_to_file/more_devices.xml

# optional file with additional feature templates, like
# in the device_features.xml file in the source tree.

#more_features=/path_to_file/more_features.xml

I think I had the same issue a while ago and the only way I found to resolve it was either to uninstall the entire binding, restart OH, and reinstall it. Or I had to uninstall OH and reinstall it. I don’t remember off hand what resolved the issue. I know the second one is not what you want to do but I can’t remember exactly what it was that resolved the issue.

OK - looks cool, thought I saw something before.

Anyway, I stumbled upon this once too but I see what looks like a cashed copy of the insteon config here:

/var/lib/openhab2/config/org/openhab

I have no clue what it is there fore and I’ve never monkyed with it, but you might want to see if your spurious config stuff is in there.

Ok, thanks. I will try those ideas and let you know if either of them work.

Also stop openhab clear cache and restart.

Sudo openhab-cli clean-cache

Also what plm do you have? I can help with config file.

How do you clear cache on Windows?

I have the InsteonPLM.

This needs to be uncommented and changed to the correct windows com port.

The two uncommented Hub lines needs to be commented.

To clear cache you can manually find the tmp directory in openhab and delete the contents. There is one other directory to clear contents of. The name escapes me.
I am unsure of the paths right now as I am not at computer. I know for sure there is forum posts.