Shelly PLUS i4 Wall Switch Example Automation

I tried to explain them the issue, where the uni device is sending MQTT updates, but the i4 is not (like the uni does) I have two i4`s and the Shelly Intergration also has issues with the inputs, one found 4 inputs but grayed out, the otherone has no inputs

I`m also having issues with config being lost some time (on both of them) after a power flip, they are placed inside the originel switch Shelly Shop USA

1 Like

I complained about that as well but was told there is no issue and I have to proof or demonstrate by providing support with a video, gave up with support at the end.

tbh shelly support is poor but their R&D and the quality of hardware is OK, and you can always replace their firmware I recommend taking a backup first

it if helps you can put esphome or tasmota on it with the help of

Or

Then

Use

This configuration

Make sure while flashing not connected to AC mains

I’m using stock firmware no MQTT

are you running latest firmware v. 0.10.3?

do you want to use them as a switch or button?

mines are buttons and I get the following in Home Assistant: -

this:
entity_id: automation.new_automation
state: 'on'
attributes:
last_triggered: '2022-04-12T18:56:42.605794+00:00'
mode: parallel
current: 0
max: 10
id: '1647025690449'
friendly_name: Ashish Wall Button 1
initial_state: true
last_changed: '2022-04-12T18:24:05.119722+00:00'
last_updated: '2022-04-12T18:56:42.663710+00:00'
context:
id: 655f0416ff854839a0d7ae35d3bd92d5
parent_id: ec51a8d803274799fd32945eedd72301
user_id: null
trigger:
id: ashish-button-a-1-single-push
idx: '0'
platform: device
event:
event_type: shelly.click
data:
device_id: 6e9c4105160ef89fc6300d9fea855a1b
device: shellyplusi4-083af200e3e8
channel: 1
click_type: single_push
generation: 2
origin: LOCAL
time_fired: '2022-04-12T18:56:42.902074+00:00'
context:
id: 72487ddeffee227b2be4c36e36f47846
parent_id: null
user_id: null
description: event 'shelly.click'

the possible outputs via ha events are: -

  • btn_down
  • btn_up
  • single_push
  • double_push
  • long_push

as click_type

another way to integrate this device is through: -

which requires HACS and App Daemon

1 Like

Where do you get id and device_id ?

go to Developer Tools, click on the events tab and listen to shelly.click events

When using the i4 in HA in button mode:
Does anyone know what btn_down and btn_up does mean? Makes sense for a switch but not for a button in my mind. In the logs, both events are fired when you e.g. single push the button.

And do you know what happened to the tripple push or long push followed by short push that were available with the i3?

I’ve switched over to esphome and use my own yaml and use api/mqtt fallback combo, for configuration freedom,

but as described btn_up is like release (off in a binary sensor terms) and btn_down is like pressed or (on in terms of a binary sensor)

hope that helps, they have not implemented short push in the i4

When no entities show up after adding a I4 shelly in homeassistant?
Check via I4 webinterface this setting.
No TLS validation is imho not a problem when used in a closed network. Also no MQTT needed.

I also had problems to get this thing running in HA.

In my case the problem was that the Shelly Plus i4 names the inputs from 0 to 3 and in HA the inputs are named First button to Fourth button. So the first button is input[0].

I set all inputs as buttons (done either in the Shelly app or in the webinterface of the i4).

I created an Automation - Trigger is the first Button Single push and it will send a message.

In the logbook shows as input_0:

Now that thing is working as expected.

Hi,

It is only dimming once for me.
I would like to when i hold the button that it keeps dimming down untill release with a minimim 10% or something.

How is that managable?

1 Like

Did you ever get it to keep dimming while holding down the button?
I am stuck at dimming “1 step” everytime i do a ‘long push’, and that is just not very intuitive :wink:

Hi @ashp interesting! I’ve switched over dozens of my shellies to ESPhome, except for the i4’s. Do you just use the example configs from the wiki or, if you can spare the time, would you mind sharing your ESPhome yaml to inspire others please?

Hey Fred,

I’ve uploaded my example here but may be outdated, I’ve changed a few things like using buttons for reboot and safe mode

ESPHome Devices | Shelly i4

Hope this helps!

Also you will need a way to convert like mgos to tasmota or a serial flasher!

Ash

Hey @ploughansen id also love to do that, did you ever work it out?

im very new to this HA stuff but i image if you could do WHILE statements instead of IF statements it could be WHILE btn_down

Hi RoHanSolo

I ended up following the tutorial by Ed from Smart Home Junkie. He get’s around all you need to know, and while the video might not be made for the Shelly i4, it works great.