I have multiple modbus items in my openhab configuration. Reading works fine on all of them but when i send data it does not send it to IP gateway. Even on wireshark there is no modbus send data.
Item
Number operating_mode_preselection "Operating mode preselection" {modbus="termostat1_holding:0"}
So if i write to this item with Rest API i get status 202 which means that data is accepted and item value actually changes but nothing happens on wireshark or modbus thermostat.
Are you sure that read and write is in the same holding register ?
what is the valuetype? docs
Did you enable verbose logging ?
Check this tutorial for writing data MBlogic helped me a lot to understand my Modbus setup. Mb-Probe
I’m using Modbus Poll instead of Mb-Probe but i’ll check it out.
Well the dat adoes not even leave openhab. Item changes but openhab does not send any data over ethernet.
Here is some code where everything was working just fine few months ago and now it’s not working ok.
// Soba 1
Number trenutna_temperatura "Trenutna temperatura [%.1f °C]" <temperature> {modbus="<[termostat1_input:0:transformation=JS(divide10.js)]"}
Number temp_act "Zeljena temperatura [%.1f °C]" <temperature> (soba1) {modbus=">[termostat1_holding:0:transformation=JS(multiply10.js)], >[termostat1_holding:0:trigger=UP, transformation=1], >[termostat1_holding:0:trigger=DOWN, transformation=-1], <[termostat1_holding:0:transformation=JS(divide10.js)]"}
Number heatcool "Gretje/Hlajenje" {modbus="termostat1_holding:1"}
Number hitrost_ventilatorja "Hitrost ventilatorja [%d]" <signal> {modbus="termostat1_holding:2"}
Number hitrost_ventilatorja "Hitrost ventilatorja [%d]" <signal> {modbus="termostat1_holding:2"}
Number trenutna_hitrost_ventilatorja "Trenutna hitrost [%d Hitrost]" <signal> {modbus="termostat1_input:1"}
Number termostat1_onoff "Vklop/Izklop" {modbus="termostat1_coil:0"}
Number termostat1_status_okna "Okno [%d]" <window> {modbus="termostat1_discrete:0"}
String termostat1_status_okna_p "Okno [%s]" <window>
Number termostat1_prisotnost "Prisotnost. [%d]" {modbus="termostat1_discrete:2"}
String termostat1_prisotnost_p "Prisotnost. [%s]"
I’m normally recieving data but i cannot send anything. When i send something using built-in REST API item value changes but nothing goes over the ethernet.
I still have this problem and i’m sure that my code is written in right way because it was working ok one one of my previous projects.
So again i have a thermostat connected over Modbus TCP/IP protocol connected to Moxa TCP/IP gateway.
I can easily read from specific modbus address but i cannot write into it.
Same cofiguration was working three months ago and now it’s not working. I even copied modbus config file from old project and alo items.
Items
Number temp_set "Temperature Setpoint [%.1f]" (ALL) {modbus=">[termostat1_holding:0:transformation=JS(multiply10.js)], <[termostat1_holding:0:transformation=JS(divide10.js)]"}
I was also watching my network connection with wireshark and all i can sse are modbus read packets so openhab does not even send any write requests.