I would love to get this binding to work.
Totall new to Rpi and OpenHab pcf8574control
Fresh install RPi 3, all update run etc, i2c enabled and working.
2017-12-01 17:10:07.590 [ERROR] [org.openhab.binding.pcf8574control ] - FrameworkEvent ERROR - org.openhab.binding.pcf8574control
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.pcf8574control [181]
Unresolved requirement: Import-Package: org.openhab.core.binding
at org.eclipse.osgi.container.Module.start(Module.java:434)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
In karaf console i idid a “feature:install openhab-transport-serial” not sure why, red it some where,
How to use openHAB 1.x Add-ons that are not part of the distribution
While the openHAB distribution already contains many add-ons of openHAB 1, there are still quite some of them missing - please help testing them - if they are confirmed to be working, they can be included in the distribution. Test a not included add-on is very straight forward:
Start your runtime
Install the 1.x compatibility layer by running feature:install openhab-runtime-compat1x in the openHAB console
As with openHAB 1.x, simply take the jar file of your add-on and place it in the ${openhab.home}/addons folder.
Copy your personal openhab.cfg file to ${openhab.home}/conf/services/openhab.cfg.
If that’s the solution?
Then I only have todo;
feature:install openhab-runtime-compat1x in the openHAB console
Then take the jar file of your add-on and place it in the ${openhab.home}/addons folder.
I think i dont have to do anything whit openhab.cfg file?
2017-12-01 19:29:06.276 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at 'items/led' with an invalid status value 'ON'.
2017-12-01 19:29:07.085 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at 'items/led' with an invalid status value 'OFF'.
it is, most of the hardware is i2c based,
I am at this for for a week or so read trying.
for what i think now is that maybe OH is not my environment, mostly al of it is wireless.
any suggestions what i could look into next?
pimatic.org
maybe Pinmatic on a second pi OH om other Pi, Pinmatic isnt that good in DMX, and i would love to have DMX up and runing to
is there then a good way to communicate between them? or should i use a Aduino?
Hi,
My homenetwork is a i²c bus running all over the home. Mostly I use pcf8574 bidirectional ports. Nodes are installed at the places in need for controlling. This bus is controlled by some code written in python, running on PI3 side by side with OH2 and MQTT.
OH2 is talking to MQTT which on it’s turn talks to python, driving the i2c bus.
I took me a long time to get it working due to the wrong address.
Maybe this could help you;
i2cdetect -y 1 gives you a list of all addresses hooked up to the bus.
MQTT Binding need to be installed. I have done this with the paper UI in the binding tab; OH needs to publish message, so MQTT Actions is installed at the actions tab.
From that moment it is possible to send and receive mqtt messages with OH. mqtt has been developed to transfer data in a most effective way. See the net for additional info on MQTT.
Items data looks like this:
Switch gar "Garage" <garage> (Lights) {mqtt=">[hoco:home:command:ON:gar1],>[hoco:home:command:OFF:gar0],<[hoco:home:state:ON:garst1],<[hoco:home:state:OFF:garst0]"}
The gar0 and gar1 is collected and processed by the python program.
The garst0 and garst1 is the status comming from python.
The “>” sends a message; the “<” receives a message
Probably I will stay with the mqtt setup, as the pcf8574 is only one item part off the i²c circuits available. Python gives the possibility to use other i²c circuits, more complex units, such as volume and equalizer circuits and led/display controllers and many more…
Dear Rik,
Can you say something more about the communication rules in your method? How do you define the right pin of pcf8574 module with your method? Did the python code is your own specyfic one for your home system and the “transating” part of comunication with MQTT using?
Hi Marcin,
Do you mean the rules in OH or the protocol used between OH<==>mqtt<==> python?
A pcf8574 consist of a byte wide latch; by using a number between 0 and 255 it is possible to select one or more pins on the IC (some info http://www.ti.com/lit/ds/symlink/pcf8574.pdf)
all pins can be used as input or output pins. The here above pin gar0/gar1 is used as an output, the garst0/garst1 is used as input. By sending a command in OH it will set(ON) or reset(OFF) the pin. This is reflected on the input pin. OH reads the remote switch.
Off coarse this needs to be translated by the python program. How this is done can be seen in the python code. We will try to distillate the communication part, but need some time to prepare it and will post it here.