Home automation / smartness: Difference between revisions

From Helpful
Jump to navigation Jump to search
(Created page with " ==Home Assistant== ==Communication== <!-- Things are generally Wifi, Bluetooth, or Zigbee. '''WiFi''' is moderate range : a little more initial setup : you likely have WiFi anyway : phones speak it, but it's not guaranteed to work directly :: ...so this tends to still be a cloudy thing : protocol often proprietary '''Bluetooth''', is more private, but is regularly a little more finicky, also because it is often shorter range than WiFi. : phones speak it, but ne...")
 
mNo edit summary
Line 64: Line 64:


https://www.zigbee2mqtt.io/advanced/zigbee/01_zigbee_network.html#finding-out-the-type-of-your-device
https://www.zigbee2mqtt.io/advanced/zigbee/01_zigbee_network.html#finding-out-the-type-of-your-device
-->
==Home automation without internet?==
<!--
'''Can I have home automation with less IoT?'''
Yes.
Some are entirely local, no internet at all.
Some of those are even the pricy sold products.
A lot of current products, and branding, makes the internet connectivity a selling point.
I don't know why turning on your lights when you're on vacation is useful, but you ''can''.
Also, you will end up with an account on yet another site, in a way you're not sure actually adheres to privacy law,
because it's non-optional to get the thing to work.
Also, you have no idea which continents are involved in controlling your lights.
Also, you have the creeping suspicion that five years from now that company may not exist,
so you may require emploiyment of hackers to, you know, ''turn on a light''.
That said, most of these apps have thought a little further than you might assume.
'''"Can't this just work without internet?""'''
Yes, but depending on what your expectations are, guarantees are hard.
Now, I am a nerd and electronics hobbyist, so I will delight in figuring out how to control it directly
from my linux server after I reflash the firmware on the lightbulb.
Most people? Want something that you plug in and ''just works'',
after at most ten minutes of initial setup,
They don't want to hear buzzwords to explain why it doesn't.
This is one of a few things that gives a soft push design decisions towards "eh just put it on the internet".
To be clear, none of those are a hard necessity.
But this involves user experience exactly ''because'' things start depending on your home setup.
'''Practical design decision #1: communicating with the thing.'''
Local only is easy enough - remember there are light bulbs with an IR or RF remote.
Have more than ''one'' of these, or a few of these, then all of them will react.
Probably. You ''probably'' want something central to tell them apart and, possibly,
be the thing that controls them.
Even if you have that in hardware -- e.g. all the control signals in Philips Hue are local-only zigbee --
you then still need to talk to ''that''.
What does your phone speak that probably still works reliably 20 meters away?
Wifi and Mobile connections.
Also, when people ''really'' want control on their phone.
And WiFi setups vary much more than you would think.
Security features might e.g. isolate each device that attaches to the network
from each other, because most laptops don't need to speak to each other anyway.
But we did. So, security feature makes thing not work.
Remember, people don't care about the buzzwords that make thing not work.
They also don't really care about the vague instructions that ''maybe'' fix it.
And you phone may not even be on the same wifi.
And because people set up things weirdly sometimes,
often without even realizing, and people do VPNs a lot now.
In such setups, reaching hosts on the public internet is likeliest to work,
for the really dumb practical reasons that people get really fussy when they can't reach their websites.
(on the other hand, if all wifi clients are completely isolated from each other,
most people won't even notice. Worst that will happend is that something like a chromecast doesn't work.)
'''If phone control is a requirement, know that most phones are on the internet, but you won't know _how_'''
You need some way to get to - and some way to prove it's really you.
And yes, you should probably give up on local control.
There are newer acronyms to do this (MQTT, WebRTC),
but even those need to start by pointing at a specific server,
and you ''could'' use dumb old web server requests perfectly well.
So it turns out that if your design target is "everyone, in very varied networks",
then putting a few servers around the world that do nothing more than receive and re-send
"light on", "light off" is the easiest way to make it just work
Are there other ways of doing it?
Absolutely.
One of the ways you may also be familiar with is to not have them connect to the unknown-quantity-to-them that is your WiFi,
but to its own thing (it barely matters whether that's bluetooth, ZigBee, LoRa, or even actually just Wifi that is just its own network)
People will balk at this, though, because that tends to mean you need a box that does nothing other than
speaking to all the other things. That box will cost a little, that better be a nicely branded system for you
to feel good about investing in that, but at the same that's exactly why they'll mark it up.
So we roughly have:
* Remote-to-device
: perfectly fine for everything you have just one of.
: If not, you need
:: a lot of remotes
:: to ensure a remote doesn't speak to every one of the thing in range
::
* Little box that talks to paired devices
:: functionally almost equivalent to the next
:: phone control
::: from more than a few meters means bluetooth is out, and we already explained why wifi isn't a given to work.
::: so probably still comes from the internet
* Everything on the cloud
:: functionally almost equivalent to the last
So yes, for privacy and security standpoint, designing a fully local system
with a few controls-everything remotes is probably better.
But unlikely to happen - you don't buy things that way,
and "doesn't work from your phone" is not a good selling point.
It'll take some time before people listen
and "because that's the best way to make it work always, and privately",
if they ever do.
---
'''"So how do I keep my neighbor from being a jerk with my lights, and all of my other devices?"'''
This often comes down to sharing a secret.
You don't whisper passwords to your lightbulb, it's something generated and exchanged
when you do whatever the setup looks like.
If you're doing your own DIY, consider that the most basic variants are probably sensitive to replay attacks,
so there's some nonces or asymmetry you want to be involved.
---
"How do I do automated setup?"
So we've been playing with ESP8266 soft access points for a bit.
Surely we can use something like that to configure them,
and ''something'' like that is how various things I've tried
seem to work.
The last I tried had a "connect your phone to this temporary AP"
as a fallback for if our primary way fails -- I'm assuming
because that primary mode told it the wifi login via bluetooth,
but bluetooth has less range.
---
'''"So how do I share this thing with my family?"'''
You pray that the system you use thought of that, and thought it out well.
You have zero control over how that app works, and no alternatives.
And that's fine until the point you find something it could do, but doesn't.
If based on a shared secret, you now need to share that.
Because it probably means phone app, that is probably an account-level thing.
With local-only control, that's harder to define.
Particularly if there is no central control.
Or maybe separately pair each device with multiple people. If it allows that.
---
And people want to do it from their phone.
That usually means these things speak wifi, or bluetooth.
Bluetooth can be direct, but also takes pairing to each device.
That's fine for two radiators because that's some specific setup once anyway,
though gets tedious if you want to make your home a ligtbulb disco.
'''Practical design decision #2: Interface'''
Even if you make it local-only, how do you interact with it?
How do you deal with multiple people?
It's nice that I can turn on the lights, but my housemate now relies on me to do that.
(In fact there are plenty of products that don't care about that one)
'''Practical design decision #3: Automation and interaction.'''
Say I want it to blink whenever X happens.
In a local-only setup, where does that run?  How do you administer that?
On each device? Practical madness
On the bridge? Doable.
On the internet? Easier.
Also people seem to like putting their living room to contain a microphone
going out to the internet.
That means you specific set it up on the internet to start with.
'''Is this why these things aren't so hackable?'''
It's a good part, in that the firmware on there will have a specific intent,
which is communicating outside, and not listening to
The firmware written for these things will want to be "",
which


-->
-->

Revision as of 14:18, 5 February 2024


Home Assistant

Communication

Zigbee2QTT

Home automation without internet?