Leverage your own Data!Use my link bit.ly/SmartHomeMakersDCFeb22 and check out the first chapter of any DataCamp course for FREE to unlock new career opportunities and become data fluent today!
@BlaLuk2 жыл бұрын
I appreciate how your videos look at topics I can’t find elsewhere! Wonder if you have a css/inspect tool/card mod video in the horizon? Keep ‘em coming!
@SmartHomeMakers2 жыл бұрын
Thanks Bla :) for the suggestions!
@boomsig90692 жыл бұрын
Yes! Yes! Yes! More of these type of tutorials! GREAT INFO!
@SmartHomeMakers2 жыл бұрын
Once I’m back from paternity leave :)
@rclarkstube2 жыл бұрын
Nice to see an implementation of this sensor. It can get very hot where I live, but depending on the beach temp several miles away, wind speed, direction, etc. it can cool off here in the afternoon or evening. A sensor that predicts the time of this cooling will save $$$.
@SmartHomeMakers2 жыл бұрын
Sounds like a really nice place you live apart from the extreme hot weather! Please either email or comment back here with the code!
@barefooter22222 жыл бұрын
I implemented something very similar to this using NodeRed. I use input boolean values and my flows in NodeRed check conditions and set those input booleans based on values. I have one for going to bed for instance. If it begins to detect motion in the bedroom and I plug my phone in, it'll shut down everything including lights, etc and go into night mode. Always cool to see new and potentially better ways to do things. Great topic!
@SmartHomeMakers2 жыл бұрын
Thanks Brandon for sharing your node red flow!
@barefooter22222 жыл бұрын
I also thought of another thing that I could potentially transition over to this and that is my "away aggregate state" that drives the "empty home" logic. I check to see who is all home and report that to a single boolean value to know that everyone is out of the house. I bet I could use this to replace that logic
@antds8572 жыл бұрын
Never thought about using bayesian probability for sensors. Great idea!
@antds8572 жыл бұрын
By the way. If you would always manually indicate when you cook, you could make a bayesian machine learning model that will fit the parameters for you.
@SmartHomeMakers2 жыл бұрын
Thanks Ant! A great starting point !
@RobinDeBecker2 жыл бұрын
Fresh new ideas due to the video. Many thanks for letting me discover a new sensor 🙂
@SmartHomeMakers2 жыл бұрын
Happy to hear that :):)
@SlackerLabs2 жыл бұрын
Great walk through on this sensor!
@SmartHomeMakers2 жыл бұрын
Thanks Jeff!!
@CrankyCoder2 жыл бұрын
Best use case I have seen for the bayesian sensor and what I am going to be doing with it is better presence detection. If you leave your watch at home but your phone is with you, which is the right state? Setting it up with the phone having a higher probability of source of truth would show you are away. But maybe you are away and your phone dies, but your watch checks in at home, but phone last updated 20 miles away. Add in garage door opening and watch reporting at home and now you have better detection.
@SmartHomeMakers2 жыл бұрын
Great use case, why not use Bayesian sensor to check for inconsistencies, like alarm turn off but presence set to away, then use that with notifications (actionable)
@thedayb4tomorrow2 жыл бұрын
the reason it's not behaving as you're expecting is because you got the probabilities the wrong way round. prob_given_false = 0 does not mean that your event has 0 probability if the observation is false but that the observation has 0 probability if the event hasn't occurred. Realistically, you'll want your prob_given_true *a lot* higher as well. if your presence detection is reasonably reliable, you'll probably want that near 1, since the probability that presence detection is off when you're cooking should be extremely low.
@SmartHomeMakers2 жыл бұрын
Thanks day before tomorrow!!! I knew I was missing a trick!
@adammourad1873 Жыл бұрын
Thank you Lewis! for the information, Great video! well done i have some media issues and CCTV that i don't know they don't work for me is it possible to get you to have look at for me please much appreciated
@Roedy_Coedy2 жыл бұрын
I plan to use this for occupancy for situations where my phone runs out of battery when I get home: 1) Check if the front door has been opened in the last X mins, 2) Check if the TV has gone from OFF to ON in the last X mins, 3) The fridge has been opened recently (a drink after a run), 4) Check if the Motion sensor in the hallway has been triggered. And then include very highly weighted: 4) If the alarm has been disabled. If 4 is true its enough to trip the Bayesian on it's own. But if I go out for a run and don't set the alarm or forget, and get home with a dead battery (after tracking the run and listening to music) at least the Bayesian can recognise the house is "Occupied" and flip an input select to Occupied or Guests mode for auto-lights/circadian lighting, playing notifications and enable heating schedules until my phone comes back to life. I'd also have to set an automation to keep the input select on Occupied/Guests until the door is next opened (in case the Bayesian resets).
@SmartHomeMakers2 жыл бұрын
Hi Peter I like the idea of a more complex occupancy sensor! Would that work in the case of an intruder? Test out that that wouldn't disarm your alarm in any way!
@minagirgis22222 жыл бұрын
Wow! You are genius !
@SmartHomeMakers2 жыл бұрын
Thanks Mina !
@MAMDAVEM2 жыл бұрын
Great Video Geo, I didn't know you could use bayesian probability for sensors. I will have to think of an application. There is a watch-out though, whenever we have to think of a complex set of circumstances to trigger an action, the probability that we will not be able to think of all the possible circumstances increases and the potential for false activation increases..... the old "you don't know what you don't know". I would be careful not to use this for someting where you absolutely don't want a false activation. In your example direct sunlight heating up the kitchen when you go into it to make a cup of tea and use the fridge to get the milk could trigger the robovacuum cleaner. It might be best to start by using a bayesian probability sensor to provide information rather than action.
@SmartHomeMakers2 жыл бұрын
Great point and when you have multiple things going on for sure makes it more complex
@timknowlden2 жыл бұрын
Yeah I think the same for example in my use case I have a south facing kitchen which can heat up quickly if the oven is on and sun beaming through the windows, my two daughters run around the house and are in and out of the fridge a lot when not cooking. I would have to see if the kitchen is heating at a quicker rate than outside temperature perhaps and make sure the thermostat is not heating at the same time. Great explanation though and everyone’s use will be massively different of course.
@Sierra-Whisky2 жыл бұрын
Excellent explanation. I never heard of this before but it's exactly what I've been struggling with for an idea I'm having. Thanks!
@SmartHomeMakers2 жыл бұрын
Happy you enjoyed it Sierra! Share this video out of you thought it was useful :)
@robertaccess2 жыл бұрын
nice info. Maybe my lights timers based of time of day, presence and some other sensors will work with this bayesian. But I see a lot of work and testing will came. Good job! Share more... :)
@SmartHomeMakers2 жыл бұрын
Thanks Robert!
@Scarlaxx22 жыл бұрын
Rly nice video. Just instead of relying on a temp diference in kitchen vs hallway I'd probably use a power usage sensor instead as I find it more relyable. With stuff like induction cookers I think the temp does not always rise that high.
@SmartHomeMakers2 жыл бұрын
Much better!! Also temp sensor close to the cooking area would be more accurate too
@robertrussell40092 жыл бұрын
Would you be able to measure the power of a single device, or are you constrained to the whole house/ all device power consumption? Also, how can would you consider seasonal fluctuations in daily temp?
@Scarlaxx22 жыл бұрын
@@robertrussell4009 Would you be able to measure the power of a single device? Simple answer is YES. Check Shelly devices for example or Sonoff that make this easy even to enhance existing installations. But for cooking due to the consumption of cookers it would even make a significant consumption change for the entire house. So I think bot cases are valid and more relyable than some temp. differences. Seasonal fluctuations are just one of the problems I see and that is why I don't think this approach is good. For example you open a window for some ventilation in winter and all the temp. diff may decrease under your level of the sensor evaluation.
@JohanNordberg2 жыл бұрын
Very interesting! Thanks. I've done something similar in a whole different way. I wanted to know when someone showers. I used a climate sensor and if the humidity quickly got higher than the average from the last five minutes I assume the shower is on. I found this to be better than comparing to a different sensor, which was my first try. To know when the show stops is much harder, because the humidity falls slowly compared to rising. So I have a magnet sensor on the door. This works pretty well. As long as the door is opened soon after the shower finished. I really like the idea of probabilities and fusing them together. That could make it pretty good to track energy for things that is hard to track.
@SolarWebsite Жыл бұрын
I can recommend an ESPHOME water meter. It picks up a rotating magnet, and uses that signal to calculate water usage. Easy to build, easy to configure, lots of good documentation on the internet. I've used it to detect a toilet that kept running occasionally, and it's also handy to catch the people in my household that take long showers 😉
@TheDexboy2 жыл бұрын
Oooh no, you did not.... Why do I keep finding new things to add to my HA? This is a neverending project, literally! Thanks for the ideas! 😁
@SmartHomeMakers2 жыл бұрын
Ahahah the todo list keeps growing !
@scotta17252 жыл бұрын
Great vid, thanks
@SmartHomeMakers2 жыл бұрын
Thanks Scotta!
@chrisrosenkreuz232 жыл бұрын
another great sensor is PROXIMITY. cheers
@SmartHomeMakers2 жыл бұрын
Proximity Mmh very good !
@esenterre2 жыл бұрын
Excellent video! Pretty advance for lambda user, but I personnaly like that. I'll probably try something for "showering". While I'm commenting. Have ever done a video about the TRENDING sensor ? That's also a powerful sensor, but I have a hard time understanding it.
@SmartHomeMakers2 жыл бұрын
That Éric! never heard about the trending sensor!
@esenterre2 жыл бұрын
@@SmartHomeMakers I'm sure you have alot of other videos in preparation, but here is the official link to trend sensor : www.home-assistant.io/integrations/trend/ To me, that's looks pretty vague. Didn't find a good tutorial, video or not, about it yet. :)
@SmartHomeMakers2 жыл бұрын
it might happen!
@3ATIVE2 жыл бұрын
Seems like a lot of work (programming) to test if three states are 'true' or not.
@SmartHomeMakers2 жыл бұрын
True! Can be expanded a lot more :)
@enormousearl88382 жыл бұрын
I'm doing the template thing for how much time passed since the last time I clicked a button, and it's showing the last_changed time as 6 hours in the future. Bizarre. But I guess I can just use a math function to correct for that?
@lwizinski2 жыл бұрын
Hey Gio, while I was working on adding this to my binary_sensor.yaml file, I keep seeing these errors in Studio Code Server: Property name is not allowed Property platform is not allowed Property prior is not allowed This is happening for all the sensors in this file, but they're all working properly. What gives?
@SmartHomeMakers2 жыл бұрын
Have you tried adding the same code to configuration.yaml?
@krzysztof65492 жыл бұрын
What do you use to edit yaml files ?
@SmartHomeMakers2 жыл бұрын
Visual studio code!
@FreshfrogmarketingUk2 жыл бұрын
First? 🤣🤣 Nice video as always Leonardo
@SmartHomeMakers2 жыл бұрын
Thanks Fresh Frog!!
@DavidFerreira19862 жыл бұрын
using data as a sensor?! will not work with kids xD
@SmartHomeMakers2 жыл бұрын
Kids are the wildcard!
@JoshuaTHawkins2 жыл бұрын
There's a helpful thread on the HA forums with a Google Sheet that you can use to help calculate the correct values you need for the sensor here: community.home-assistant.io/t/how-bayes-sensors-work-from-a-statistics-professor-with-working-google-sheets/143177
@danny03032 жыл бұрын
Thanks for your many, very useful and detailed explanations for your videos :-) Now I have a problem! I have IKEA blinds and I need a sensor I can use in an automation! There for I tried to use a Bayesian sensor to be "on" when the sun is shining on my TV! I made this one. All the status of the value template is ON. But the Bayesian sensor remains off! It's probably because of prior / probability_theshold, but I can not figure it out! Can you help? Sorry my English :-) binary_sensor: - name: "Rullegardin sol-beskyttelse" platform: "bayesian" prior: 0.1 probability_threshold: 0.9 observations: #Grænseværdi for solens højde (elevation) sammenlignet med input_number.rullegardin_elevation_graense - platform: template prob_given_true: 0.2 prob_given_false: 0.0 value_template: > {{ states('input_number.rullegardin_elevation_graense') |int > state_attr ('sun.sun', 'elevation')|int +0}} #Grænseværdi for solens position (azimuth) sammenlignet med input_number.ui_rullegardin_azimuth_graense - platform: template prob_given_true: 0.2 prob_given_false: 0.0 value_template: > {{ states('input_number.ui_rullegardin_azimuth_graense') |int < state_attr ('sun.sun', 'azimuth')|int +0}} #Grænseværdi for skydække sammenlignet med input_number.ui_rullegardin_skygge_graense - platform: template prob_given_true: 0.2 prob_given_false: 0.0 value_template: > {{ states('input_number.ui_rullegardin_skygge_graense') |int > states('sensor.engerodvej_30_cloud_cover')|int +0}} #Grænseværdi for solens højde (elevation) som angiver den nedre græse, hvoved at gardinerne skal køre op igen - platform: template prob_given_true: 0.2 prob_given_false: 0.0 value_template: > {{ state_attr ('sun.sun', 'elevation') |int > states ('input_number.ui_rullegardin_elevation_nedre_graense')|int +0}}
@danny03032 жыл бұрын
correction: bayesian sensor is on, i want it to be off, when the probability_threshold: = 0.9
@danny03032 жыл бұрын
I have created input booleans because I want to be able to adjust the values in the UI
@SmartHomeMakers2 жыл бұрын
Thanks for sharing, have you still got any questions?