Shelly PLUS i4 Wall Switch Example Automation

I wonder if you could explain this more please?

I have an i4 set up. Works fine in Shelly. Button or Switch neither do anything

A copy of what I have added is below. The shelly is seen but pressing buttons does not result in the trigger firing and neither can I get to see the double press / long press options.

Thank you for your help

I think this is an issue with the i4 device, if i subsribe to my MQTT broker i don`t get any topic updates other than

{"src":"shellyplusi4-0cdc7ef68dec","dst":"shellyplusi4-0cdc7ef68dec/events","method":"NotifyStatus","params":{"ts":1656333365.22,"input:3":{"id":3,"state":false}}}

This event update is caused by the setting

RPC status notifications over MQTT:
or
Generic status update over MQTT: 

I think the device is not yet ready for MQTT because TCPdump on the broker also seems to giving a little of information (at least not during button push)

I know this may be painful to get resolved, I would get in contact with shelly/allterco robotics who can support you for MQTT

try their KB: - Shelly API MQTT

let me know if you need further help with this!

Ticket Status: Open

Dear Sir/Madam,


Thank you for reaching us!

The Uni device is closing a contact, but the i4 is a trigger device and does not have switches.

We hope that clarifies the query.



Kind regards,
Shelly Support Team

I don’t get it you’ve inquired about a shelly i4 it’s a gen2 device, no need to mention uni device, it should be fully capable

please try the device ip: - with the folowing url

http://ip-address-of-shelly/rpc/MQTT.GetStatus

I’ve managed to get mqtt connected but i’m not at home to test

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

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