Fatek Plc

Ok I fix that!
The problem was on fatekplc.cfg its need ro be like that:
fatekplc:plc2.connectionUri=udp://192.168.1.111?plcId=1
This problems dont show up on openhab.log so I really not understood where was the problem.
Ty very much guys I am really appreciate!:+1:t2:

Hi need your helps again!
I tried today to add the last floor to OpenHAB,
I succed to add the plc to OpenHAB but in this floor all the light are dimming, In this case each light has 2 virtual switch (m),
For exmaple:
X1------- M1 turns the light on
X2-------M2 turns the light off
With this situation I dont know how to creat in OpenHAB item with diffrent M to turn the light on and off.
How can I creat item with separate buttons to turn on and off the light?

help someone?

Hi,
Can You describe what you want to achieve, and what type of lights you have?
If lights are dimmable, You need a dimmer in OH not switch.
If You want turn ON lights with X1 and OFF with X2 which sounds a bit strange. You need a rule, but to write it i must see your Lader.

In this plc all the lights are dimmable, I saw the lader and dont understand what the guy who built the electric in my house did
But I can understand from the plc that the coils (Y) is always on.
I want to add dimmable lights to my openhab.
I attached picture from my lader, X5 turn the light on, X4 turn the light off.
Ty for your help!

Hi.
It’s only part of the lader. How the dimmer is connected to PLC only with Y37? when X5 increase the light and X4 decrease. Please read this.

I am really search on forums but find nothing. There are not many posts with Fatek plc.
This is just example from the lader, If I understand how to do that with 1 light i will do it for all.
I succced to turn the light on and off with simple rule but dont succes to make slider that increase/decrease and light.

I am giving you this link not to search this forum, but to learn how to ask a good question. It’s like Rossko57 says “It’s like pulling teeth”. Now I can’t help you because I don’t know anything about your configuration. So I need to know:
What dimmers do you have or how do they work, or how X4 and X5 works now.
How dimmers are connected to the PLC or a pice of the Lader code responsible for controlling the dimmer.
I do not think that one dimmer is connected to only one PLC output.

Ok, sorry I try to be more specific,
The model of the plc is FBs-60MA, In this plc I have 13 light dimming.
The model of the dimmer is FBs-4DA.
As I said the guy who built all of my electric panel are not available more and I cant ask him what he did.
The things that I know is that dimming value is 1 to 800, 1= off and 800= full power.
The picture that I sent is my bedroom, X5,M166 increase the light and X4,M168 decrease the light.
I attched more picture. Please tell me if you need more infromation amd sorry again It’s just because of my lack of knowledge.
Ty.

![687|270x500]

Now everything is clear :slight_smile:
I’m runing out of time, will look later at this. Meanwhile you can add R3817 as a dimmer item to OH with range 0-800 and try :slight_smile: if it not help, i will need a Lader with dimmer code.

Hi,
I write this on Items:

Dimmer myDimmer "My Dimmer d2 [%.1f]"  { fatekplc="plc3:R2917" }

And this on sitemap:

            Switch item=myDimmer
            Slider item=myDimmer
        }

But when I turn the light on with the slider/switch the light is flashing.
I guess its becuase I dont write the values 1-800, but where I need to write them?
I try to find some guides but found just for RGB light.

Hi,
You writing to register 0-100. you can multiply it by 8

plcName:REG:[step=value][:factor=factorValue]

But the light is flashing because the value from OH has been overwritten by the PLC Lader.

I am not understand where to write that:
“plcName:REG:[step=value][:factor=factorValue]”.

So how can I fix that?

It’ from

plcName:REG:[step=value][:factor=factorValue]
Dimmer myDimmer "My Dimmer d2"  { fatekplc="plc3:R2917:factor=8" }

But this will not help, as I wrote earlier, Lader needs to be fixed.

Unfortunately, there is not as many examples of Fatek PLC usage for Smart Home appliances in comparison to other PLCs like Wago, where they have even available dedicated libraries ready to use. Unless you are good in ladder, simple things will be difficult. It wolud be great if we would have a kind of database of ladder programs that would implement basic smart activities like dimmers, roller shutters, lights, scenes etc. ready to use in conjuction with OpenHAB.
BTW. I currently rather recommend to use modbus binding instead of fatek binding as it works in my opinion currently much better (in opposite to the previous generation of modbus binding).

What I need to fix in my lader and how can I do it?
Lader

Maybe modbus binding will be more easy for me, but as I said I have 4 fatek plc and I done with 3 of them, everything works great on OpenHAB.

Hi,

It wolud be great if we would have a kind of database of ladder programs that would implement basic smart activities like dimmers, roller shutters, lights, scenes etc. ready to use in conjuction with OpenHAB.

But if you do not know the ladder, this database will be useless, the ladder is specific, sometimes it is easier to write the code from scratch than to adopt it.

BTW. I currently rather recommend to use modbus binding instead of fatek binding as it works in my opinion currently much better (in opposite to the previous generation of modbus binding).

Why? Modbus binding is only TCP, Fatek binding works on UDP wich is much faster and does not load the local network so much, opposition to TCP.

Hi,
You must convert the value 1-800 to the percentage of 1-100%, then control register with 1-100% from OH.

All you can find here You can addopt N243 to N262 its shades control. There is also a dimmer program there, but it works a bit differently because it’s Modbus dimmer.

Maybe modbus binding will be more easy for me, but as I said I have 4 fatek plc and I done with 3 of them, everything works great on OpenHAB.

Modbus works the some like Fatek you also can read/write register, coils, contacts etc.

I only say this from practical experience. Certainly UDP is faster, however the difference is, I believe, in the current implementation of the bindings. I have hundreds of markers and outputs and when I was using fatek binding I have had unacceptable lags. It just works better with current modbus binding.

Hundreds? in a house of about 200m2 I have never exceeded a 100, now i have about 80 Fatek items there are markers, registers, contacts and coils. With 100ms refres I didn’t notice any delays.