Oh FFS, so freaking frustrating! Don’t know where to start, where to look, what to do…I see it in the MQTT explorer but not in hass… and there are SO MANY places where to look or where to change…
So another attempt…
I have:
When I connect D5 to GND I see in the console:
00:02:14 MQT: D1-01-Switch/cmnd/POWER = TOGGLE
00:02:14 MQT: D1-mini-01/stat/SWITCH1T = {"TRIG":"ON"}
00:02:17 MQT: D1-01-Switch/cmnd/POWER = TOGGLE
00:02:17 MQT: D1-mini-01/stat/SWITCH1T = {"TRIG":"ON"}
I see in the MQTT explorer that it is triggering “topics”.
But it is not at all outputting any in the entities not quick, not logbook, no output in nodered, nothing…
What can I do wrong? Is the topic (don’t even know what that is) in homeassistant correctly read for that switch?
I realize I must be very stupid or this must be very complex to understand. But i am really here to learn to get this going and understand why it is not working and want to have it up and running.
EDIT:
so when I study on the following:
according to that for my created ‘D1-mini-01D Switch1’ ( binary_sensor.d1_mini_01d_switch1
) it listens to D1-mini-01/stat/SWITCH1
“It” happens according to MQTT explorer in (at least):
D1-01-Switch/cmnd/POWER
and
D1-mini-01/stat/SWITCH1
But in D1-mini-01/stat/SWITCH1
hass doesn’t see it! How can that be!?
Stuff is arriving at D1-01-Switch/cmnd/POWER but not at D1-mini-01/stat/SWITCH1
Can you show the payload of homeassistant/binary_sensor_79AB1_SW_1/config ?
Please text, not a screenshot.
I have over 50 tasmota devices, but they all toggle a relay, no switches without relay.
It does seem you reveice messages :
00:02:14 MQT: D1-01-Switch/cmnd/POWER = TOGGLE
00:02:14 MQT: D1-mini-01/stat/SWITCH1T = {"TRIG":"ON"}
00:02:17 MQT: D1-01-Switch/cmnd/POWER = TOGGLE
00:02:17 MQT: D1-mini-01/stat/SWITCH1T = {"TRIG":"ON"}
name: D1-mini-01D Switch1
state_topic: D1-mini-01/stat/SWITCH1
availability_topic: D1-mini-01/tele/LWT
payload_available: Online
payload_not_available: Offline
value_template: '{{value_json.STATE}}'
force_update: true
payload_on: 'ON'
payload_off: 'OFF'
unique_id: 79A9B1_SW_1
device:
identifiers:
- 79A9B1
platform: mqtt
Yes I do receive messages but:
For my created ‘D1-mini-01D Switch1’ ( binary_sensor.d1_mini_01d_switch1
) it listens to
D1-mini-01/stat/SWITCH1
According to MQTT explorer I see thing happening (messages) in (at least):
D1-01-Switch/cmnd/POWER
and
D1-mini-01/stat/SWITCH1
But hass does not see D1-mini-01/stat/SWITCH1 doesn’t see it! How can that be!?
Stuff is arriving at D1-01-Switch/cmnd/POWER but not at D1-mini-01/stat/SWITCH1
What I also tried is to make a switch to test if it responds to the payload on that mqtt topic (not sure if this will work cause I am not exactly aware of what I am doing).
I made in configuration.yaml:
switch:
- platform: mqtt
command_topic: "D1-01-Switch/cmnd/POWER"
state_topic: "D1-01-Switch/cmnd/POWER"
name: "MQTT Test Switch"
payload_on: "TOGGLE"
payload_off: "TOGGLE"
state_on: "TOGGLE"
state_off: "TOGGLE"
Since I do see response here:
but nothing happens in logbook, node-red, lovelace… nothing…
I would really appreciate all the help I can get…
Ok, not sure what I did, but I did in tasmota console and now it works… but what did I do?
switchmode 14
switchtopic D1-01-Switch
So that did not what I wanted and I did
switchmode 1
then Of was on and on was of???
So I tried switchmode 2
that works but if I “switch on” (GND – D5 (GPIO14)) it turns on for 1 sec and then of… but according to:
https://tasmota.github.io/docs/Buttons-and-Switches/
it should:
SwitchMode 2
Set switch to inverted follow mode ( 0 = ON
, 1 = OFF
)
At the time when the circuit is closed, Tasmota will send OFF
and opening the circuit sends ON
.
Why is this all SO HARD?
Glad you got it working
Well… working… it’s doing something.
But any thoughts on why it quickly sends “on-off” in around 1 second to hass when I “hold” (hold: switch on - connect GND – D5 (GPIO14)).
I would expect it would stay on as long as I hold the button and off when I release it, but it doesn’t do that.
According to
https://tasmota.github.io/docs/Buttons-and-Switches/
and with below settings:
SwitchMode 2
Set switch to inverted follow mode ( 0 = ON
, 1 = OFF
)
it should:it should:it should: At the time when the circuit is closed, Tasmota will send OFF
and opening the circuit sends ON
.
But it thus doesn’t… any thoughts?
No one able to help out with this?