bachoo786
(Bachoo786)
February 28, 2023, 2:15pm
1
Hi there
I hope someone can help me as this is driving me mad.
I have a sonoff rf bridge which I managed to install tasmota with the portisch firmware. I have sniffed the rf codes that I am after and have been able to send them via mqtt. I then added it on HA by creating an MQTT switch in the following manner:
- unique_id: projector
name: "Projector Screen"
command_topic: "cmnd/rfbridge/rfraw"
state_topic: "stat/rfbridge/rfraw"
availability_topic: "tele/rfbridge/LWT"
payload_on: "AAB0210308024400AA16B22819090818181908190819081909090819081818190819090955"
payload_off: "AAB0210308024400AA16BC2819090818181908190819081909090819081818190908190955"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
Everything worked well until I added another switch and now both the first switch shows unavailable
while the second says unavailable
and entity is no longer provided by the mqtt intergration
. The second switch config is below:
- unique_id: projector_stop
name: "Projector Screen Stop"
command_topic: "cmnd/rfbridge/rfraw"
state_topic: "stat/rfbridge/rfraw"
availability_topic: "tele/rfbridge/LWT"
payload_on: "AAB0210308025800A016762819090818181908190819081909090819081818181909090955"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
I am not sure what I am doing wrong and I even went to remove all the “retain” messages on my mqtt broker but nothing helped.
Can someone please help me with this? thanks.
francisp
(Francis)
February 28, 2023, 3:29pm
2
Show your whole configuration. I suspect you have 2 times
switch:
in which case only the second switch will be used.
bachoo786
(Bachoo786)
February 28, 2023, 3:42pm
3
nope I dont, here is my config:
############# MQTT ###################
mqtt:
switch:
- unique_id: trv_1
name: "Office TRV"
state_topic: "zigbee2mqtt/tuya/set/system_mode"
command_topic: "zigbee2mqtt/tuya/set/system_mode"
payload_on: "heat"
payload_off: "off"
state_on: "heat"
state_off: "off"
retain: true
- unique_id: trv_2
name: "5th Bedroom TRV"
state_topic: "zigbee2mqtt/tuya2/set/system_mode"
command_topic: "zigbee2mqtt/tuya2/set/system_mode"
payload_on: "heat"
payload_off: "off"
state_on: "heat"
state_off: "off"
retain: true
- unique_id: trv_3
name: "Master Bedroom TRV"
state_topic: "zigbee2mqtt/tuya3/set/system_mode"
command_topic: "zigbee2mqtt/tuya3/set/system_mode"
payload_on: "heat"
payload_off: "off"
state_on: "heat"
state_off: "off"
retain: true
- unique_id: trv_4
name: "Livingroom TRV Near Garden"
state_topic: "zigbee2mqtt/tuya4/set/system_mode"
command_topic: "zigbee2mqtt/tuya4/set/system_mode"
payload_on: "heat"
payload_off: "off"
state_on: "heat"
state_off: "off"
retain: true
- unique_id: projector
name: "Projector Screen"
command_topic: "cmnd/rfbridge/rfraw"
state_topic: "stat/rfbridge/rfraw"
availability_topic: "tele/rfbridge/LWT"
payload_on: "AAB0210308024400AA16B22819090818181908190819081909090819081818190819090955"
payload_off: "AAB0210308024400AA16BC2819090818181908190819081909090819081818190908190955"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
# retain: false
- unique_id: projector_stop
name: "Projector Screen Stop"
command_topic: "cmnd/rfbridge/rfraw"
state_topic: "stat/rfbridge/rfraw"
availability_topic: "tele/rfbridge/LWT"
payload_on: "AAB0210308025800A016762819090818181908190819081909090819081818181909090955"
payload_available: "Online"
payload_not_available: "Offline"
optimistic: true
WallyR
(Wally)
February 28, 2023, 4:15pm
4
See if some of the switches have been orphaned and readded with a _2 or similar.
bachoo786
(Bachoo786)
February 28, 2023, 4:21pm
5
blimey thats correct thanks a lot.
why does it do that? orphaned and readded? can I get rid of the old ones which are orphaned?
WallyR
(Wally)
February 28, 2023, 4:35pm
6
Delete them in the entities list under Settings → Devices & Services → Entities tab.
Or if you are sure that those are the only orphaned ones, then install Spook and use the service: “Remove all orphaned entities”.
1 Like