Integrating SwitchBot with Home Assistant // Detailed Guide

  Рет қаралды 24,953

This Smart House

This Smart House

Күн бұрын

Пікірлер: 85
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
*_SwitchBot is running their pre-Prime Day specials this week. So you if you are looking for a great deal, now is the time._* SwitchBot's Pre-Prime Day deals are mostly focused on combos. All of their combos are 30% off on both Amazon and SwitchBot.com. Plus, every combo comes with a free Bot!! Make sure you use the code: 30PDSW for the 30% off. Plus as a bonus, if you use my code: *3522PDSB *or click this link: **switchbot.vip/3P72LMW** *You will get an EXTRA 5% off!!* For a total of 35% off of each combo!
@WiseInetellect
@WiseInetellect 3 жыл бұрын
I absolutely Love how you take the time to explain not just what your doing but why you're doing it. This is the first video I've seen on your channel, but inlm definitely subscribing now. Thanks to you, I think I'll finally start to get a grasp on this stuff.
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
That is what I am shooting for. I work in IT, so I know that some people understand a bit more if they are shown both how and why. I am sure others might find it boring, but I want the information out there. Thank you for the kind words!
@trash_daddy
@trash_daddy 2 жыл бұрын
Same here! Really nice to actually learn WHY and HOW instead of just DO like everyone else’s videos! Keep it up!!!
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
I complety forgot to upload the stupid blog post with examples. I was able to recreate it and have posted it to the webste: thissmart.house/2021/12/24/integrate-switchbot-and-home-assistant-detailed-guide/ Super sorry about that. Let me know if I am msising something!!!
@MatTeague
@MatTeague 2 жыл бұрын
Thanks for the video. Just what I was looking for. I’m running a Pi 4 2GB and when I try the official way I get an error of ‘no unconfigured devices found’. So I’m really happy there is another way to add SwitchBot products
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
So happy it helped!
@lennihendo485
@lennihendo485 2 жыл бұрын
Your guide is awesome! I got 2 bots setup and working. I reduced the scan interval so the status shows up sooner in my HA. Side question tho. Could you please give us some hints on setting up the infrared devices?
@EsotericArctos
@EsotericArctos 2 жыл бұрын
A lot has changed now with the new BLE integrations, but there are still several devices that don't work with the official integration. The official ones are great, and work well, especially now at the beginning of 2023 when BLE Proxies exist, but this video is still great for setting up those devices that are not yet supported by the official integration.
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
And it looks like some features don't exist over the BLE integration (like power consumption). I need to play around more with the BLE proxies. I have one in my office but need to build a few more. Thanks for the comment!
@EsotericArctos
@EsotericArctos 2 жыл бұрын
@@ThisSmartHouse The newest version of ESP Home seems to have finally got BLE Proxies working well. Even my August Gen 2 lock works with the proxy now, and it can be tempramental at the best of times even with the official August app.....
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
That is awesome! I did see the note about the 2022.12 being a major upgrade.
@vba77
@vba77 2 жыл бұрын
Great video! I was able to get all my sensors working on home assistant. Not possible with Bluetooth because of range! Can't wait for your videos on the 1.1 APIs :)
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Is definitely on my list. If I could just have more hours in the day... I would assume that at some point in time Bluetooth proxy would let us do the switchbot integrations via those. I just started playing around with it but it doesn't seem to be working yet for me.
@vba77
@vba77 2 жыл бұрын
@@ThisSmartHouse I was also trying to make sense of the webhooks option for events notification (from the pan/tilt camera I have). Haven't got enough time to dig deeper.
@quach128
@quach128 2 жыл бұрын
Great job! on explaining this. I wish someone would make an integration using the new api's though
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Yeah me too. I would love to just have people use the integration. I might ask my contact at SwitchBot if they are planning on doing that any time soon.
@AndreaPALISCA
@AndreaPALISCA Жыл бұрын
Great guide - thank you! Quick question: once the meter temperature entity is created, how do you turn it into a statistic so it can be displayed on a statistic graph?
@ThisSmartHouse
@ThisSmartHouse Жыл бұрын
In Home Assistant they have a statistics integration. www.home-assistant.io/integrations/statistics/
@jqzIII
@jqzIII Жыл бұрын
I just got my first Bot. It's for the Speaker switch on my Sony amp. Used esp32_mqtt_switchbot code I found on github to get the bot into Hassio. Working good. But... I want to turn the bots "Ons/Offs" in HA into Speaker A, Speaker B, Speaker A & B and Off. Going with input_selects at the moment. Any other suggestions?
@chrisrosenkreuz23
@chrisrosenkreuz23 2 жыл бұрын
great channel yo!
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Thank you!
@davidkahn7794
@davidkahn7794 10 ай бұрын
Hi, I followed your instructions as well as a group of others for the updated v1.1 protocols (the token and private key) and got my switchbot to unlock...ONCE. After this, it started returning a 401 unauthorized response and has not worked since. I checked the All Devices sensor and my lock status sensor and both are still working, and again it unlocked once - so I know I'm using the right token and key. What am I doing wrong? I know Google Assistant requires me to insert a pincode before it can unlock. Maybe it's noticing that I haven't and so it put me on some kind of blacklist??
@zattifiedax
@zattifiedax 2 жыл бұрын
Hello! Nice video. Any recommendation on how to control the Switchbot via HA but from external Python code? I'm intending to integrate my Switchbot v6.3 with a external robotics middleware (ROS based), but since the developer's python integration for Switchbot is not updated, I'm looking at using it throught Home Assistant.
@davidcroney3
@davidcroney3 14 күн бұрын
Thanks for the video. Do you know if it's possible to integrate the switchbox remote? Seems to be missing which is a real shame!
@ThisSmartHouse
@ThisSmartHouse 14 күн бұрын
The universal one or the button?
@davidcroney3
@davidcroney3 14 күн бұрын
@ThisSmartHouse one button
@ThisSmartHouse
@ThisSmartHouse 14 күн бұрын
I think those operate differently than a standard device. I believe they communicate directly with the device they're linked to via Bluetooth. So I don't think you can show them in home Assistant.
@davidcroney3
@davidcroney3 14 күн бұрын
@@ThisSmartHouse thanks for th clarity. Dang. I was hoping that having the Switchbot Hub 2 that it would somehow relay that back to HA.
@ThisSmartHouse
@ThisSmartHouse 14 күн бұрын
@davidcroney3 Yeah I had one of the buttons and thought I could use it in Home Assistant. I ended up returning it.
@MindForgedManacle
@MindForgedManacle 2 жыл бұрын
If there are issues with local control bluetooth range, a bluetooth repeated seems like an option for those wishing to avoid dealing with needing to use the cloud.
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
There is already a project that uses ESP32s to control and read from the devices. If you just want local control.
@jqzIII
@jqzIII Жыл бұрын
That's what I did. Was pretty easy too.
@jqzIII
@jqzIII Жыл бұрын
Part 2. I have my 2nd Switchbot device. Works OK via an esphome thingy running BT proxie. Switchbot Bot works well via another esp32 device loaded with blemqttwaves (paraphrased/spelledwrong) offa github. But I would rather just have 0 or 1 extra doo dad on my hassio. I now have an m.2 bt/wifi module passed through proxmox (pci & usb) to my hassio VM. When I try to add a SB device in ha integration section it never sees a thing. Doesnt even look for one it seems to me. It does pop up saying the SB device needs to be in "active scanning mode". I'm stuck. Send help.
@simonhinger8176
@simonhinger8176 2 жыл бұрын
Hey. I managed to integrate the sensor and Switch, thanks for that. But my Switch always gooes on, then turns off automaticaly again, even though its setup as a switch, not a togle. Any ideas? So the Sensor sais the correct state, but the Switch doesnt and behaves like a toggle.
@simonhinger8176
@simonhinger8176 2 жыл бұрын
solved. had a spelling misstake. :P
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Glad you got it sorted. I wish everything was either case sensitive or insensitive.
@captshadab
@captshadab Жыл бұрын
for integrating lock in home assistant via official integration it is asking for encryption key. can you show how to extract that
@robert.wigley
@robert.wigley 3 жыл бұрын
Did you find a way to get the battery level into Home Assistant? I can't see it being returned in the JSON, unless it's statusCode?
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
I don't think that the better level is exposed in the API. Without that there isn't anything we can do.
@robert.wigley
@robert.wigley 3 жыл бұрын
@@ThisSmartHouse That's a pity. It's the only integration that I use that I haven't got battery sensors exposed to HASS for and therefore cannot integrate with my battery monitoring automation that notifies me when they need replacing. Checking in the app with Bluetooth switched off, the Firmware and Battery option is disabled, so it would seem the only way to get this information is when in range and using Bluetooth. 😖 I guess you could run the native integration side-by-side with the API to get the battery levels? Is that possible? HASS would still need to be in Bluetooth range though, which would still be a problem for a few devices. Maybe I need to look into Bluetooth to WiFi bridges. 🤔
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
That’s awesome. Does it just act as a local BT router? I use ESP32s in the ESPresense project I did a few months ago. Great tip!
@robert.wigley
@robert.wigley 3 жыл бұрын
@@ThisSmartHouse Yes, it is pretty awesome. Kudos to the developer (devWaves) for writing it. It acts as a BLE (Bluetooth Low Energy) to WiFi/MQTT bridge. Just add your devices into the code, flash and they are auto-discovered by MQTT. Looks like the notorious KZbin bug/problem has deleted my previous comment. At least you have seen it though. I wonder if it's because of the inclusion of a URL.
@alexabc54
@alexabc54 2 жыл бұрын
Struggling a bit with getting mine working with the api, the sensor appears to be working shows the slide possition etc in HA. but cant get the curtain to move via HA. i have 2 switchbot curtains in a group if that makes a diffrence. any assistance would be of great help
@olej24
@olej24 2 жыл бұрын
I'm having similar issues. I have setup the switchbot, I can see the on/off status but when i try and change the switch from on/off off/on nothing happens and after a few seconds the switch in the UI goes back to its previous state. Any ideas?
@odenkaz
@odenkaz 2 жыл бұрын
I get the following error when running the 1st line for curl.exe... "The revocation function was unable to check revocation for the certificate."
@EricKidwell
@EricKidwell 2 жыл бұрын
Hey Ryan, I got my switchbots setup using your tutorial! Thanks so much! Do you know of a tutorial (video/blog) that shows how to script the Switchbots (with automations/scripts) in HA? I can't seem to figure out how to target them in scripts.
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Hi Eric, what are you struggling with? You are wanting to activate them from Home Assistant?
@EricKidwell
@EricKidwell 2 жыл бұрын
@@ThisSmartHouse yea - Im wanting to figure out how to activate the switchbots with “Automations”. I think I need to do template switches but I’m not sure. Scripts won’t let me target the switchbots and I think that’s because the switch bots aren’t actually integrated entities. I’m wondering if maybe “template switches” might allow me to automate? Or maybe using “helpers”?
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
If you're using the method that I showed then you need to set up REST commands. Let me dig around I think I have some code to activate the switchbots inside of home assistant. I'll let you know when I update the blog post with that code.
@EricKidwell
@EricKidwell 2 жыл бұрын
Thanks so much, I really appreciate it!
@EricKidwell
@EricKidwell 2 жыл бұрын
So I think where you're going with this is that I need to set up scripts that use the "RESTful" commands. Then I go to YAML editor and I have to put something in the "Data {}" brackets to be able to automate those scripts. Right?
@HouseOfSpheres
@HouseOfSpheres 3 жыл бұрын
Do you happen to know what the Linux command is for retrieving that information from the server (instead of running curl.exe like on your Windows platform)? I'm running HA on a Home Assistant Blue Odroid system running Linux, and am pretty new to this.
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
curl is a cross platform command. It is the same on Linux and Mac (bit the syntax is slightly different).
@HouseOfSpheres
@HouseOfSpheres 3 жыл бұрын
@@ThisSmartHouse thank you for the prompt response.
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
No problem. Let me know of you need help with the syntax.
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
Also, if you're going to be doing a lot of API calls via the command line I recommend using httpie. It's a quick install on all platforms and allows you to write so much less code to get the same thing.
@shawnneldon
@shawnneldon 2 жыл бұрын
I am following the guide, entered the command with the api token and get "Message: unauthorized" any tips?
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Are you sure that API key is complete and correct?
@Levian05
@Levian05 3 жыл бұрын
Great video, thanks! Also, not sure if it's worth mentioning(if not, delete my comment), but I think you forgot to censor out some of your info at around 3:26
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
Hey thanks for the heads up! It is just my email address so not the end of the world.
@frankraym
@frankraym 2 жыл бұрын
keeps telling me unexpected error when trying to add switchbot. any idea why ?
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Where are you getting the error?
@freespeech8947
@freespeech8947 7 ай бұрын
I am new to home assistant why is it better than homekit?
@ThisSmartHouse
@ThisSmartHouse 7 ай бұрын
It is open source so it works with almost everything. There is a giant community that supports it.
@fantasymonsters
@fantasymonsters 2 жыл бұрын
FYI the blog post associated with this apparently got derailed by the holidays. :P
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
The link still looks live. Here is a direct link, some people have issues with the rebrand.ly links. thissmart.house/2021/12/24/integrate-switchbot-and-home-assistant-detailed-guide/
@HATipsByLarry
@HATipsByLarry 2 жыл бұрын
@@ThisSmartHouse That page is a empty page nothing there tried firefox, internet explorer and chrome, also tried it on my phone same thing.
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Ok I will check the version tomorrow. It looks like it reverted to an old version.
@HATipsByLarry
@HATipsByLarry 2 жыл бұрын
@@ThisSmartHouse Do you have ths info anywhere else would really like to get the info for how to do this exactly. Thanks for any help you can give us 😁
@mrxmry3264
@mrxmry3264 3 жыл бұрын
the second method requires an internet connection, and that's where the red flags start going up. what if your internet connection goes down? what if the server crashes? what if they go out of business? not to mention all the security and privacy issues. i recommend this video: kzbin.info/www/bejne/pqHXeJqEhJ2Xack
@ThisSmartHouse
@ThisSmartHouse 3 жыл бұрын
KZbin is slow to process 4k. My videos take 3-16 hours to process the hd and 4k version. No idea why. That is why I showed both versions. I get people are hesitant about cloud stuff and for good reason. But it is a trade off for convenience.
@theattorney6072
@theattorney6072 Жыл бұрын
You talk so fast 😮😮
@ThisSmartHouse
@ThisSmartHouse Жыл бұрын
You should see me in real life 🤣. I do talk faster than normal, but it was also the editing style I was doing back then. Very close cuts. I have slowed down the pace a bit over the past 4 years. Also I am not trying to cram everything in.
@theattorney6072
@theattorney6072 Жыл бұрын
@@ThisSmartHouse Yes Indeed, the very close cuts and maybe also my poor knowledge/expertise make your talking even faster :)
@Joseph-ko2kl
@Joseph-ko2kl 2 жыл бұрын
I like your content but why do you talk about go to the blog post and then it is never there? Not really trying to bash here but this is the 2 nd time I have tried to look at the written details in a blog post you mention and nothing is there? The page for this one says to busy- will be up today- Well yeah it was 24 Dec. Still not posted. Idiots like me look for help from people like you- Stop letting me down man.
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Really? I have been having issues with my URL redirects. Which posts are missing. Sorry about that. Wait I found it, there was a draft that never went live. I have fixed the SwitchBot. What was the other post?
@Joseph-ko2kl
@Joseph-ko2kl 2 жыл бұрын
@@ThisSmartHouse This one of course and it appears as I read through the comments it never was posted or at least I was not the only one looking for it and then the Severe Weather Alerts video, you had said the same thing with the redirects. Now I did find that one, I had asked about posting the TTS stuff, you said you were going to post but never did. Not really trying to sound like a little ***** here I do like your content, but it is a huge let-down as a viewer when content providers don't deliver on what they promise. That being said my hat is off to you- I couldn't do it! No way do I have the time/patience to deal with, well- people like me ! :)
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
Yeah sometimes I just flat forget. I have 3 kids, full time job and try to do this in my spare time. So mistakes are made. Let me find my comment on the TTS, and I will get that posted today. Thanks for the kick in the pants!! I do have issues with the redirects, randomly breaking. But in this case, I didn't upload the correct code. Here is the post for this video: thissmart.house/2021/12/24/integrate-switchbot-and-home-assistant-detailed-guide/
@ThisSmartHouse
@ThisSmartHouse 2 жыл бұрын
And I updated the code on the Sever Weather Alerts with my code: thissmart.house/2021/07/11/severe-weather-alerts-radar-right-in-home-assistant/
@Joseph-ko2kl
@Joseph-ko2kl 2 жыл бұрын
​ @This Smart House I get it and and again not trying to bust your **** . Thanks.
15 Home Assistant Tips You MUST Do
14:28
Everything Smart Home
Рет қаралды 438 М.
I Tried Building the PERFECT Smart Home: What I Learned (Mistakes Included)
14:51
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
This Smart Home Trend Needs To Stop!
13:13
Everything Smart Home
Рет қаралды 69 М.
Home Assistant Coding Tutorial APIs - Integrate any Device
12:49
Smart Home Makers
Рет қаралды 48 М.
5 Home Assistant Built-In Integrations You Probably Should be Using
12:45
YAML Basics // Level Up Your Home Assistant Skills
22:58
This Smart House
Рет қаралды 85 М.
Home Assistant Community Store (HACS) - Installation Guide
11:16
Jim's Garage
Рет қаралды 5 М.
Let AI suggest you your next Home Assistant automation
11:47
BeardedTinker
Рет қаралды 13 М.
Improve your UI in Home Assistant with 4 HACS components
13:44
BeardedTinker
Рет қаралды 58 М.
Kiosk Mode in Home Assistant - How To - The Right Way!
11:21
Smart Home Junkie
Рет қаралды 150 М.
SwitchBot Hub 2 // The Ultimate Matter Integration Guide
15:04
This Smart House
Рет қаралды 7 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН