Home Assistant : Q&A, Tips & Tricks, Your Configs

Well well well. I finally have a working zigbee network, and I can't believe I didn't understand the issue. It looks like, my mistake was, thinking the Sonoff basicZBR3 is a capable repeater. News flash, its useless as a repeater.

First problem, they actually have really weak signal. I think, at best, they can extend my range by 4 meter at most.

Second problem, they do not create sibling connections in the mesh, they will only create a connection to the coordinator and allow end links. This is by far the biggest limitation I think. I only started to realise, now that I added a different type of repeater to my network, the LoraTap Tuya ZigBee usb repeater.

I had 2 basicZBR3 switches, that fell off the network, unable to get them back on. Next, I joined these LoraTap repeaters, and man, it was so easy to join them, first try worked. Then as I am playing with some new mmWave zigbee sensors, randomly they both joined the network too, through the new LoraTap repeaters thats actually much further away from the coordinator. The LoraTap repeaters also create sibling links between each other and the basicZBR3s. Really completing the network now. Been so stable since the LoraTap addition. Finally having a zigbee network that work!

I wonder if the USB Sonoff is any better at this, I want to extend the Zigbee network in our offices and planned to make use of them as I can easily squeeze them into various places that have USB ports without too much hassle.
 
I've been seeing a similar issue with my Tuya Pool motor switch. My automation is simply, when UV index is higher than 1 switch on pool motor, then a second automation says when UV index drops below 1, switch off.

The switch on seems to work flawlessly, every morning around 9am.

The switch off is a bit of a problem, but because it tends to happen around mid afternoon when I'm busy working, I can never dig deeper.

What I've noticed is that the switch just shows unavailable on my dashboard, so I would rather just open tuya and switch off there until I figure out why that happens.

What helps me, I add a notification step that announces through alexa whether it worked or failed, so I know if I need to intervene.

It is very frustrating, mine is connected to my pond heater but it only works sometimes.

I'm considering getting a sonoff plug.

I had an issue where my Tuya based devices like the geyser or pool pump occasionally wouldn't come back up after a load shed slot. They showed as unavailable. The fix was to add a reload in their automation just before they trigger a turn on.

Now I run Tuya Local. But you should be able to do something similar ( I do it with the native weather app as well for e.g. )

In the Actions section of your automation, add :

Call a service 'Home Assistant Core Integration: Reload config entry' on Your Geyser Timer
Add a delay, wait 30 seconds
Call a service 'Switch: Turn on' on Your Geyser Timer
 
I had an issue where my Tuya based devices like the geyser or pool pump occasionally wouldn't come back up after a load shed slot. They showed as unavailable. The fix was to add a reload in their automation just before they trigger a turn on.

Now I run Tuya Local. But you should be able to do something similar ( I do it with the native weather app as well for e.g. )

In the Actions section of your automation, add :

Call a service 'Home Assistant Core Integration: Reload config entry' on Your Geyser Timer
Add a delay, wait 30 seconds
Call a service 'Switch: Turn on' on Your Geyser Timer
Thanks, I'm going to test it.
 
I had an issue where my Tuya based devices like the geyser or pool pump occasionally wouldn't come back up after a load shed slot. They showed as unavailable. The fix was to add a reload in their automation just before they trigger a turn on.

Now I run Tuya Local. But you should be able to do something similar ( I do it with the native weather app as well for e.g. )

In the Actions section of your automation, add :

Call a service 'Home Assistant Core Integration: Reload config entry' on Your Geyser Timer
Add a delay, wait 30 seconds
Call a service 'Switch: Turn on' on Your Geyser Timer
I did this as well...
 
Make a time condition and then define the Trigger_ID.

Then under Action use the Choose option and make the condition Trigger_ID and then define whatever other conditions you need to.

Can do as many things as you want in one single automation.

My Geyser automation is one Automation with 6 triggers doing different things.

Thanks. Will give that a go too.
 
It is very frustrating, mine is connected to my pond heater but it only works sometimes.

I'm considering getting a sonoff plug.
The only thing i can think of on mine is the Wifi range, there are times when i open the Tuya app (After the "switch off" automation fails) and its says "The Wifi signal of this device is weak, change the device position" so it could be that it just loses connection and then regains connection at some point causing the random disconnects? (I know its quite a distance away from the router, so could be that.)

Any chance yours is a distance away as well?
 
The only thing i can think of on mine is the Wifi range, there are times when i open the Tuya app (After the "switch off" automation fails) and its says "The Wifi signal of this device is weak, change the device position" so it could be that it just loses connection and then regains connection at some point causing the random disconnects? (I know its quite a distance away from the router, so could be that.)

Any chance yours is a distance away as well?
It seems to be OK
Screenshot_2024-05-21-18-06-22-965_com.tuya.smartlife-edit.jpg
 
I had an issue where my Tuya based devices like the geyser or pool pump occasionally wouldn't come back up after a load shed slot. They showed as unavailable. The fix was to add a reload in their automation just before they trigger a turn on.

Now I run Tuya Local. But you should be able to do something similar ( I do it with the native weather app as well for e.g. )

In the Actions section of your automation, add :

Call a service 'Home Assistant Core Integration: Reload config entry' on Your Geyser Timer
Add a delay, wait 30 seconds
Call a service 'Switch: Turn on' on Your Geyser Timer
I have actually given up on Tuya Local on HASS, for some reason, i cant find the integration even after i installed through HACS.

I only have 2 Tuya devices (Kettle and Pool switch) the kettle just works, i've never had this issue with it.

The pump however, every other day it just loses connection and cannot be controlled on HASS, so im rather just going to replace it, and get 1 that has monitoring as well. (Open to suggestions?)
 
Before I look into it, or do it myself. Is there a way to make a template light switch that has all the light switches in it, but dynamic? So - if I add or remove a light, it is automatically included in the template light switch?
 
Before I look into it, or do it myself. Is there a way to make a template light switch that has all the light switches in it, but dynamic? So - if I add or remove a light, it is automatically included in the template light switch?
Probably a button, with automation that switch all lights based on the button state?
 
Probably a button, with automation that switch all lights based on the button state?

Did it light so:
Code:
- platform: template
  lights:
    all_lights:
      friendly_name: "All Lights"
      value_template: >
        {% if ((states.light|selectattr('state','eq','on')|map(attribute='entity_id'))|join(',')) == ''
            or ((states.light|selectattr('state','eq','on')|map(attribute='entity_id'))|join(',')) ==  'light.all_lights' %}
        false
        {% else %}
        true
        {% endif %}
      turn_off:
        service: light.turn_off
        target:
          entity_id: all
      turn_on:
        service: light.turn_on
        target:
          entity_id: all

Probably a neater way to do the value_template - I'm just lazy. Copy - Paste.
 
Last edited:
To the peeps looking at Zigbee products, you can also look at the brazil plugs, they match SA's new 3pin plugs:
Smart Life Plug Power Monitor | Smart Plug Works Google Home - 16a/20a Wifi Smart - Aliexpress
AVATTO Brazil 16A/20A ZigBee Smart Plug with Power Monitor,Tuya Smart Life APP Smart Socket Outlets Works for Google Home,Alexa (aliexpress.com)

SA uses slightly larger pins than the Brazil 16A plugs, but they work fine in our sockets and multiplugs. You might need to drill the plastic hole of the smart plug to accommodate the larger SA pins (only 0.4mm larger).
I think SA might match their 20A sockets, but I haven't checked yet.

Also these work great for larger appliances, if got 4 of these (2 for AC's, 1 for Geyser & 1 for water pump).
Colorock CR-MNZ1 control via MQTT | Zigbee2MQTT
 
Last edited:
Before I look into it, or do it myself. Is there a way to make a template light switch that has all the light switches in it, but dynamic? So - if I add or remove a light, it is automatically included in the template light switch?
I use Auto Entities from HACS

Code:
card:
  title: Lights
  type: entities
filter:
  include:
    - entity_id: light.*
sort:
  method: name
type: custom:auto-entities
 
I use Auto Entities from HACS

Code:
card:
  title: Lights
  type: entities
filter:
  include:
    - entity_id: light.*
sort:
  method: name
type: custom:auto-entities
Thanks, but not quite what I was looking for.
 
Have anyone else had some issues with MQTT the last few days. My entities becomes unknow and that messes up my automations.

Looking at the logs my mqtt get disconnected when this happens and then reconnects a second or so later.

Code:
2024-05-20 18:00:50.022 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 00:01:16.469 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 06:01:08.505 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 12:01:11.890 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 18:01:09.427 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-22 00:01:17.927 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-22 12:01:16.545 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-22 21:01:11.004 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-23 03:01:11.032 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)

This started over the weekend.
 
Have anyone else had some issues with MQTT the last few days. My entities becomes unknow and that messes up my automations.

Looking at the logs my mqtt get disconnected when this happens and then reconnects a second or so later.

Code:
2024-05-20 18:00:50.022 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 00:01:16.469 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 06:01:08.505 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 12:01:11.890 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-21 18:01:09.427 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-22 00:01:17.927 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-22 12:01:16.545 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-22 21:01:11.004 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)
2024-05-23 03:01:11.032 WARNING (MainThread) [homeassistant.components.mqtt.client] Disconnected from MQTT server core-mosquitto:1883 (7)

This started over the weekend.
did you update any of the mqqt related items?
 
Wonder if someone can help me. I am trying to ssh to my HA pi with root but I keep on getting a permission denied error. I am sure I am using the correct password.

PermitRootLogin is set to yes
 
Wonder if someone can help me. I am trying to ssh to my HA pi with root but I keep on getting a permission denied error. I am sure I am using the correct password.

PermitRootLogin is set to yes
Are you using the Terminal and SSH add-on ?

1716469985700.png
 
Back
Top