We have update firmware
sensor and we can’t use rest command so what is your suggestion?
Don’t worry about it. It works for me. Was only a suggestion for someone else that asked.
OK I thought this was a script development suggestion.
Thanks @Bieniu I actually found it was my own error wiring in the switch. I tested it outside of the wall and when I put it back in one of the switch cables had come loose.
If someone wants to test something new https://github.com/bieniu/ha-shellies-discovery/releases/tag/0.39.0b1
Morning,
I have numerous Shelly’s however I have just added a H & T temp sensor. Up until now I have just added devices through the script with no further configuration. Do I need to do something difference with the H & T to stop it showing unavailable between check in’s?
Shelly HT uses 12h as sleep_mode.period
, the script uses 12h * 1,2 * 60 * 60 = 51840
seconds as expire_after
for this device. If your entities are unavailable this means that device doesn’t send data to MQTT broker. Check your MQTT configuration.
Thanks, so there is nothing I need to change in the config? I will have a look at the broker settings!
You can increase expire_after
for this device but it shouldn’t be necessary. Check on your MQTT broker how often the device sends its status.
I’e tried updating, both HA and Shellies Discovery script, but nothing worked.
Anyone else facing similar issues?
Thanks, cheers!!
Do you use Mosquitto addon 5.1.1?
Yes, that’s right.
I see… Thanks for the information!
Do you know how to roll the add-on back to 5.1? Is it restoring a system snapshot ?
Thanks
I used snapshot to restore 5.1. You can select what you want to restore, just select only Mosquitto addon.
@dosreism, @Bieniu thank you sooooo much for the info on the mosquitto broker problem. I had the exact same problem and it was driving me mad. Will take a look to downgrade it from backup.
@Bieniu I tried 0.39.0.b1 and I removed “mode” from all RGBW2 as as per release notes but i’m getting
2021-03-17 19:52:22 ERROR (SyncWorker_3) [homeassistant.components.python_script.shellies_discovery.py] Error executing script: mode value None is not valid, check script configuration
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 218, in execute
exec(compiled.code, restricted_globals)
File "shellies_discovery.py", line 1343, in <module>
ValueError: mode value None is not valid, check script configuration
Is there anything I can check ?
Edit: I’m running 1.10 RC5
Show me please your Shellies Announce automation and payload of RGBW2 announce
topic.
Announce Payload:
{
"id": "shellyrgbw2-A571FE",
"model": "SHRGBW2",
"mode": "white",
"mac": "84CCA8A571FE",
"ip": "192.168.50.212",
"new_fw": false,
"fw_ver": "20210312-134417/v1.10.0-rc5-g1c546b5"
}
Announce:
- id: shellies_announce
alias: "Shellies Announce"
trigger:
- platform: homeassistant
event: start
- platform: time_pattern
hours: "/1"
action:
service: mqtt.publish
data:
topic: shellies/command
payload: announce
- id: "shellies_discovery"
alias: "Shellies Discovery"
mode: queued
max: 999
trigger:
platform: mqtt
topic: shellies/announce
action:
service: python_script.shellies_discovery
data_template:
id: "{{ trigger.payload_json.id }}"
mac: "{{ trigger.payload_json.mac }}"
fw_ver: "{{ trigger.payload_json.fw_ver }}"
model: "{{ trigger.payload_json.model }}"
qos: 2
Edit: maybe I need to add another line under data_template to get the mode?