Nothong prevents you from writing new version of binding.
If i was developer i could. Applications are not only for developers.But mainly for normal users, also opensource
@marcin_st I could do basics somewhere in April. I just need to buy myself a fatek plc for tests. I need most basic setup which will serve development (ethernet / rs232 / rs485) and allow to validate various register kinds available to programmer. Any advices? I will pay myself for hardware, but then you need to give me a plc program and assist me in getting it working.
Hello Łukasz,
Many thanks. I have fatek (central unit with 3 extension units) about 70 inputs and 70 outputs - so my program will not be usable for you. But i can write simple one with few rules working only on central unit. So you could verify main registers (X - inuts, Y - outputs, T - timers).
I dont have Ethernet extension. I am connecting with openhab via USB cable delivered to configure PLC.
Maybe usefull info - in previous binging jfatek library was used.
Hi Łukasz, Fatek FBs-20 with Fatek FBs-CM55E it’s rs485 and Ethernet expansion module or Fatek FBs-CBEH it’s Ethernet expansion board will be ok for test. When you will have PLC let me know which model you have i will write lader for testing X,Y registers and so on, i can help you with work from Fatek side.
Hello Łukasz, did you manage to start? Do you need any help?
I did manage to get things started. I received PLC from Jiri (FBs) and test program from @Alien. I got it up and running and did some tests with jfatek as well as discovery of fatek plc/ethernet modules.
I’ll be making more progress on binding itself. I wish first to complete verification of jfatek and mapping of values to/from plc to avoid miss-implementation of openHAB side. Hopefully next weekend (6-7.05) I’ll have some stuff to deploy.
Cheers,
Łuaksz
Great info. Thank you.
Hello,
I am working on binding (sorry for time skew!), and got basic infrastructure in. As I go over further steps I also fall into some questions. One of them is how you connect your PLCs and if you have more than one.
Looking at Fatek I see that connection parameters in jfatek (Sławek’s library) have a plcId parameter which remains static for entire connection. While it is not a problem for TCP connections (I suppose!) I have doubts if its going to work with serial connections. In such case one line can be connected to multiple PLCs, each having its own station number.
Can you please share your use cases which include more than one PLC using serial connection? Also, if you could outline how you managed it so far with openhab 1.x binding or modbus, it would help me with modelling of bridge/thing relations.
Best,
Łukasz
Hello
I have connection through USB (serial port). But i have only one PLC (one main unit with 3 extension units).
Maybe Author of original binding could answer this questions.
I was thinking about this:
there is config file for fatek binding:
fatekplc.cfg
i have this:
refresh=1000
fatek1.connectionUri=serial:///dev/ttyUSB_fatek?plcId=1
then i add items:
Switch Fatek_Y_10 {fatekplc=“fatek1:Y0010”}
so if you have two PLCs there should be no problem as they have separate serial ports, separate config lines and then separate items based on this
I believe plcId=1 is the same as station number for TCP connection, indicator of specific PLC unit. Hence it should work with serial connection similarly to TCP.
Hi Łukasz, You can omit station ID in TCP or UDP it’s important in serial connection. In more then one PLC scenario one PLC is master and rest is slave so we will read only one PLC, unless you have more then one serial port so every PLC is independent as @marcin_st mentioned. Furthermore more then one PLC in home automation is not good idea, it’s like two OpenHab. But this is only my point of view
I’ve already found a way to make a single TCP/UDP/serial connection with dynamic plc id/station number thanks to java reflection api. While it seemed redundant in first run I found a justification. There is a way to discover IP address of Fatek PLC through UDP broadcast. Sadly UDP answer does not contain station number thus I would have to make a whole bunch of TCP connections just to iterate through available identifiers to find a working jfatek connection string.
I am cleaning up the UDP code I made while experimenting. More changes to follow.