One of the features of Shelly smart relays and devices is the ability to sever the connection from the physical switch from the actual relay. This opens the possibility to control the switch itself without starting the relay. For instance, you can use the physical switch to turn on another device or service.

 

Automate the settings themselves for Shelly devices are currently missing through the cloud and app hence I’ll describe the process here, which is rather easy. Maybe it will be added in a future upgrade.

You can create all kinds of automation, but if you want the core of the device to behave differently depending on conditions you’ll have to do it yourself.

For some use cases, it can be desirable to change this behavior (or a setting) depending on other conditions like time of day or weather. For instance, prevent turning off the porch lights via the physical switch when it’s raining or preventing turning on (by accident of course) the lights when it’s morning and the room is already lit.

For me, it was the need to change how the house doorbell behaves at specific hours of the day. After 9 PM I wanted to silence it and get a notification on my cellphone instead of the high volume chime (not to wake my child ). Because I don’t have a smart doorbell, and the doorbell is connected directly to mains power, for me, this is the simplest way to achieve this.

 

Change the “button type” setting to detached on a schedule

In this example, I’m showing how to change the “button type” setting, but of course, it can be used to change any other setting in the Shelly device.

First, find out the IP address of your shelly device. This can be done by going into the Shelly.cloud app, selecting the specific device you want, and going to Settings -> Device Information

In red, you can get your specific IP address (mine is scrambled):

Shelly Device Information

How to get Shelly device IP address

Once you have the IP, navigate your browser to
http://{shelly_IP}/settings/relay/

There you will get a response JSON that lists all the available settings your can change for the relay

Possible settings that can be changed on the Shelly 1 PM (As a JSON format):

 

For actually changing one of the settings (and again, here I’m changing the switch button type to detached) use the URL like so :

Notice I’m using the exact setting name as in the JSON response from above (marked in yellow).

http://{shelly_IP}/settings/relay/0?btn_type=detached

For my use case, I only do it in specific hours, and after I’m done, I’m setting it back to “edge” mode.

http://{shelly_IP}/settings/relay/0?btn_type=edge

 

That’s how I achieve my goal of disabling the doorbell ring at specific hours.

 

Node-Red Flow to change it back and forth

If you are using home assistant and node-red to automate your house here is a simple way to achieve this.

  1. create a new flow
  2. add 2 inject nodes
    1. one for setting the “detached” mode
    2. one for setting back the “edge” mode
  3. set the inject nodes to fire on the times you wish
  4. don’t forget to deploy and you’re done 🙂

Node red flow for changing button mode on shelly devices

 

If you want to buy a Shelly device and support me, you can use this link:

https://amzn.to/3qvG4Jp thank you 🙂

Shelly 1 PM

Leave a comment