Awesome Shelly Button 1 and Home Assistant integration

Sdílet
Vložit
  • čas přidán 9. 07. 2024
  • Shelly Button1 is one of the best Shelly devices I have tested so far - so simple but it works, all the time, every time. Some of the best features is rain/splash protection, internal battery and good WiFi range.
    Today we will be looking at what it offers, how to configure Shelly Button and how to integrate it in Home Assistant.
    I'll show you also my automation for it - now using Trigger ID which was added in 2021.7.
    Home Assistant internal Shelly integration:
    ⏵ www.home-assistant.io/integra...
    Shelly Button link:
    ⏵ shelly.cloud/products/shelly-...
    My automation for Shelly Button:
    ⏵ github.com/BeardedTinker/Home...
    00:00 Intro
    00:22 Thank you for all of your support
    00:40 About Shelly Button
    03:15 Configuration of Shelly Button
    06:35 Home Assistant configuration settings
    09:28 Actions configuration options
    10:22 Adding Shelly Button to Home Assistant
    12:09 Creating sample automation
    16:42 More complex automation
    18:20 Wrapping the video
    Please, give me a thumb up if you liked this video, subscribe if you still haven't and I'll see you next time!
    Have fun!
    BeardedTinker
    🧡 If you would like to support me and this channel, you can JOIN and become CZcams channel member!
    czcams.com/users/BeardedTinker...
    ✅Twitter: @BeardedTinker
    ✅Discord: / discord
    #howto #HomeAssistant #shellybutton #shelly
  • Věda a technologie

Komentáře • 58

  • @shia_labeouf
    @shia_labeouf Před 6 měsíci +1

    This was super helpful. I'm new to MQTT in HA so this was great. Also, I really love your accent, it's weirdly soothing. Subscribed for more.

  • @makeitworktech
    @makeitworktech Před 2 lety +3

    This button is part of my next video! I was having a lot of trouble with this button until I realized there was a firmware update. After that, it's fairly responsive! Great tutorial!
    The Shelly cloud part that lets you use this when you're not in your home network... That's pretty cool!

    • @BeardedTinker
      @BeardedTinker  Před 2 lety

      What version where you on? 1.10, or 1.09?
      I think I still haven't updated mine to 1.11, that was just released few weeks ago (1-2 days after I recorded that video).

    • @makeitworktech
      @makeitworktech Před 2 lety +1

      @@BeardedTinker I never thought to write it down or record it! I want to say the date was from 2020.

  • @KrastyoKrastev
    @KrastyoKrastev Před 2 lety +1

    Thanks for the great video

  • @ansheos
    @ansheos Před rokem +1

    Thanks for the overview, now let’s play for a bit! 😁

    • @BeardedTinker
      @BeardedTinker  Před rokem +1

      Any time!

    • @ansheos
      @ansheos Před rokem +1

      Haha, saw your older comment about some helping scripts, trying that

  • @dc857
    @dc857 Před 11 měsíci +1

    I just got this working. It only worked after I used the shelly discovery script and it does not show single, double, triple or long press as entities but when you create an automation with the button after discovery in MQTT it works as it should.

    • @BeardedTinker
      @BeardedTinker  Před 11 měsíci

      Yes, there was a change after video was recorded how HA sees the events (or presents them).
      Glad you got it working!!!

  • @abwino
    @abwino Před rokem +2

    Hi, thanks very much for this great and very useful video! Did you have to define the button actions etc in your configuration file to make MQTT work, or does it 'auto discover'? I can't work out how to expose all the entities via MQTT. Thanks - Andrew

    • @BeardedTinker
      @BeardedTinker  Před rokem +1

      I have Shellies Discovery script installatied. It helps with proper setup of MQTT Shelly devices. Did you try that one? github.com/bieniu/ha-shellies-discovery

    • @abwino
      @abwino Před rokem +1

      @@BeardedTinker Ahhh!! Thank you so much, I didn't know anything about the scripts. All installed and working perfectly. Thanks again for replying and pointing me in the right direction. I learn something new about HA thanks to guys like you.

    • @BeardedTinker
      @BeardedTinker  Před rokem

      That's fantastic! Glad you got it working!!

  • @MichaelAlderete
    @MichaelAlderete Před rokem +3

    In the Shelly configuration details, you show configuring both CoIoT and MQTT. And then in Home Assistant, you show the differences in the entities that appear for each of the two integrations (built-in Shelly, which is based on CoIoT, and MQTT).
    But you don't say whether you need both, and I don't think you do. And while the built-in integration has fewer entities, it's not clear that's actually a difference in functionality. The built-in integration is based on events, rather than entities. So automations check the _type_ of the event (single, double, etc.), instead of watching for specific, different entities going on. To my eyes (squinting at the screens in your video), it appears that the only things you get with MQTT that aren't in the built-in integration are the button's IP address on the Wi-Fi network (which I can look up elsewhere), and the availability of a device firmware update (which is useful, but secondary).
    Could you perhaps provide additional details of the differences between the two integration approaches, advantages and disadvantages, and so on? Any reliability differences that you know of? Is one more responsive than the other? Is one more reliable than the other?

    • @BeardedTinker
      @BeardedTinker  Před rokem +2

      Hi! No, you don't need both of them. Using just internal/CoIoT is enough (or MQTT).
      As for what to go for - it's matter of preference. If using CoIoT, you can often get unavailable, as device state goes to sleep, while you can avoid that with using MQTT and retain option there. But that's just matter of personal preference...
      Device will in both cases operate the same in terms of functionality from what I recall. I use it with MQTT as I like to have devices available even during HA restarts.

  • @ronaldvargo4113
    @ronaldvargo4113 Před 2 lety +1

    This would be a great replacement of the Samsung buttons which are now Aeotech and getting expensive. The price of these Shelly buttons are good and no batteries to replace.

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +1

      Just be aware of delay from button press to action. That's the only downside that I see in this one.
      There is new firmware in works that could/should reduce this for a fraction of time, but we have to wait for it.

    • @ronaldvargo4113
      @ronaldvargo4113 Před 2 lety

      @@BeardedTinker I have a couple of Button1's in my possession now. If you let the button "sleep" the press after say 30 minutes of non-use is really quick to connect to the AP and trigger automations, if you try another button press within say 2-3 minutes, the wifi AP connect will timeout but eventually it will connect and the command will be sent out. You can tell by the led colors, white will flash for 3 to 5 seconds, then red, then finally green. That second button event can be up to 5 to 8 seconds as it re-associates with the AP and sends commands. I don't know if it due to AP settings or their firmware or both. If you run the button on USB power it always stays connect and thus none of this delay.

  • @Ipeacocks
    @Ipeacocks Před 2 lety +1

    Does wifi devices provide better reaction? I mean smaller delay for actions.

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +1

      That's not easy to answer - depends. If the WiFi device is always powered on and connected to WiFi, then it should be - of course depending once again on signal quality and network load. If it's battery powered, it has to connect to wifi and send action after that so it can take longer time.
      Other protocols such as Zigbee or Z-wave can be faster in that case. But once again, depending on the network.
      For button, it will be a bit slower as it is battery power operated device.

  • @Marco-jp2rm
    @Marco-jp2rm Před 8 měsíci +1

    Hi, please can you help me. When i go to my Homeassistant the Adressbar shows 192.168.178.60:8123
    But i dont know what to type into ColoT peer and Mqtt Server by the shelly button?!

    • @BeardedTinker
      @BeardedTinker  Před 8 měsíci +1

      For CoIoT, use IP address of home assistant (192.168.178.60) with port 5683 - full address is 192.168.178.60:5683 . MQTT is not needed if you use CoIoT and also if you don't have it installed.

  • @Alfredplender
    @Alfredplender Před 2 lety +1

    Can you only conttrol shelly lights, or also other “tuya wifi” lamps

    • @BeardedTinker
      @BeardedTinker  Před 2 lety

      I don't have any Shelly lights, controling IKEA and Elgato lights with it.

    • @MichaelAlderete
      @MichaelAlderete Před rokem

      It depends on what you're using to respond to clicks on the button. If you're using it with Home Assistant, then the buttons can control anything that you've connected to Home Assistant. The only limitation is your skill with automations.

  • @instructeurke
    @instructeurke Před 2 lety +1

    Hi, I see You are using Configuration.Yaml 4 MQTT. I have Mosquito. Can you tell what are the differences and what is best to use to have an easy life?

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +3

      I think that this configuration.yaml is leftover from when Home Assistant internal integration was done via configuration.yaml.
      I use now mostly MQTT version of integration, and that's easiest way of adding them, but you need to add one Python script (github.com/bieniu/ha-shellies-discovery) - this will add all existing or new devices properly formatted to Home Assistant.
      In my opinion this is very fast in terms of response and should also handle well any Home Assistant restarts if any sensor data is changed while it was offline.

    • @instructeurke
      @instructeurke Před 2 lety +1

      @@BeardedTinker thanks for the Quick reply. I’ll lookup how to manage those python’s since this is all new to me. Have my HA up and running with a simple node red implementation to achieve my goals, but maybe there is a way to make it more responsive with Mqtt in stead of using the binary sensors I now use.

    • @alienJIZ1990
      @alienJIZ1990 Před 2 lety

      @@BeardedTinker thx for the link - I've switched back and forth between Shelly and ShellyforHass for a long time now trying to reduce the press delay and this seems to work the best so far. After upgrading to the latest firmware it's now between a 1-10 second delay rather than a 4-10 second delay. The problem is it's about 1-2 seconds the first time I press it - if I push the button immediately after the blue light on the button goes off (i.e. to turn a lamp back off/on) it seems to have a sort of cooldown where if I keep doing that, it will become longer and longer until I can press the button again without a delay. Are you experiencing this at all by chance or is it just my config?

  • @Jay750719
    @Jay750719 Před 2 lety +1

    I use Mosquito(MQTT) that can't find this button. Is this the reason?

    • @BeardedTinker
      @BeardedTinker  Před 2 lety

      It should work with MQTT without any issue. Just configure MQTT server in device configuration.

  • @jayemess6622
    @jayemess6622 Před 2 lety +1

    so it is not possible to turn the LED light on and off from home assistant?

    • @BeardedTinker
      @BeardedTinker  Před 2 lety

      Sorry, didn't catch you - what light? LED ring light on button?

    • @jayemess6622
      @jayemess6622 Před 2 lety +1

      @@BeardedTinker yes, the led ring, can you turn it on and off from remote?

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +1

      @@jayemess6622 unfortunately, as far as I know - no, you can't disable it from Home Assistant.

  • @paul454
    @paul454 Před 2 lety +1

    I don't get all the push options in my system. Just power on/off, battery, etc. It's showing as a switch, not a button. Any advice?

    • @BeardedTinker
      @BeardedTinker  Před 2 lety

      How did you connect it - using internal Shelly integration or by using MQTT?

    • @paul454
      @paul454 Před 2 lety

      ​@@BeardedTinker Thanks for your response! I have both the MQTT/Mosquitto and the Shelly integrations. There are a couple of MQTT entities for the buttons, but nothing for short/long presses, just power on/off, battery level, and one or two more that are not useful.

    • @paul454
      @paul454 Před 2 lety +1

      @@BeardedTinker Well, thought I would follow up with this... I appears that my configuration was corrupted. I restored the original backup I made right after I initially logged in for the first time. I updated the core and started re-adding the integrations. Interestingly, I am getting no entities for MQTT now (even though it is seeing the messages when I press the buttons). However, the new Shelly integration sees single, double, triple, and long presses now. So at this point, I am going to leave it there and use the Shelly integration.

    • @BeardedTinker
      @BeardedTinker  Před 2 lety

      @@paul454 Glad you got it working, although not the easiest way...

  • @SirMarco80
    @SirMarco80 Před 8 měsíci

    Thanks for the video!
    I have integrated the shelly button via MQTT. the shelly discovery script is also running. but I can't see the entities for short press, long press etc. czcams.com/video/Le3qj23EARY/video.html
    do i need to configure this extra?

  • @bassbo1
    @bassbo1 Před 2 lety +4

    I think these "simple" devices are still way too expensive.... 10USD would be OK

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +1

      Yes, they are a bit expensive, have to agree on that.

    • @bassbo1
      @bassbo1 Před 2 lety +2

      @@BeardedTinker you can build that for $5 from AliExpress, still, mass production capabilities of Shelly and bump the price to $10 and you make double anyway and you will crush the competition in the process.

  • @JonnyBergdahl
    @JonnyBergdahl Před 2 lety +1

    What are you talking about, I love micro USB.

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +1

      Me too, when I'm sober. 😂

    • @oudoulj
      @oudoulj Před 2 lety +1

      Maybe you meant you had preferred USB-C ?

  • @stefanschrodl5506
    @stefanschrodl5506 Před 2 lety +2

    I'm having a bit of a hard time here. Freshly setup both the button and Mosquitto, when I listen to # in Mosquitto, the button show up e.g:
    Nachricht 4 empfangen auf shellies/shellybuttonvz/input_event/0 um 13:32:
    {
    "event": "S",
    "event_cnt": 10
    }
    But entities are added to Home Assistant. Am I doing something wrong?

    • @BeardedTinker
      @BeardedTinker  Před 2 lety +3

      Are you using Shellies Discovery script? It needs this script if you are adding Shelly devices via MQTT to Home Assistant.
      github.com/bieniu/ha-shellies-discovery
      You need to follow few steps from here to get it working enable python_script, copy *.py file and add 2 automations to Home Assistant - if I remember correctly.

    • @thomaskeeling390
      @thomaskeeling390 Před 2 lety +2

      @@BeardedTinker This was missing from the video - very pleased to find the answer in the comments - many thanks

    • @billjuv6010
      @billjuv6010 Před rokem +1

      @@BeardedTinker That would have been useful information a couple of hours ago (>; I’m a relatively new HA user and was trying to figure out why I only had one entity, and only three old devices connected to a MQTT… had me puzzled for way too long. I finally gave up and just started adding an automation to the button and then I could see the single, double, triple press choices. Easy peezy.