fruggy83 / openocean

27 stars 11 forks source link

TCM310 Stick not working #19

Closed eskorte closed 5 years ago

eskorte commented 5 years ago

Hi,

I can't get the following Enocean-USB-Stick to work with openHAB and the openocean binding: https://www.amazon.de/dp/B01DRO7B2U/ref=cm_sw_em_r_mt_dp_U_9PMHBbHX0HSN7 Is it documented that it should work? Than I would dig into this problem... It is running out of the box with FHEM, so I can assure the Stick is not broken ;-)

Best regards

Casshern81 commented 5 years ago

Hi Eskorte,

on what device are you running your openhab ? I also use the TCM310 stick and it works fine with Openhabian on my raspberry-pi 3b. Where do you get stuck ? Does the openocean-binding show up in paper-ui ?

Best regards, Alex

eskorte commented 5 years ago

Thanks for the reply, Alex. So lets have a look into it.

I used a fresh openhabian image from yesterday on a RPI 2 Model B.

The USB-Stick is recognized:

[13:42:53] openhabian@openHABianPi:~$ lsusb
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I followed the installation notes for openhabian and rebooted the pi.

Under PaperUI -> AddOns -> Bindings I only see the "EnOncean Binding (binding-enocean1 - 1.12.0)", the OpenOcean does not show up.

Casshern81 commented 5 years ago

Hi, OpenOcean does not show up there yet, because it it not officially intigrated into openhab. But it will be in the next few weeks. In the meantime, you need to install the binding manually. Please follow the install-instructions: https://github.com/fruggy83/openocean#openhabian.

Best regards, Alex

Edit: You find the binding-file here: https://github.com/fruggy83/openocean/tree/master/precompiled

eskorte commented 5 years ago

Sorry, two important words were missing ;-) I followed the installation notes of OpenOcean for openhabian. So... should be working.

Casshern81 commented 5 years ago

After a reboot there is a possibility, that you need to log into karaf and execute "feature:install openhab-transport-serial" again.

Best regards, Alex

eskorte commented 5 years ago

Done that, didn't work unfortunately.

Casshern81 commented 5 years ago

Please visit your paper-ui. Go to Inbox and click on the PLUS symbol. Does the "OpenOcean Binding" show up there ?

eskorte commented 5 years ago

No :-(

Casshern81 commented 5 years ago

How did you copy the .jar-file onto the raspberry pi ?

Casshern81 commented 5 years ago

Try this anyway:

eskorte commented 5 years ago

With wget https://github.com/fruggy83/openocean/blob/master/precompiled/org.openhab.binding.openocean-2.4.0-SNAPSHOT.jar to /srv/openhab2-addons and fixed permissions after that.

Reinstalled & restarted, no change.

eskorte commented 5 years ago

Under sudo openhabian-config => 30 System settings => 35 serial port I have checked choice 1 & 3

Casshern81 commented 5 years ago

Sorry if this might be a dumb question, but by "fixed permission" you meant, that you fixed the permission of the .jar file, right ?

eskorte commented 5 years ago

With sudo openhabian-config => 10 Apply Improvements => 14 Fix permissions

Permissions now are:

-rw-rw-r-- 1 openhab openhabian 41991 Aug 29 12:36 org.openhab.binding.openocean-2.4.0-SNAPSHOT.jar

Casshern81 commented 5 years ago

Hmmm ... I don´t see anything wrong. Which openhab version are you using ?

Sometimes after updating openhab it gets a bit tricky to get the binding back running. So i need to install "openhab-transport-serial" a few times. After installing it takes up to a minute until the binding shows back up.

Casshern81 commented 5 years ago

In Karaf: type: "bundle:list". Does the binding show up there ?

eskorte commented 5 years ago

Release 2.3.0

It's not listed:

openhab> bundle:list|grep -i transport                                                                                                                                       
212 │ Active   │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Serial Transport
213 │ Active   │  80 │ 0.10.0.oh230           │ Eclipse SmartHome Serial Transport for RXTX

I tried to uninstall/reinstall it, without success.

Is there a log or a debug log to be switched on to see anything more?

Thanks for your patience, Alex ;-)

eskorte commented 5 years ago

Ah, found it:

openhab> config:list|grep port
   log4j2.logger.shell.name = org.apache.karaf.shell.support
   feature.esh-automation-module-script-rulesupport/0.10.0.oh230 = esh-automation-module-script-rulesupport/0.10.0.oh230
   feature.esh-io-transport-coap/0.10.0.oh230 = esh-io-transport-coap/0.10.0.oh230
   feature.esh-io-transport-dbus/0.10.0.oh230 = esh-io-transport-dbus/0.10.0.oh230
   feature.esh-io-transport-http/0.10.0.oh230 = esh-io-transport-http/0.10.0.oh230
   feature.esh-io-transport-mdns/0.10.0.oh230 = esh-io-transport-mdns/0.10.0.oh230
   feature.esh-io-transport-mqtt/0.10.0.oh230 = esh-io-transport-mqtt/0.10.0.oh230
   feature.esh-io-transport-serial-javacomm/0.10.0.oh230 = esh-io-transport-serial-javacomm/0.10.0.oh230
   feature.esh-io-transport-serial-rxtx/0.10.0.oh230 = esh-io-transport-serial-rxtx/0.10.0.oh230
   feature.esh-io-transport-serial/0.10.0.oh230 = esh-io-transport-serial/0.10.0.oh230
   feature.esh-io-transport-upnp/0.10.0.oh230 = esh-io-transport-upnp/0.10.0.oh230
   feature.openhab-transport-coap/2.3.0 = openhab-transport-coap/2.3.0
   feature.openhab-transport-http/2.3.0 = openhab-transport-http/2.3.0
   feature.openhab-transport-mdns/2.3.0 = openhab-transport-mdns/2.3.0
   feature.openhab-transport-mqtt/2.3.0 = openhab-transport-mqtt/2.3.0
   feature.openhab-transport-serial/2.3.0 = openhab-transport-serial/2.3.0
   feature.openhab-transport-upnp/2.3.0 = openhab-transport-upnp/2.3.0
eskorte commented 5 years ago

Sorry, you meant the binding, not the transport.

The binding is not showing up:

openhab> bundle:list|grep -i open
177 │ Active   │  90 │ 2.3.0                  │ openHAB Core
178 │ Active   │  80 │ 2.3.0                  │ openHAB Karaf Integration
180 │ Resolved │  80 │ 2.3.0                  │ openHAB Sound Support, Hosts: 114
181 │ Active   │  80 │ 2.3.0                  │ openHAB Dashboard UI
192 │ Resolved │  75 │ 2.3.0                  │ openHAB Basic UI Fragment, Hosts: 190
195 │ Resolved │  75 │ 2.3.0                  │ openHAB Paper UI Theme Fragment, Hosts: 191
Casshern81 commented 5 years ago

EDIT: Try this first: In Karaf: "bundle:install org.openhab.binding.openocean"


To be honest, i have no idea whats wrong with your setup. If i where you, i would start over. First delete the openocean-binding-file and redownload + install. If that does not help, maybe format the sd-card and reinstall openhabian.

As so the logging part: https://www.openhab.org/docs/administration/logging.html#defining-what-to-log

Best of luck, mate.

fruggy83 commented 5 years ago

Hi guys,

this is really strange! Did not see such a behaviour in the past. I have just another two suggestions:

  1. Could you try to stop openhabian (sudo service openhab2 stop), then clear the cache ( sudo openhab-cli clean-cache), restart openhabian (sudo service openhab2 start) and check if the bundle is showing up then.
  2. I am not quite sure if this binding runs under OH2.3. I am using the snapshots of OH even in my productive environment. @Casshern81 Are you still using OH2.3 with this binding?

Good luck @eskorte

eskorte commented 5 years ago

Thanks for the wishes, no luck so far.

It's a clean install, so no interfering changes or something.

''' openhab> bundle:install org.openhab.binding.openocean Bundle IDs: Error executing command: Error installing bundles: Unable to install bundle org.openhab.binding.openocean: org.osgi.framework.BundleException: Error reading bundle content '''

I cleared the cache, no change.

Dumb question of mine: The "2.4.0" in the binding file has nothing to do with the openHAB Version, or does it?

Best regards

Casshern81 commented 5 years ago

Hi there, i am just setting up my testsetup with the stable 2.3 Version and i will try it. Give me 20 min and i will have a definitiv answer.

Dumb question of mine: The "2.4.0" in the binding file has nothing to do with the openHAB Version, or does

It does. But normally it should work with 2.3 aswell. But there are cases, when it can make problems. But i will try it for you :)

Casshern81 commented 5 years ago

Sorry to be the bearer of bad news, but the problem def. lies on your part.

openhab_openocean


EDIT: Solution is in my next comment !

Casshern81 commented 5 years ago

I think i found your problem !

With sudo openhabian-config => 10 Apply Improvements => 14 Fix permissions Permissions now are: -rw-rw-r-- 1 openhab openhabian 41991 Aug 29 12:36 org.openhab.binding.openocean-2.4.0-SNAPSHOT.jar

Look @ the size of the file. It is way to small ! I just tried downloading the .jar via wget and the file was also way to small.


EDIT: This is the right command, to download the file from github: wget https://github.com/fruggy83/openocean/raw/master/precompiled/org.openhab.binding.openocean-2.4.0-SNAPSHOT.jar

Good Luck :)

fruggy83 commented 5 years ago

Hi @Casshern81 (eagle eye!!! 👍 ),

thanks a lot for trying this binding with OH2.3. I was not sure if this works, but now we have a prove!

@eskorte: I hope Casshern81 answer works for you.

Good luck

Casshern81 commented 5 years ago

Hi Daniel (@fruggy83), yeah sometimes you don´t see the forest for the trees :D.

No problem. @eskorte´s problem kind of bothered me, because i could not explain it until i found it. Atleast my work was not in vain :)

eskorte commented 5 years ago

Oh my god, you are right, @Casshern81. A simple mistake with big impact :-D I'll start with a fresh flashed SD-Card and report back soon.

Casshern81 commented 5 years ago

Good luck :)

eskorte commented 5 years ago

It's working now.

Thank you very very much for your help @Casshern81! I am glad that it's working now and I can continue my voyage with openHAB! :-D

eskorte commented 5 years ago

PS: Not to forget: thank you @fruggy83 for the binding! :-)