Strange String behaviour on 'ON' / 'OFF'

I’ve had it running in my setup for a couple of days and have done a couple of tests and everything seems to be working well. So far I’ve just used my default config which has some simple subscribers bound to contacts, a publisher which posts a word to a topic to request the current readings of my sensors (otherwise only changes are published), and a switch that subscribes to a LWT to keep up with the alive/dead status of my scripts.

MQTT Items:

Contact N_D_Front                        "Front Door [MAP(]"             <frontdoor>  (gDoorSensors, gRemindDoorSensors, gAlarmSensors, gHydraSensors)    { mqtt="<[mosquitto:entry_sensors/main/front_door:state:default]" }
Contact N_D_Back                         "Back Door [MAP(]"              <frontdoor>  (gDoorSensors, gRemindDoorSensors, gAlarmSensors, gHydraSensors)    { mqtt="<[mosquitto:entry_sensors/main/back_door:state:default]" }
Contact N_D_Garage                       "Garage Door [MAP(]"            <door>               (gDoorSensors, gRemindDoorSensors, gAlarmSensors, gHydraSensors)    { mqtt="<[mosquitto:entry_sensors/main/garage_door:state:default]" }
Contact N_D_GarageDoor1              "Garage Door 1 [MAP(]"          <garagedoor> (gDoorSensors, gRemindDoorSensors, gGarageSensors) { mqtt="<[mosquitto:entry_sensors/main/garage/door1:state:default]" }
Contact N_D_GarageDoor2              "Garage Door 2 [MAP(]"          <garagedoor> (gDoorSensors, gRemindDoorSensors, gGarageSensors) { mqtt="<[mosquitto:entry_sensors/main/garage/door2:state:default]" }

Switch   S_V_RichChimeraBT   <bluetooth> (gRichPresent, gPresent, gChimeraSensors) { mqtt="<[mosquitto:presence_sensors/bluetooth/chimeraRich:state:default]" }
Switch   S_V_RichGarageaBT   <bluetooth> (gRichPresent, gPresent, gGarageSensors)  { mqtt="<[mosquitto:presence_sensors/bluetooth/garageRich:state:default]" }
Switch   S_V_RichHydraBT   <bluetooth> (gRichPresent, gPresent, gHydraSensors)     { mqtt="<[mosquitto:presence_sensors/bluetooth/hydraRich:state:default]" }

Switch  S_V_WifeChimeraBT   <bluetooth> (gWifePresent, gPresent, gChimeraSensors)  { mqtt="<[mosquitto:presence_sensors/bluetooth/chimeraWife:state:default]" }
Switch  S_V_WifeGarageBT   <bluetooth> (gWifePresent, gPresent, gGarageSensors)    { mqtt="<[mosquitto:presence_sensors/bluetooth/garageWife:state:default]" }
Switch  S_V_WifeHydraBT   <bluetooth> (gWifePresent, gPresent, gHydraSensors)      { mqtt="<[mosquitto:presence_sensors/bluetooth/hydraWife:state:default]" }

Switch N_C_Garage_mqttReporter "Garage Controller MQTT Reporting Service [%s]" <network> (gRemoteSensors, gGarageNet) { mqtt="<[mosquitto:status/sensor-reporters:command:OFF:garage mqttReporter is dead.*]" }
Switch N_C_Hydra_mqttReporter  "Alarm Controller MQTT Reporting Service [%s]"  <network> (gRemoteSensors, gAlarmNet) { mqtt="<[mosquitto:status/sensor-reporters:command:OFF:hydra mqttReporter is dead.*]" }
Switch N_C_Chimera_mqttReporter  "Chimera MQTT Reporting Service [%s]"              <network> (gRemoteSensors) { mqtt="<[mosquitto:status/sensor-reporters:command:OFF:.*chimera mqttReporter is dead.*]" }

Thank you for testing it, Rich. Since you are subscribing to topics that only publish “ON”, “OFF”, “OPEN”, and “CLOSED” (correct me if I’m wrong), then the only thing you could do differently from the released bundle vs. my PR is use String items where you are using Contact and Switch items, which wouldn’t really help you. :smile:

Since my testing of both the items and message bus bindings has shown the same “no issues” as you have seen, I’m inclined to merge the PR so it will be part of 1.8. I will leave it until this weekend.

Thanks again for helping, John

That is correct, mostly. It seemed easier at the time to do that and avoid any transformations.

However, the lat three switches do have a transform on the LWT which I use to determine which client died. But no String Items.

It seems pretty stable to me. I see no difference in execution or performance for my setup at least.

1 Like