ShellyForHass custom component

Is anyone using this custom component for Shelly devices?

https://github.com/StyraHem/ShellyForHASS 3

If so, what is your opinion/experience of it? I was surprised to find that there are no posts about it on the forum.

Thanks

1 Like

I imagine few people use it because Shelly is so easy to configure in HASS without it.

I think most people are already using MQTT so adding a Shelly to HA doesn’t need any effort. Anyway adding ma MQTT server, for example via a Docker container, is effortless too.
In the component description there is written:

You can use this plugin and continue to use Shelly Cloud, MQTT and Shelly app in your mobile if you want.

Shelly Cloud exclude MQTT and viceversa as far as I know.

That would be interesting understanding what are maybe the advantages we are not seeing not using it.

I’m a fan of MQTT. I use it with zigbee2mqtt, Shelly H&Ts and for some custom projects. I originally used it for my Shelly 1s but eventually flashed them with ESPHome to get more control and flexibility.

One potential advantage of ShellyForHass is firmware update notification with actual updating on command.

I just set up some Shelly RGBW 2s today. I came across both ShellyForHass and the impressive Shellies Discovery Script https://community.home-assistant.io/t/shellies-discovery-script in addition to old school MQTT.

I configured the Shellies with the official app with both cloud and MQTT turned off.

After my original post, I decided to give Shelly ForHass a try. Installation with custom_updater couldn’t have been simpler. After a restart, the devices were automatically discovered and had entities created. All of that happened in the background. Some visibility and notification of what’s happening would be preferable. But, it worked and everything was set up properly. It’s very early days but so far, so good. I’ll update this thread as warranted.

1 Like

You can run ShellyForHASS with Shelly Cloud, MQTT and Shelly App. But of cource not MQTT and Shelly Cloud in the same time as that is a limitation in Shelly Firmware.

The advantage with ShellyForHASS is zero configuration with autodiscovery, full support for dim, colors and effects for RGBW2, roller mode, firmware update etc.

1 Like

I’m using right now, as mqtt autodiscovery script gave me some problems at HA restarts.
I can say this component is really good, works well, I’m evaluating it about 3 weeks now. Mqtt autodiscovery worked the same for me, so it’s hard time to choose :slight_smile:

I’d like to see ShellyForHASS fully integrated into HA, it would be nice.

1 Like

I am using this custom component now for my shelly 1,and have only 1 day experience with this, so i can’t judge about its realibilty, but “so far so good” and looks very promising!

@styrahem thumbs up for this, when are you creating a pull request for this to embedd it in home assistant?

Hi, I receive this error, have just 1 Shelly 1


2019-07-07 12:50:50 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform shelly
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/shelly/switch.py", line 22, in setup_platform
    if 'firmware' in discovery_info:
TypeError: argument of type 'NoneType' is not iterable

@styrahem, I only just noticed that there is no Effect chooser in the pop-up dialogs for the Shelly RGBW2s in my system. I notice on your Github page that the example dialog for the Shelly Bulb does include a chooser for Effect. Am I overlooking a setting or something?

Here is what the dialog looks like in my system:

Hi @styrahem

I’ve not found a support thread for this custom component, so I’m writing here.

My config is

shelly:
  discovery: true
  version: true
  show_id_in_name: true
  additional_information: true
  power_decimals: 2
  sensors: 
    - power
    - rssi
    - uptime
    - over_power
    - device_temp
    - over_temp
    - cloud
    - mqtt
    - battery

and the version is the latest installed via HACS

I don’t see most of the sensors requested (rssi, mqtt, cloud and so on).
I’ve also tried to use the - all option instead of defining one by one.

I’ve also defined in the log

logger:
  default: error
  logs:
    custom_components.shelly: debug

but I don’t see any error.

What can I check?

Thanks

We removed the effect selection because Shelly fw removed some effects and it cause some errors. It will be back in next release.

1 Like

We will do a pull request to HASS soon

Hi @woody4165

Does HASS have http access to the switches?
Can you see the attributes for the switch, like this:

What do you mean with “Does HASS have http access to the switches?”?

They are in the same lan, Shelly cloud is disabled and MQTT is enabled.

Nope, I don’t see it like your

I see like this

54

Are you running the latest version of HASS?

I’m on 0.96.4, latest is 0.96.5
Is it OK?

Just updated to 0.96.5, but no change

This is what I see in the log

2019-08-02 09:37:46 INFO (SyncWorker_1) [custom_components.shelly] Starting shelly, 0.0.15
2019-08-02 09:37:46 INFO (SyncWorker_1) [custom_components.shelly] pyShelly, 0.0.31
...
2019-08-02 09:37:48 INFO (MainThread) [custom_components.hacs.restore] StyraHem/ShellyForHASS
...

and every 30mins

2019-08-02 09:38:23 INFO (MainThread) [custom_components.hacs.StyraHem/ShellyForHASS] Running update```

Also trying to set ShellyforHass at home, but found difficulties as my Shellies are connected to a few different wifi networks, and the component only finds those managed at the same network Hassio runs on.

Aparently, there is a CoAP proxy component (a .py script), but looks to lack of enough documentation for a newbie, and may probably need to setup additional network components to be supported.

Any experiences using this out there?

Just setup this component and noticed the Shelly Flood’s don’t have the temperature or flood sensor showing up in HASSIO. Also, all sensors disappeared for the Shelly 1’s and Floods after I rebooted HASSIO. The switched created for the Shelly 1’s still appear.

Also, anyone had any luck getting the proxy script to run on pfsense? I managed to get it to run on a PI thats on the same network as the Shelly’s and they where added to HASSIO, once I rebooted HASSIO, they disappeared and have not come back.

I still only have two Shelly Devices and planning for more.
Found this custom component and everything went fine until yesterday when my shelly 2 stopped being recognized in Hassio. It says the device isn’t available.

My network is managed by two Asus Routers in mesh mode, don’t know to which nod each shelly connects, might be the cause? Saw something above that they must be on the same wifi network, but this being a mesh, it shouldn’t be a problem I think.

Tried to uninstall and reinstall the component but without success.