Thanks
Have no duplicate rule names.
rule "433: identify sensors"
rule "433 rules started"
rule "433: Shed_NLO_PIR timer"
rule "Allow hot water system heating for 2h after SOC reached 100 AND Irrigation tank is full"
rule "Annual Selectronic data resets"
rule "Astro rules started"
rule "Auto-shading Roller Shutter Living West"
rule "Auto-Start Irrigation1"
rule "Battery power last updated"
rule "Bootstrap for init"
rule "Bootstrap in watersystems"
rule "Bore Pump run time today reset"
rule "Bore Pump started"
rule "Bore Pump stopped"
rule "Calculate solar PV total"
rule "check if pump runs too long after irrigation stopped"
rule "Check Internet Speed"
rule "Compute outdoor humidex"
rule "Convert UTC timestamp to local date-time"
rule "correct state for bedroom window to close"
rule "correct state for bedroom window to open"
rule "correct state for mediaroom external door to closed"
rule "correct state for mediaroom external door to open"
rule "Disable all grid charge schedules"
rule "Do not allow Irrigation1"
rule "Door bell gate OFF"
rule "Fritzbox: Incoming call, get number and resolve name from phonebook"
rule "Frtizbox rules started"
rule "Garbage bin collection today"
rule "Garbage bin collection today cancel"
rule "Garbage bin collection tomorrow"
rule "Geo Location Helga"
rule "Geo Location Max"
rule "GPS_Base_LastReboot and update"
rule "GPS_Base operational set values"
rule "GPS Base station started"
rule "GPS location system started"
rule "Grid-charge if required"
rule "Grid profit and loss"
rule "Heated Blanket Helga last ON"
rule "Heated Blankets Helga OFF"
rule "Heated Blankets Helga ON"
rule "Heated Blankets OFF"
rule "Heated Blankets ON"
rule "House_TriS: last reboot and update"
rule "Irrigation1 enabled"
rule "Irrigation1: Switches Auto and Now off"
rule "Irrigation1 system started"
rule "Irrigation1 valve cascade ON"
rule "Irrigation2 system started"
rule "Irrigation tank filled up"
rule "Irrigation tank update not received"
rule "Irrigation valves OFF"
rule "Last time speedtest was run"
rule "lower all blinds"
rule "MainGate: last reboot and update"
rule "MainGate rules started"
rule "Midnight cron resets"
rule "Modbus Last Reboot"
rule "Modbus started"
rule "NLO KDL door standard shade position"
rule "NLO KDL window standard shade position"
rule "Notify of cell under voltage"
rule "Notify of log reader messages"
rule "Other rules started"
rule "OutsideShell Notifications"
rule "OutsideShell updated"
rule "Post last date of Internet going down"
rule "PumpStation1_LastReboot and update"
rule "PumpStation1 reset volumes"
rule "PumpStation2 add up volumes"
rule "PumpStation2 check actual number of valves recorded"
rule "PumpStation2 force active valve based on current time"
rule "PumpStation2_LastReboot and update"
rule "PumpStation2 reset and update values"
rule "PumpStation2 reset some values before session start"
rule "PumpStation2 update current valve and count"
rule "PumpStation2 update flow and volume"
rule "PumpStation2 update last ON time for valve and irrigation"
rule "Rainfall prior to today"
rule "raise all blinds"
rule "reset AM/PM counters"
rule "Reset blnEmailLock_CellV"
rule "Reset errMsgCount to zero"
rule "reset flag if SOC reached 100 percent"
rule "Reset Internet down"
rule "reset items in case they were triggered and need resetting"
rule "RF433TX system started"
rule "rPiAutomation memory too low alert"
rule "RTL433 data received"
rule "Set Light_House_Master_Bed_North value"
rule "Shed_RC41_LastReboot and update"
rule "Shed rules starting"
rule "SLO bedroom window standard shade position"
rule "SLO Media room door standard shade position"
rule "SLO window blind non-astro time ON"
rule "Solar hybrid schedule 1"
rule "Solar hybrid schedule 2"
rule "Solar hybrid schedule 3"
rule "Solar hybrid schedule 4"
rule "Solar hybrid schedule 5"
rule "SPPRO-BMS system started"
rule "SP PRO GO: Grid Support"
rule "SP PRO GO: Manual grid support OFF"
rule "SP PRO GO: Manual grid support ON"
rule "SP PRO GO: reduce charge rate by 1% every 12 minutes"
rule "SP PRO GO: start grid support at 1500 if SOC less than 90"
rule "Start Allow refilling of bore water tanks"
rule "Start Irrigation1"
rule "start timer for HWS boost if required"
rule "Stop Allow refilling of bore water tanks"
rule "Stop boosting HWS"
rule "Stop Irrigation1"
rule "System started House sensors"
rule "System started, make sure everything is off"
rule "System started, restart the cascade"
rule "System started test rules"
rule "Tesla rules started"
rule "test start timer for HWS boost if required"
rule "test Stop boosting HWS"
rule "TX433: last reboot and update"
rule "Update Bore Pump run time"
rule "Update DarkSky temperature min/max"
rule "Update last time air pump was ON in irrigation tank controller"
rule "Update last time door bell was rung"
rule "Update last time main gate closed"
rule "Update last time the bore pump updated"
rule "Update last time the house bore water tank updated"
rule "Update last time The Hub updated"
rule "Update last update datum for DarkSky weather"
rule "Update night state"
rule "Update rain last 24H"
rule "Update SOC Level max / min values"
rule "Update Tank Irrigation Level max / min values"
rule "Update when HWS was last on"
rule "Weather sensor rules starting"
rule "Zeva BMS started"
rule "Zeva Cell sets values"
rule "Zeva Current update"
rule "Zeva Last Reboot"
rule "Zeva Operational set values"
rule "Zeva update min max"
However, I do not know if rule names have a character limitation, cannot start with a number or cannot have colon in it.
I did watch the log and it runs the rule. Had initially a log statement in if
and else
(before simplifying it to the end of it.
And added the rule in a file of its own. It does not publish either.
2022-10-09 08:10:00.721 [INFO ] [.smarthome.model.script.Modbus.03.02] - set solar hybrid 1.: ON
2022-10-09 08:10:06.842 [INFO ] [.smarthome.model.script.Modbus.03.02] - set solar hybrid 1.: OFF
2022-10-09 08:21:19.408 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'test.rules'
2022-10-09 08:21:27.164 [INFO ] [arthome.model.script.testRules.00.00] - System start or rule file reload for testRules.
2022-10-09 08:21:45.163 [INFO ] [arthome.model.script.testRules.01.01] - set solar hybrid 1.: ON
2022-10-09 08:21:45.167 [INFO ] [.smarthome.model.script.Modbus.03.02] - set solar hybrid 1.: ON
2022-10-09 08:21:51.336 [INFO ] [arthome.model.script.testRules.01.01] - set solar hybrid 1.: OFF
2022-10-09 08:21:51.336 [INFO ] [.smarthome.model.script.Modbus.03.02] - set solar hybrid 1.: OFF
The last lines show that the original and test rules get triggered.
Here the test rule:
rule "Solar hybrid schedule 1 test"
when
Item spm_Solar_Hybrid_Control_1 changed
then
if (spm_Solar_Hybrid_Control_1.state == ON)
{
publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,1")
}
else
{
publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,0")
}
logInfo(logPrefix + "01.01", "set solar hybrid 1.: {}", spm_Solar_Hybrid_Control_1.state)
end
openhab> bundle:list -s | grep -i mqtt
230 │ Active │ 80 │ 1.14.0 │ org.openhab.binding.mqtt
237 │ Active │ 80 │ 1.14.0 │ org.openhab.io.transport.mqtt
255 │ Active │ 80 │ 1.14.0 │ org.openhab.action.mqtt
Also, all rules are owned by openhab:
-rw-rw-rw- 1 openhab openhab 3773 May 7 17:22 astro.rules
-rw-rw-rw- 1 openhab openhab 8384 Jan 18 2022 bms_zeva.rules
-rw-rw-rw- 1 openhab openhab 5058 Jan 18 2022 fritzbox.rules
-rw-rw-rw- 1 openhab openhab 15342 Mar 30 2022 geoLocation.rules
-rw-rw-rw- 1 openhab openhab 2829 Apr 11 19:30 gps.rules
-rw-rw-rw- 1 openhab openhab 1872 Jan 18 2022 house.rules
-rw-rw-rw- 1 openhab openhab 7309 Apr 23 08:55 init.rules
-rw-rw-rw- 1 openhab openhab 32066 Jan 3 2022 irrigation1.rules
-rw-rw-rw- 1 openhab openhab 13487 Jan 18 2022 irrigation2.rules
-rw-rw-rw- 1 openhab openhab 3072 Jan 18 2022 maingate.rules
-rw-rw-rw- 1 openhab openhab 7723 Jan 18 2022 max01.rules
-rw-rw-rw- 1 openhab openhab 5054 Jan 18 2022 other.rules
-rw-rw-rw- 1 openhab openhab 4824 May 1 08:55 rf433tx.rules
-rw-rw-rw- 1 openhab openhab 11701 Sep 25 16:21 sensor433.rules
-rw-rw-rw- 1 openhab openhab 4606 Mar 26 2022 shed.rules
-rw-rw-rw- 1 openhab openhab 23955 Oct 9 07:52 sppro_bms.rules
-rw-rw-rw- 1 openhab openhab 11413 Oct 8 21:34 sppro_modbus.rules
-rw-rw-rw- 1 openhab openhab 2097 Jan 18 2022 tesla.rules
-rw-rw-rw- 1 openhab openhab 226 Jan 18 2022 test.rules
-rw-rw-rw- 1 openhab openhab 15251 Oct 9 07:02 watersystem.rules
-rw-rw-rw- 1 openhab openhab 31123 Oct 9 07:00 weather.rules
All publish rules work, except for those in the sppro_modbus.rules
file.
astro.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "32")
astro.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "33")
astro.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "33")
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Valve", "0000")
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Volume2", "99")
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Command", "resetMeter")
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Meter", "0")
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Valve", valveMessageOn)
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Valve", finalValveMessageOff)
irrigation1.rules: publish("mymosquitto", mqttTopicRoot + "Flow" + valveNumber, valveFlow.toString)
irrigation1.rules: publish("mymosquitto", mqttTopicRoot + "Volume" + valveNumber, valveVolume.toString)
irrigation1.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation1/Valve", "0000")
irrigation2.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation2/Command", "resetMeter")
irrigation2.rules: publish("mymosquitto", "ArgyleCourt/Property/PumpStation2/Command", "resetMeter")
maingate.rules: publish("mymosquitto", "ArgyleCourt/Shed/RC41/Relay2", "ON")
maingate.rules: publish("mymosquitto", "ArgyleCourt/Shed/RC41/Relay2", "OFF")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "12")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "13")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "13")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "22")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "23")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "23")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "32")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "33")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "33")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "42")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "43")
rf433tx.rules: publish("mymosquitto", "ArgyleCourt/Shed/RF433TX/Command", "43")
shed.rules: publish("mymosquitto", "ArgyleCourt/Shed/Master/Blanket1/Command", BlanketMessage)
shed.rules: publish("mymosquitto", "ArgyleCourt/Shed/Master/Blanket1/Command", "0")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8052,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8053,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8054,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8055,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", modbus_message)
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,0")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8052,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8052,0,0")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8053,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8053,0,0")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8054,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8054,0,0")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8055,0,1")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8055,0,0")
sppro_modbus.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", modbus_message)
test.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,1")
test.rules: publish("mymosquitto", "ArgyleCourt/Shed/Modbus/Data/Command", "8051,0,0")
I thought the underscore in the file name could be a culprit, but the same rule in test.rules, publish does not execute either.
I had DEBUG and TRACE enabled, but no entry was recorded during executing the rule.
openhab> log:set DEBUG org.openhab.binding.mqtt
openhab> log:set TRACE org.openhab.binding.mqtt
openhab> log:set INFO org.openhab.binding.mqtt
I think we are at a dead end, which is usually addressed by “upgrade to OHv3”.