r/ShellyUSA

Bluetooth communication between Gen4 devices - It works!

Okay, so this is just a proof-of-concept script. It doesn't handle errors at all, and everything is hard coded. But it works!

I have a Shelly 1 Gen4 and a Shelly Plug US Gen4, both flashed to the 2.0.0-beta1 firmware. I'm using a Shelly 1 instead of an i4 so it can be powered by 12VDC, because my desk in the house isn't a place where I want exposed line voltages just lying around.

There can sometimes be a bit of a lag, but I've seen the same thing with official BTHome components like the Button1 or the Blu Remote I also have connected to this Plug.

Okay, caveats out of the way - it works!

Here's what I did:

On the Shelly 1 Gen4 -

- Update to firmware 2.0.0-beta1

- Add a script. My script looks like this, though I'm not sure whether the scan response is necessary since it doesn't seem to autodetect anyway. This script is written for the Shelly 1; when I try this on an i4, I'll update the script to check all four inputs for changes (as you'd do for a 4-way switch.)

Shelly.addStatusHandler(function(e) {
  if (e.component === "input:0") {
    BLE.AdvBuilder.reset();
    BTHome.DataBuilder.reset();
    BTHome.DataBuilder.addObject(0x0f, e.delta.state);
    BLE.AdvBuilder.addBTHomeServiceData(BTHome.DataBuilder.build());
    let adv = BLE.AdvBuilder.build();
    BLE.AdvBuilder.reset();
    BLE.AdvBuilder.addName("Hallway Switches", true);

    BLE.advertiseOnce(adv, BLE.AdvBuilder.build());
  }    
});

- Start the script

- Set the script to start on boot

- Go to the Bluetooth settings and copy or write down the MAC address shown there

On the Plug US Gen4 -

- Update to firmware 2.0.0-beta1

- Go to the Components tab and click the + button in the BTHome devices section

- Click on the arrow next to "Add a device by MAC address"

- Paste or type the MAC address you got from the Shelly 1

- Leave the device model set to Unknown

- Click Add

- Wait for the device to be added. You should see the page reload after 30 seconds or so.

- You should now see a component with a name like "BTHomeDevice 204 - 7c:2c:67:7e:d5:36" (That's what mine's named. Yours will have a different MAC address, obviously.)

- Click on the gear next to the new device

- Flip the switch attached to the Shelly 1. You did connect a switch, right?

- Make sure you see a "Generic_boolean[0]" sensor in the Supported sensors section

- Save the settings

- Go to the Actions tab and create an action

- You should be able to find "Generic_boolean[0]" in the "Select component" dropdown.

- Go nuts! I set my action up to toggle the output on a state change, which effectively makes the switch an input to my Plug US Gen4.

reddit.com
u/parkrrrr — 5 hours ago

Is the Shelly Pro 2 the right choice for my pool pump?

I have a pool pump (Badu Eco Touch Pro II) that supports three speed settings (+ off) and can be switched via a potential-free contact. I’m currently using a timer supplied by the manufacturer, but I’d also like to control it remotely and automatically when there’s a surplus of solar power.

A friend of mine is an electrician and has recommended installing two Shelly Pro 2 units, with each Shelly Pro 2 controlling two speed settings.

Do you think this is the right approach? Can I configure the two units so that they can be operated as a single unit – particularly when programming switching times? After all, only one of the four switching states can be active at any one time.

Thanks for any tips and advice

reddit.com
u/cubruhr — 10 hours ago

Local firmware updates

Has anyone figured out how to get Shelly firmware updates without having to have their devices connected to the Cloud?

reddit.com
u/LowIncident694 — 22 hours ago

Shelly 1 Gen4 with landscape lights transformer

How do I connect this Shelly to my transformer? I want to be able to put them on a schedule and turn off/on from my phone.

u/fishpopsicle — 15 hours ago

Shelly Wiring Planner

Good news! For those of you who have a home-lab and are familiar with Docker, you can use this to plan wiring for devices. Add custom devices, junction boxes, light fixtures. It's still in it's infancy but very workable. For those who like to help others, you can export, import, and take screenshots.

BTW, for that last picture, no you wouldn't put a Pro device in a single gang junction box, let alone two switches, but you can wire it, LOL!

Here is the repo: https://github.com/foxhoundv/shelly-planner

u/foxhoundvenom_US — 19 hours ago

Looking to monitor two 240V USA split-leg circuits- do I need one EM Gen3 or two?

u/Kiora_Atua — 24 hours ago