openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

[IPX800] Problem with host setting in IpX800.cfg #5612

Closed fabriceblache closed 5 years ago

fabriceblache commented 6 years ago

Hi I have in ipx800.cfg this line: myipx.host=192.168.0.2

and this exception

2018-06-26 18:43:43.735 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=417, bundle=261/mvn:org.openhab.binding/org.openhab.binding.ipx800/1.12.0]: Updating property host of configuration org.openhab.ipx800 caused a problem: Invalid config key

org.osgi.service.cm.ConfigurationException: host : Invalid config key

at org.openhab.binding.ipx800.internal.Ipx800Config.readConfig(Ipx800Config.java:153) [261:org.openhab.binding.ipx800:1.12.0]

at org.openhab.binding.ipx800.internal.Ipx800Binding.updated(Ipx800Binding.java:251) [261:org.openhab.binding.ipx800:1.12.0]

at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) [8:org.apache.felix.configadmin:1.8.16]

at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [8:org.apache.felix.configadmin:1.8.16]

at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [8:org.apache.felix.configadmin:1.8.16]

at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1479) [8:org.apache.felix.configadmin:1.8.16]

at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1435) [8:org.apache.felix.configadmin:1.8.16]

at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141) [8:org.apache.felix.configadmin:1.8.16]

at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109) [8:org.apache.felix.configadmin:1.8.16]

at java.lang.Thread.run(Thread.java:748) [?:?]

the code is here https://github.com/openhab/openhab1-addons/blob/master/bundles/binding/org.openhab.binding.ipx800/src/main/java/org/openhab/binding/ipx800/internal/Ipx800Config.java with this line : private final static Pattern CONFIG_PATTERN = Pattern.compile("^(.+?)\.(host|port|(x400|x880)\.([1-3]))()$",Pattern.CASE_INSENSITIVE);

Where is the mistake ?

Best regards, Fabrice

9037568 commented 6 years ago

Looks ok at a glance. I configured the same and it works fine.

07:22:17.449 [INFO ] [binding.ipx800.internal.Ipx800Binding] - Ipx800 configuration read with 1 device(s) : 

Check your ipx800.cfg file for bad characters, or post it here.

bchabrier commented 6 years ago

Have look at /var/lib/openhab2/config/org/openhab/ipx800.config. It probably contains a host=... key. Remove the line, and it should work fine.

Rgds, Bruno

9037568 commented 5 years ago

Closing for lack of activity.