Shellies Discovery Script

Now that we are in October 2021, would you still recommend to use this script? Or is the official integration already comparable to the quality of this script? Could someone give a pro/con overview? Thanks!

IMHO the official integration uses the api, this script uses MQTT. I prefer the latter for transparency / troubleshooting.

1 Like

You have to decide if you prefer MQTT or CoAP. Functionality and stability are the same.

Currently, there are some issues with script-configured color bulbs. I don’t have these devices and I don’t have free time to fix these issues.

Plus devices are not supported by the script because they don’t send announce (or similar) topic.

Most of my devices are configured by the script and a few by the integration, and I’m happy with this mix :wink:

Hi @Bieniu
I am still stuck with the roller problem. If you have time please take a look at my post from Oct 11. Thank you so much

This should help https://github.com/bieniu/ha-shellies-discovery/issues/127

So two things to make it work:
-remove mode: roller
-need to keep the minimal config updated after updates (thats inconvenient…), I may have overlooked a hint in the update info. if not I suggest to remind users to update their config if mandatory changes are necessary to the minimal config.

I am also having the roller problem after updating the script to latest version, but have not been able to solve it with any of the above advice. I have remover the “mode: roller” and updated the configuration, restarted the shellies and HA, even deleted the devices from HA and set them up again and tried deleting them from my mqtt broker too. All to no avail. They still show up as relays not rollers.
Any advice please?

Debug log please.

I can’t see any logs even after adding the logger configuration. Where would these logs be? Together with the HA logs?

the logging is working, as when I manually trigger the automation I get the following:

Logger: homeassistant.components.automation.shellies_discovery
Source: helpers/script.py:1344
Integration: Automation ([documentation]
First occurred: 18:26:10 (1 occurrences)
Last logged: 18:26:10

Shellies Discovery: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘payload_json’

Yes, of course.

You can’t run the automation manually.

Correct, I was just saying that the logging is working as when attempting to run manually I do see some logs. So do you have any idea why the roller options aren’t showing? There no logs to be seen.

I can’t say anything without the log.

I am now getting the following error. Please note, none of these 2.5s are in roller mode. The offending 2.5s have been updated to the latest firmware.

Logger: homeassistant.components.python_script.shellies_discovery.py
Source: components/python_script/init.py:222
Integration: Python Scripts
First occurred: 18:23:19 (48 occurrences)
Last logged: 19:00:11

  • Error executing script: Firmware dated 20210720 is required, please update your device shellyswitch25-BA8C85
  • Error executing script: Firmware dated 20210720 is required, please update your device shellyswitch25-BA7B15
  • Error executing script: Firmware dated 20210720 is required, please update your device shellyswitch25-BA8D23
  • Error executing script: Firmware dated 20210720 is required, please update your device shellyswitch25-BA8995
  • Error executing script: Firmware dated 20210720 is required, please update your device shellyswitch25-BA87B3

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/python_script/init.py”, line 222, in execute exec(compiled.code, restricted_globals) File “shellies_discovery.py”, line 571, in ValueError: Firmware dated 20210720 is required, please update your device shelly1-BA5CB4

This is not a debug log.

Sorry for my ignorance, but how and where do I find the debug log?

Have you configured logger according to OP? If so, just show me HA log.

I have this set:

logger:
default: warning
logs:
homeassistant.components.python_script: debug
homeassistant.components.automation: info

But my HA logs are about 10000 lines long!! Am I missing something here?

Restart HA, wait 5 minutes and then show me the log.