[Tellstick] Completely stopped working since going from 2.3 stable to snapshot
See original GitHub issueExpected Behavior
The Binding should start and get the relevant Things online.
Current Behavior
The gateway gets status UNKNOWN and all the other Tellstick devices get OFFLINE.
Steps to Reproduce (for Bugs)
- Install and start the binding
Context
Pasting full log below, but the important row seems to be the “Invalid calling convention 63”. The interesting thing is that I got the exact same error when I tried to get this binding running in an arm64 environment and came to the conclusion that it had something with JNA using the wrong architecture to do. Now however I’m in a pure 32 bit (arm) environment in which everything worked fin in 2.3.0.
Your Environment
OS: Debian Jessie CPU: ARMv7 (i.MX6 Quad) OH: Build #1330 Tellstick Binding: 2.4.0.201808131007
Log
Full debug log when starting the Binding:
2018-08-20 12:53:31.792 [DEBUG] [org.openhab.binding.tellstick ] - BundleEvent STARTING - org.openhab.binding.tellstick
2018-08-20 12:53:31.887 [DEBUG] [org.openhab.binding.tellstick ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=662, service.bundleid=234, service.scope=bundle, component.name=org.openhab.binding.tellstick.internal.TellstickHandlerFactory, component.id=438} - org.openhab.binding.tellstick
2018-08-20 12:53:32.035 [DEBUG] [org.openhab.binding.tellstick ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=663, service.bundleid=234, service.scope=bundle, component.name=org.openhab.binding.max.internal.discovery, component.id=439} - org.openhab.binding.tellstick
2018-08-20 12:53:32.253 [DEBUG] [org.openhab.binding.tellstick ] - BundleEvent STARTED - org.openhab.binding.tellstick
2018-08-20 12:53:32.479 [DEBUG] [org.openhab.binding.tellstick ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=664, service.bundleid=234, service.scope=singleton} - org.openhab.binding.tellstick
2018-08-20 12:53:32.598 [DEBUG] [ternal.core.TelldusCoreBridgeHandler] - Initializing Tellstick bridge handler.
2018-08-20 12:53:32.638 [INFO ] [ternal.core.TelldusCoreBridgeHandler] - Loading telldus-core from /usr/lib/
2018-08-20 12:53:32.768 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=oregon}, {key=name; type=String; value=2914:6}, {key=model; type=String; value=2914}, {key=deviceId; type=String; value=6_2914_oregon}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:32.761 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=fineoffset}, {key=name; type=String; value=temperature:203}, {key=model; type=String; value=temperature}, {key=deviceId; type=String; value=203_temperature_fineoffset}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:32.745 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=arctech}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Fönsterlampa förrådet}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=13}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:32.743 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=arctech}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Fönsterlampa övervåning}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=12}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.013 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 13 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:32.936 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 203_temperature_fineoffset bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:32.878 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 6_2914_oregon bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:32.845 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '1' to smarthome inbox
2018-08-20 12:53:32.812 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=fuhaote}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Vitrinskåpet i vardagsrummet}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=17}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:32.790 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=arctech}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Ljusslinga balkongräcke}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=1}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.305 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 17 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:33.229 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '5' to smarthome inbox
2018-08-20 12:53:33.210 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=waveman}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Ringklocka ytterdörr}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=20}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.186 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=fineoffset}, {key=name; type=String; value=temperature:234}, {key=model; type=String; value=temperature}, {key=deviceId; type=String; value=234_temperature_fineoffset}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.176 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:sensor:1:203_temperature_fineoffset:temperature
2018-08-20 12:53:33.145 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=arctech}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Utebelysning}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=16}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.108 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 12 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:33.749 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 16 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:33.678 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 203_temperature_fineoffset bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:33.646 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 234_temperature_fineoffset bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:33.588 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 20 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:33.510 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '6' to smarthome inbox
2018-08-20 12:53:33.498 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=fineoffset}, {key=name; type=String; value=temperature:167}, {key=model; type=String; value=temperature}, {key=deviceId; type=String; value=167_temperature_fineoffset}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.485 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:switch:1:17:state
2018-08-20 12:53:33.414 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 1 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:34.021 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 17 bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:33.998 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 167_temperature_fineoffset bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:33.933 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '12' to smarthome inbox
2018-08-20 12:53:33.909 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:switch:1:20:state
2018-08-20 12:53:33.885 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=arctech}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Edvins fönsterlampa}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=6}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.844 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:33.817 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Initialize TelldusDeviceHandler Configuration[{key=protocol; type=String; value=arctech}, {key=repeat; type=BigDecimal; value=2}, {key=name; type=String; value=Ellas fönsterlampa}, {key=model; type=String; value=codeswitch}, {key=deviceId; type=String; value=5}, {key=dimmer; type=Boolean; value=false}]. class class org.eclipse.smarthome.config.core.Configuration
2018-08-20 12:53:33.807 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:switch:1:16:state
2018-08-20 12:53:34.545 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 5 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:34.433 [DEBUG] [lstick.handler.TelldusDevicesHandler] - device: 6 bridgeStatusChanged: UNKNOWN
2018-08-20 12:53:34.335 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 20 bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:34.312 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '13' to smarthome inbox
2018-08-20 12:53:34.191 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:34.108 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:switch:1:1:state
2018-08-20 12:53:34.732 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:switch:1:6:state
2018-08-20 12:53:34.705 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '16' to smarthome inbox
2018-08-20 12:53:34.672 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:34.605 [DEBUG] [lstick.handler.TelldusDevicesHandler] - Handle event REFRESH for tellstick:switch:1:5:state
2018-08-20 12:53:34.573 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 16 bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:34.958 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 5 bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:34.888 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '17' to smarthome inbox
2018-08-20 12:53:34.851 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 6 bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:34.791 [DEBUG] [lstick.handler.TelldusDevicesHandler] - No available bridge handler found for 1 bridge org.eclipse.smarthome.core.thing.internal.BridgeImpl@3e3cfcb2 .
2018-08-20 12:53:35.094 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:35.060 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! DEVICE with id '20' to smarthome inbox
2018-08-20 12:53:35.028 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:34.988 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:35.294 [ERROR] [org.tellstick.device.TellstickSensor] - Tellstick error -3 msg Device not found
2018-08-20 12:53:35.185 [WARN ] [lstick.handler.TelldusDevicesHandler] - Tellstick bridge handler not found. Cannot handle command without bridge.
2018-08-20 12:53:35.390 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '203' to smarthome inbox
2018-08-20 12:53:35.561 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '234' to smarthome inbox
2018-08-20 12:53:35.650 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '6' to smarthome inbox
2018-08-20 12:53:35.740 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '6' to smarthome inbox
2018-08-20 12:53:35.803 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '50' to smarthome inbox
2018-08-20 12:53:35.866 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '50' to smarthome inbox
2018-08-20 12:53:35.947 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '101' to smarthome inbox
2018-08-20 12:53:36.015 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '28' to smarthome inbox
2018-08-20 12:53:36.075 [DEBUG] [.discovery.TellstickDiscoveryService] - Adding new TellstickDevice! SENSOR with id '160' to smarthome inbox
2018-08-20 12:53:36.140 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception
java.lang.IllegalArgumentException: Invalid calling convention 63
at com.sun.jna.Native.createNativeCallback(Native Method) ~[?:?]
at com.sun.jna.CallbackReference.<init>(CallbackReference.java:263) ~[?:?]
at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:449) ~[?:?]
at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:426) ~[?:?]
at com.sun.jna.Function.convertArgument(Function.java:551) ~[?:?]
at com.sun.jna.Function.invoke(Function.java:338) ~[?:?]
at com.sun.jna.Library$Handler.invoke(Library.java:244) ~[?:?]
at com.sun.proxy.$Proxy230.tdRegisterDeviceEvent(Unknown Source) ~[?:?]
at org.tellstick.device.TellsticEventHandler.setupListeners(TellsticEventHandler.java:123) ~[?:?]
at org.tellstick.device.TellsticEventHandler.<init>(TellsticEventHandler.java:48) ~[?:?]
at org.openhab.binding.tellstick.internal.core.TelldusCoreBridgeHandler.setupListeners(TelldusCoreBridgeHandler.java:167) ~[?:?]
at org.openhab.binding.tellstick.internal.core.TelldusCoreBridgeHandler.lambda$0(TelldusCoreBridgeHandler.java:119) ~[?:?]
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) [?:?]
Issue Analytics
- State:
- Created 5 years ago
- Comments:47 (30 by maintainers)
Top Results From Across the Web
Tellstick binding for OpenHab2 - #179 by elias_gabrielsson ...
Hi, this link does not seem to work anymore. I have done a new installation of OpenHab 2, but cannot get the “built-in”...
Read more >Free Windows application for Tellstick NET - Page 2
I have just downloaded it and now getting things to work. Looks great! ... then everything should activate completely and stop logging, ...
Read more >Bug listing with status UNCONFIRMED as at 2022/12/14 12 ...
Bug:128538 - "sys-apps/coreutils: /bin/hostname should be installed from coreutils not sys-apps/net-tools" status:UNCONFIRMED resolution: severity:enhancement ...
Read more >0.101: Airly, Apprise, Sinch, Solar-Log, Microsoft Teams
After restart my glances has been discovered. I opened the “Setup glances” window to provide host/login/passwd but it does not work - I...
Read more >CHANGELOG · shuaigewei168/nmap - Gitee.com
我知道了,不再自动展开. 加入 Gitee. 与超过 800 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :). 免费加入. 已有帐号? 立即登录. master.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Now I have decompiled the missing changes for javatellstick and also, with the help from the JNA forum, fixed the issue with incompatibility to newer versions of jna.
It was jna-4.2.1 that revealed the fault in the javatellstick code for linux based systems, and it was code for handling callbacks that failed (the call chain for the “Invalid calling convention 63” indicated that it was a callback setup that failed.
I have the complete and updated source code for javatellstick in my cloned javatellstick-repo. I’ve also updated javatellstick to compile against jna-4.5.2, same version as included in OH2.4 and built a new version of the lib, javatellstick-1.1.jar, containing all theses changes.
I’ve also updated the tellstick-binding to include javatellstick-1.1.jar and jna-4.5.2.jar and also fixed a typo in the naming of one of the included classes in javatellstick.
Finally I’ve built a new tellstick-binding jar-file for OH2.4 (seems also to work in OH2.3) and tested it on OH2.4 M4 since yesterday, however it will need further testing to make sure the decompilation has been done correctly. The jar-file can hopefully be downloaded here.
NOTE: I’ve only tested it on my raspberry running raspbian jessie, not on WIndows nor MacOS. NOTE: I’ve not changed any other parts of the source code for the tellstick binding, so old bugs are still there (if any).
If the tests are successfull, the changes I’ve made to the tellstick-binding needs to be made available via a pull request as I understand, I’ve started to prepare one but I’m not an expert so I might need help to get it right.
Big thanks to @ewallquist for initial testing!
I think I found the root-cause to the problem, in 2.4.0.M1 (#52) (2018-aug-15 21:52:02) and specifically Added JNA to distribution (#741), jna-4.5.2 has been added to OH2.4.
Since the tellstick binding uses javatellstick which in turn is compiled against jna-4.0.0, we end up in the “Invalid calling convention 63”.
Work-around for getting tellstick binding to work (on a raspberry pi) is to move the the jna-4.5.2.jar and jna-platform-4.5.2.jar from /usr/share/openhab2/runtime/lib/boot/ to e.g. /tmp/ and restart OH.