Closed iamnikv closed 10 months ago
It looks that the device is not connected to the MQTT broker. Check this icon
I checked it yesterday and it said 'Connected' even thought it was gray for some reason.. Here is the status from now:
Please attach a debug log file.
Please attach a debug log file.
Here it the debug logs after restarting HA:
Is the logger configured according to the documentation? It doesn't look like it.
Your device doesn't respond to the Shelly.GetConfig
method. Check the device configuration/connection.
Here is the config:
I mean the Shelly device.
Is the Shelly.GetConfig
command sent over MQTT?
I mean the Shelly device.
Is the
Shelly.GetConfig
command sent over MQTT?
Yes
Hmm, the device is connected to the Mqtt broker and I can see it there:
This is your device from the configuration
yes
The other one is left from testing different configurations on the Shelly:
Also only after I restart the Shelly will the 'events' and 'status' fields be populated in the Mqtt Explorer:
Now I notices that the scripts is not enabled:
Ook so I think that was the problem.. After enabling the script and restarting the Shelly (from HA), now I can see meaningful values for Firmware, Last Restart and Wifi Signal sensors:
Sorry if I wasted your time @bieniu and I am grateful for guiding me to the solution! I just wonder if the script should be enabled manually (because I don't think it was mentioned in the docs) or is there something that went wrong during the script upload to the shelly..
Due to limitations of the python_script
component, Shellies Discovery must assume that its script is the first in the list. In your case this was not true, this is why the script was not enabled.
But... this is not a reason why the device doesn't respond for GetConfig
. Without that your configuration will not be updated after Shellies Discovery update.
Do you mean that even now there might be problems? I have not actually tested if the buttons will work? Should I run some tests?
But... this is not a reason why the device doesn't respond for
GetConfig
. Without that your configuration will not be updated after Shellies Discovery update.
Maybe I should mention that I am bridging 2 Mqtt brokers.. Could that play a role in that?
I'm not talking about the operation of the current configuration, but about future updates. changes made in new versions of Shellies Discovery will not be populated into entity configurations without valid responses to GetConfig
.
The way it should work is that after manually running the Shellies Announce
automation, you should see the device's response to the shellies_discovery/rpc
topic in the MQTT broker. Based on the payload from this topic, Shellies Discovery
automation runs the script and creates the configuration of all entities, which should also be visible in the HA log.
Maybe I should mention that I am bridging 2 Mqtt brokers.. Could that play a role in that?
Maybe, I don't know.
Ok in that case, what should I do when there is a new version of Shellies Discovery?
Make it work... there is no alternative way.
Got it. Thanks again ;)
Describe the bug I guess it's probably my fault, however I can't seem to make it work or I am missing something. The shelly plus i4 appears in Home Assistant as an MQTT device, but all of its states are Unknown:
The inputs are configured as buttons and I understand that they won't have a state and I have to use a trigger automation for them, but I don't understand why the other sensors are Unknown as well.
Shelly Plus i4 config:
Mqtt Explorer:
Versions:
Shellies Discovery GEN2 automation:
Debug log:
Don't know if I missed anything.. Happy to provide other info :) Thanks.