Good evening. There was the following task. I wanted to switch to a new version 2.3 or 2.4 for a long time (since only it already has support for the Modbus2 version). But I came up with the following problem, I was not a professional in this topic, and in the Modbus2 version the approach changed and I don’t understand how to transfer my project. If you can help me, I will be very grateful to you.
New version
http://i68.tinypic.com/2cq0kds.jpg
http://i67.tinypic.com/2czptc.png
Old version
demo.items
Switch S1 "light-1" (ALL) {modbus="slave1:0"}
Switch S2 "light-2" (ALL) {modbus="slave1:1"}
Switch S3 "light-3" (ALL) {modbus="slave1:2"}
Switch S4 "light-4" (ALL) {modbus="slave1:3"}
Switch S5 "light-5" (ALL) {modbus="slave1:4"}
Switch S6 "light-6" (ALL) {modbus="slave1:5"}
Switch S7 "light-7" (ALL) {modbus="slave1:6"}
Switch S8 "light-8" (ALL) {modbus="slave1:7"}
Switch S9 "light-9" (ALL) {modbus="slave1:8"}
Switch S10 "light-10" (ALL) {modbus="slave1:9"}
Switch S11 "light-11" (ALL) {modbus="slave1:10"}
Switch S12 "light-12" (ALL) {modbus="slave1:11"}
Switch S13 "light-13" (ALL) {modbus="slave1:12"}
Switch S14 "light-14" (ALL) {modbus="slave1:13"}
Switch S15 "light-15" (ALL) {modbus="slave1:14"}
Switch S16 "light-16" (ALL) {modbus="slave1:15"}
Switch S17 "light-17" (ALL) {modbus="slave1:16"}
Switch S18 "light-18" (ALL) {modbus="slave1:17"}
Switch S19 "light-19" (ALL) {modbus="slave1:18"}
Switch S20 "light-20" (ALL) {modbus="slave1:19"}
Switch S111 "Turn off all"
Switch S777 "Turn off"
demo.rules
rule "KitOff"
when
Item S111 changed from OFF to ON or
then
sendCommand(S1, OFF)
sendCommand(S2, OFF)
sendCommand(S3, OFF)
sendCommand(S111, OFF)
end
rule "AllOff"
when
Item S777 changed from OFF to ON or
then
sendCommand(S1, OFF)
sendCommand(S2, OFF)
sendCommand(S3, OFF)
sendCommand(S4, OFF)
sendCommand(S5, OFF)
sendCommand(S6, OFF)
sendCommand(S7, OFF)
sendCommand(S8, OFF)
sendCommand(S9, OFF)
sendCommand(S10, OFF)
sendCommand(S11, OFF)
sendCommand(S12, OFF)
sendCommand(S13, OFF)
sendCommand(S14, OFF)
sendCommand(S15, OFF)
sendCommand(S16, OFF)
sendCommand(S17, OFF)
sendCommand(S18, OFF)
sendCommand(S19, OFF)
sendCommand(S20, OFF)
sendCommand(S777, OFF)
end
demo.sitemaps
sitemap demo label="Op2"
{
Frame label="light" {
Text label="Kitchen" icon="Household-Kitchen-icon"{
Switch item=S1
Switch item=S2
Switch item=S3
Switch item=S111
}
Text label="Tv" icon="tv" {
Switch item=S7
Switch item=S8
Switch item=S4
Switch item=S5
Switch item=S6
}
Text label="Baby" icon="Baby_Pacifier" {
Switch item=S10
Switch item=S9
Switch item=S11
}
Text label="bed" icon="bed" {
Switch item=S12
Switch item=S13
Switch item=S14
}
Text label="batht" icon="bathtub5-1" {
Switch item=S16
Switch item=S15
}
Text label="sh" icon="sh-icon" {
Switch item=S18
Switch item=S17
}
Text label="Door" icon="Door-icon" {
Switch item=S19
Switch item=S20
Switch item=S777
}
}
Modbus Binding
modbus:tcp.slave1.connection=10.1.1.184
modbus:tcp.slave1.length=21
modbus:slave1.valuetype=bit
modbus:tcp.slave1.type=coil
Such settings, at least an example for a single switch. The man who helped me unfortunately disappeared.