- Platform information:
- Hardware: RPI 3, Beckhoff EK1100, EL1008, EL2008
- OS: raspbean
- openHAB version: 2.5
- Issue of the topic:
Iam building a homeautomation with an RPI 3.
For digital IO´s i use
Beckhoff EK1100 as Ethercat Coupler
Beckhoff EL1008 as DI
Beckhoff EL2008 as DO
EthercatMaster is installed and working.
I need help to connect on DI to one DO with Openhab.
We have working (more or less) integration with Beckhoff devices through AMS/ADS: [co7io] Industrial integrations with Beckhoff ADS/Siemens S7
EtherCAT is also doable, however there is currently no existing library which could be utilized for that.
tanks for your link.
now i try a different way, and run in an other error.
I try to communicate throu shell scrips to my ethercat slaves.
But the exec binding is not working
i do it by the following steps:
install exec binding
create my script Test.sh
“halcmd setp.0.2.dout-2 1”
withlisted the script in /etc/openhab2/misc/exec.whitelist
but in the paper UI the switch is grey.
could someone help me
Can’t help much unless you trace what happens in logs. Take a look to
/var/log/openhab2 and see if you have any error there. If not try setting up log level to
org.openhab.addons.exec (as far I remember).
it was a permission error.
User “openhab” was not allowed to excecute sudo commands.
so with exec binding it is solved.
But i try to get it working with ADS.
mybee you can help me.
The ADS binding found my devices.
now i want to controll one Output.
can you tell me how to do that?
@Tecko - -openhab-beckhoff integration have certain semantics in order to reflect all configuration options required by PLC.
That’s why you need to follow discovery step by step or create elements manually with required options. The end result is like below:
co7io-plc4x-ads:ams, this is receiving AMS interface. You set openhab AmsNetId at this level as well as decide which IP address to use for AMS/ADS communication.
co7io-plc4x-ads:network, this level defines a AMS/ADS connection to Beckhoff device - it depends on parent element which specifies openhab AmsNetId for communication with PLC.
co7io-plc4x-ads:ads, this is an grouping structure where you can read specific PLC fields by defining channels.
This is very short introduction - in order to get any data from PLC you need to define all above elements and then add channels to
ads thing. Channels are defined in two formats -
0x<index>/0x<offset>:ads-type for hex notation) or
<symbol-name>:type. Symbol resolution is an experimental feature. I noticed that it did not work properly with some TwinCat 2 devices, so safest option is to use
index/offset notation. List of known ads types is available here: [co7io] Industrial integrations with Beckhoff ADS/Siemens S7, with a small note - that not all of them are tested and handling of these is subject of incoming updates. You should be safe with int/decimal variants and bit/boolean types.
In your screenshot for example I see that you have
Beckhoff ADS Device stuck in initializing phase. Please make sure it is linked to valid
network element which enables connection.
Not sure if checked our PDF manual which might be a help to get a working configuration.