I don’t know anything about Modbus, but isn’t “Modbus Data_relay_1_806” the label of the thing in your screen shots? I.e. you should do something like “Relay_1.sendCommand(1)”.
Also, the item seems to be of type number, mabe toggle only works with switch?
why are you using a number for a coil ? your item wich you want to send the command is ModbusDatarelay1806_ValueasNumber so that means
this Data_relay_1_806.sendCommand(1) becomens ModbusDatarelay1806_ValueasNumber.sendCommand(1)
It’s working. I can see if I will change a relay state in other software.
But now I want change a relay state in openhab. So I need a write on the register address 806 a value 0 or 1.
I tried via rule - sendCommand but it isn’t working.
That’s up to you. You’ll have to use UI widgets that work with numbers, too.
Okay, so you have now changed the type of Item named Relay_1. This change can be problematic, I suggest a re-boot of openHAB to make sure everyone thinks it is the same type. But look into this first as well …
Your data Thing has no write settings, it is a read-only Thing. You should be able to send numeric commands to the Item, but the Modbus binding will not do anything about them.
You’ll want to add write address, type, etc.
Can’t see what you are doing, not able to comment.
Of course nor, everything we guess here is based on what you tell us or show us. If you don’t show trhe write settings when you have a write problem, then we will guess that you have not set any.
Okay we can see a little more.
Are you sure you want a holding register type?
Are you sure your device wants FC6, not FC16 Modbus write command?
What do you get in your log when you attempt to command from a rule?
I don’t see how a toggle widget can do anything useful to your Number type Item.
So I was directy by device because it was realy strange.
Let me say, error was in second sw which I used for evaluation. Don’t know why, status wasn’t updated.
So last setup with switch is working, so I can manualy switch on and off
Now my second question is how to change switch status via rule ?