pepsifan92 / pcf8574control

Controlling the chip pcf8574 (Port expander) via I2C from Raspberry Pi from openHAB
2 stars 0 forks source link

openHAB 1.7.1 crashes on Startup #1

Open meifi opened 8 years ago

meifi commented 8 years ago

When I put the *.jar file in the openhab binding addon and restart the engine. openhab will crashes after start up the gui.

pepsifan92 commented 8 years ago

I can't confirm that and got no idea why this binding should have an effect to the GUI. But I want to mention, that there is no error correction, if the device isn't connected properly. You should be sure, that you can detect the chip with the correct I²C address in your console before you try to use it with this binding...

Sorry, I only use it since I've written it - there is no further development on this binding.

meifi commented 8 years ago

Ok, i'll try it soon. Which with version of openhab do you run the binding?

pepsifan92 commented 8 years ago

I am using openHAB v1.7.1

flaute commented 6 years ago

Did anybody try this binding with openHAB 2?

vskibav commented 6 years ago

@flaute I am trying from many, many hours with OH2.2... without any good results. After login to the openHAB console openhabian@openHABianPi:~$ ssh -p 8101 openhab@localhost You have to write "Yes" then pass is: habopen

after putting: openhab> bundle:list You will receive the working bundles. Good info about above you can find here:

https://community.openhab.org/t/help-controlling-the-chip-pcf8574-port-expander-via-i2c-from-raspberry-pi-from-openhab/36837/18

The discussion is still in progress and I was trying to start bundle with pcf8574.jar file on my OH2.2 but It is blocked. The Ric's solution is look as a good one but for this moment I do not understand how to implement on OH.

P.S.: The command: feature:install openhab-runtime-compat1x and feature:install openhab-transport-serial in the openHAB console do not help. More info here: https://docs.openhab.org/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distrqibution

I was trying to resolve the problem, but I have still the same problem: 215 │ Resolved │ 80 │ 1.0.0 │ openHAB PCF8574Control Binding Which means: "stopped". The "start" command is closing the console without results. More info how to work with bundles: https://docs.openhab.org/administration/bundles.html#startstop-bundles

I think that It is incompatible with OH 2.2 at the moment. Have to be checked by someone who know more how the bindings for OH 1.x works.

I found the another way, nice alternative: https://github.com/openhab/openhab2-addons/pull/1961 It is about using mcp23017 I2C buss 16 input/output port expander. I ordered one pc today and will test it. The jar file in version 2.2 is in the discussion. Please read the above linked subjects and you will not have any problem with *.jar file implementation in your OH.

From OH 2.2 side, the bundle is working. I tested it today. In OpenHAB Console i received status: 216 │ Active │ 80 │ 2.2.0.201707271800 │ mcp23017 Binding

Good knowlage base about I2C for Raspberry Pi3: https://www.abelectronics.co.uk/kb/article/17/io-pi-tutorial-1---the-blinking-led

Do not forget to:

  1. Enable I2C in the options in: sudo raspi-config
  2. Install pi4j http://pi4j.com/install.html5
  3. Add a gpio and i2c to the "openhab" group by:
    sudo adduser openhab gpio
    sudo adduser openhab i2c
flaute commented 6 years ago

I've coded a new binding for "horter" modules (https://www.horter-shop.de/). This binding is based on your work (pcf8574control). https://github.com/flaute/openhab2-addons/tree/master/addons/binding/org.openhab.binding.horter

It was working fine with OpenHAB 2.1. But after upgrading to OpenHAB 2.2 I can't get it working. The binding seems to be started and working, but the handle-method never gets called.

If anyone has a clue of what was changed from 2.1 to 2.2 that could affect these bindings please let us know.

pepsifan92 commented 6 years ago

Sorry, I'm not running OpenHAB 2 or been working on this binding. If anybody writes a similar binding for OpenHAB 2, I can add a Link in the readme.md...