FlyingDiver wrote:Your trigger is wrong. You're matching on any message from the Tasmota, but you need a trigger (and message type) specifically for the two topics that have data you want, which are:
Tasmota/Test-Room/tele/STATE
Tasmota/Test-Room/tele/SENSOR
You're getting errors because the trigger is matching on the on/off command you're sending TO the device (which the broker is echoing back to Indigo).
You can see in the log that when you sent the OFF command, the plugin did update the state to off (False).
I think I have sorted all that and now find after further digging
I have two triggers set for when the plug turns on or off
Trigger 1 on Tasmota/Test-Room/stat/Any
"Any" "of the following rules are true"
"If device" "Tasmota-Plug-1" "On/Off State" "is on"
Then
Write to Log
###### ON ###### ON ###### ON ###### ON ###### ON #######
and
Trigger 2 on Tasmota/Test-Room/stat/Any
"Any" "of the following rules are true"
"If device" "Tasmota-Plug-1" "On/Off State" "is off"
Then
Write to Log
###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
I can never get the On to trigger.
I added a couple of indigo.server.log lines in the shims code and found that pressing either on or off always triggered OFF and many of the Trigger/Actions clicks did not get MQTT Shims response.
When it did turn On eventually the updateStateImageOnServer was still False.
The ‘custom states Power=‘ mostly mimicked the real state but not always, but clicking on or off did turn the plug on and off 100% of the time.
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
MQTT Shims value = self.recurseDict(state_key, state_data) = OFF
MQTT Shims updateStateImageOnServer = False
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
MQTT Shims value = self.recurseDict(state_key, state_data) = ON
MQTT Shims updateStateImageOnServer = False
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
MQTT Shims value = self.recurseDict(state_key, state_data) = ON
MQTT Shims updateStateImageOnServer = False
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
Trigger Tasmota/Test-Room/stat off
Action Collection ###### OFF ###### OFF ###### OFF ###### OFF ###### OFF #######
26 Mar 2021 at 16:27:14
MQTT Shims
message_type: '##tasmota-stat##'
props:
SupportsOnState: true
action_template: Tasmota/Test-Room/cmnd/POWER
brightness_scale: '100'
dimmer_action_payload: '{''turn'': ''on'', ''brightness'': {{brightness}} }'
off_action_payload: 'off'
on_action_payload: 'on'
shimSensorPrecision: '2'
shimSensorSubtype: Power
state_dict_payload_key: .
state_location: payload
state_location_payload_key: POWER
state_location_payload_type: json
state_location_topic_field: '0'
state_on_value: '1'
toggle_action_payload: toggle
uid_location: topic
uid_location_topic_field: '1'
trigger:
match_list: '["Match: Tasmota", "Match: Test-Room", "Match: stat", "Any: "]'
queueMessage: true
type: shimRelay