Hey Splatsch,
No, I did not try with another device.
My device is a Legrand 048408 room controller
Regards
Arnaud
Splastch,
Itâs possible to test your binding version 2⊠?
Regards
Arnaud
Hi,
Problem,
2019-04-28 18:27:38.610 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler, id=449, bundle=260/file:/usr/share/openhab2/addons/org.openhab.binding.bacnet-1.13.0.jar]: Unexpected problem updating configuration org.openhab.bacnet
java.lang.IllegalArgumentException: Either withBroadcast or withSubnet must be called.
at com.serotonin.bacnet4j.npdu.ip.IpNetworkBuilder.build(IpNetworkBuilder.java:129) ~[?:?]
at org.openhab.binding.bacnet.internal.BacNetBinding.updated(BacNetBinding.java:215) ~[?:?]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189) ~[9:org.apache.felix.configadmin:1.9.4]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152) [9:org.apache.felix.configadmin:1.9.4]
at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85) [9:org.apache.felix.configadmin:1.9.4]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1102) [9:org.apache.felix.configadmin:1.9.4]
at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1058) [9:org.apache.felix.configadmin:1.9.4]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [9:org.apache.felix.configadmin:1.9.4]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [9:org.apache.felix.configadmin:1.9.4]
at java.lang.Thread.run(Thread.java:748) [?:?]
Regards,
Arnaud
I restarted efforts in area of openHAB 2 addon but dont have working version yet.
Earlier screenshot was done before OH2 was releases. Sadly I lost all this code in transition. As soon as I will have working snapshot I will publish it. I believe it will solve many issues caused by configuration; however there are also many areas where BACnet exceeds HAB capabilities by complexity.
Many of advanced object types will remain unsupported, unless hacked through openHAB type system.
Cheers,
Ćukasz
Can you share your bacnet.cfg?
Mine is as follows:
broadcast=192.168.2.xx
localDeviceId=1340
refreshInterval=30000
Broadcast is used to discover devices and 192.168.2.xx
is my only device. You can put 192.168.2.255
. For small networks it mostly works, but sometimes devices do not show up.
The 192.168.2.xx
is my bacnet device IP. To avoid troubles with discovery which been reported over forum thread I added address
option for items. You can use it to bind specific OH2 element to device property:
Number Air_Flow "Supply tewmperature [%.1f] °C" <temperature> (Ventilation) { bacnet="device=1014,type=analogInput,id=0,refreshInterval=1000,address=192.168.2.xx:47808" }
Refresh interval is in millis thus 1000ms=1s.
Hello Splatch,
Itâs ok.
Pierre-luc gave me an example of a .cfg file
My cfg file:
#Refresh interval in milliseconds (optional, defaults to 60000ms)
refreshInterval=5000
#Set the bacnet network address
broadcast=192.168.1.255
localNetworkNumber=0
My items files:
Switch | Centre_Bacnet_1 | âEclairage Bacnet 1â (gEcl_Bac) [ âLightingâ ] {bacnet=âdevice=5583,type=binaryValue,id=8â} |
---|---|---|
Switch | Centre_Bacnet_2 | âEclairage Bacnet 2â (gEcl_Bac) [ âLightingâ ] {bacnet=âdevice=5583,type=binaryValue,id=9â} |
I have just problem whith rollershutter item:
ollershutter Vol_Bacnet âVolet Bacnetâ (gEcl_Bac) {bacnet=âdevice=5583,type=multiStateValue,id=1â}
Regards
Arnaud
I had no chances to test multi state values, but try setting a numeric value instead of text representation. As far I remember some BACnet object types are indexed so you might need to use state index and not value description.
Hello,
I have a problem with a item ârollershutterâ
config:
Rollershutter Vol_Bacnet âVolet Bacnetâ (gEcl_Bac) {bacnet=">[UP:device=5583,type=multiStateValue,id=19,value=0],>[DOWN:device=5583,type=multiStateValue,id=19,value=1]"}
logs:
2019-05-02 22:30:18.824 [ERROR] [el.item.internal.GenericItemProvider] - Binding configuration of type âbacnetâ of item âVol_Bacnetâ could not be parsed correctly.
org.eclipse.smarthome.model.item.BindingConfigParseException: Invalid BacNet config: â>[UP:device=5583,type=multiStateValue,id=19,value=0],>[DOWN:device=5583,type=multiStateValue,id=19,value=1]â. Expected key1=value1,key2=value2
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:51) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:397) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.internalDispatchBindings(GenericItemProvider.java:366) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.processBindingConfigsFromModel(GenericItemProvider.java:229) ~[?:?]
at org.eclipse.smarthome.model.item.internal.GenericItemProvider.modelChanged(GenericItemProvider.java:432) ~[?:?]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:301) ~[?:?]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:139) ~[?:?]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:227) ~[?:?]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.processWatchEvent(FolderObserver.java:291) ~[?:?]
at org.eclipse.smarthome.core.service.WatchQueueReader.lambda$3(WatchQueueReader.java:323) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: org.openhab.model.item.binding.BindingConfigParseException: Invalid BacNet config: â>[UP:device=5583,type=multiStateValue,id=19,value=0],>[DOWN:device=5583,type=multiStateValue,id=19,value=1]â. Expected key1=value1,key2=value2
at org.openhab.binding.bacnet.internal.BacNetBindingConfigParser.parseBindingConfig(BacNetBindingConfigParser.java:38) ~[?:?]
at org.openhab.binding.bacnet.internal.BacNetGenericBindingProvider.processBindingConfiguration(BacNetGenericBindingProvider.java:52) ~[?:?]
at org.openhab.core.binding.internal.BindingConfigReaderDelegate.processBindingConfiguration(BindingConfigReaderDelegate.java:49) ~[?:?]
... 16 more
Where is the problem ?
Regards
Arnaud
Problem comes from fact that binding does not recognize UP/DOWN commands. For such cases you need to transform them to numeric values which will be properly encoded and sent to device.