<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dhaval Shreyas on Medium]]></title>
        <description><![CDATA[Stories by Dhaval Shreyas on Medium]]></description>
        <link>https://medium.com/@dhavalshreyas?source=rss-79e5540ec91------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*yRgHMkaRrS8v9ktF.jpg</url>
            <title>Stories by Dhaval Shreyas on Medium</title>
            <link>https://medium.com/@dhavalshreyas?source=rss-79e5540ec91------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:23:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dhavalshreyas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Future of the Smart Home is Boring]]></title>
            <link>https://medium.com/@dhavalshreyas/future-of-the-smart-home-is-boring-89b65ed7703b?source=rss-79e5540ec91------2</link>
            <guid isPermaLink="false">https://medium.com/p/89b65ed7703b</guid>
            <category><![CDATA[home-assistant]]></category>
            <category><![CDATA[matter]]></category>
            <category><![CDATA[home-automation]]></category>
            <dc:creator><![CDATA[Dhaval Shreyas]]></dc:creator>
            <pubDate>Thu, 27 Oct 2022 21:59:40 GMT</pubDate>
            <atom:updated>2022-10-27T22:03:29.782Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro</h3><p>A little bit about me, I’m your typical Software Engineer who fell in love with Home Automation many moons ago and has played around with different platforms (Hue, SmartThings, HomeKit, Alexa and now Home Assistant). I’ve slowly developed opinions on what works and what doesn’t.</p><p>While I do have a lot of fun tinkering with my smart home (last count I had about 500 entities registered to my Home Assistant instance), I recognize that this wouldn’t (shouldn’t) be the case for a lot longer.</p><p>In 2022, a smart home should’ve been super boring. It’s unfortunate that it isn’t.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sdcu5rBDTNcjWGDZ8zRUBg.png" /></figure><h3>Vision</h3><p>What does it mean for a smart home to be boring?</p><p>A boring smart home — <strong>just exists</strong>, <strong>always works</strong> and transparently becomes a <strong>part of our day-day</strong>.</p><p>While that’s a simple statement, it’s a very ambitious goal and it’s far from reality.</p><p>For one, a smart home <strong>doesn’t just exist</strong>. It needs to be built, step-by-step. The right set of sensors have to be found. Sensors that ideally work with our existing hub using a protocol that our hubs understand or in the worst case — purchase yet another hub that then interfaces with the rest of our smart home.</p><p>Well, okay. But do they <strong>always work</strong> — unfortunately no. Yes, it’s possible to get them working — most of the time. But it requires time and a LOT of patience. I’ve spent many hours trying to get my devices working — and they still fail quite frequently. I’ve installed signal repeaters at the right spots, pointed my Zigbee antenna just right to get the best LQI (Line Quality Indicator), I’ve pointed my motion sensors just the right way and have installed multiple sensors to make sure they don’t turn the lights off while I’m still in a room, I’ve bought and discarded a wide variety of devices because they just don’t do what they’re supposed to. But hey, right now, today — things mostly work and it’s glorious!</p><p>Thanks to Home Assistant, I’ve managed to make most of the “smartness” in a smart home be <strong>invisible</strong>. When things work — they just work and my wife and I don’t even think of them. Our lights turn on when it gets dark, walkways light up when we walk through, my coffee machine turns on when it’s supposed to and then turns itself off when I’m done. When things work, I don’t open my Home Assistant app or talk to Alexa. And that’s amazing. While this is achievable today, it does require a lot of fun, creative work. It should’ve been boring by now.</p><h3>Principles</h3><p>Here’s what I think we need to make a<strong> boring smart home</strong> a reality. We’re getting there, albeit slowly, very slowly.</p><h3>Local First</h3><p>With Local First the devices are interconnected within our local network and don’t always have to talk to an external server. Currently, hubs like Alexa are not locally controlled. Apple HomeKit, HomeAssistant…etc are. In my experience, local first is way better in terms of reliability, responsiveness and sometimes unlocks the more complicated automations.</p><h3>Just Works™️</h3><p>I want to be able to purchase a smart home device, plug it in and just have it work with my existing hub without having to download additional apps or install yet another hub. Zigbee gets us about 80% there and for the rest I’m very excited about the upcoming <a href="https://csa-iot.org/all-solutions/matter/">Matter</a>/<a href="https://www.threadgroup.org/">Thread</a> spec.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnoGtVIsRRBZ0yu_a15yUA.jpeg" /></figure><h3>Awareness</h3><p>I want my home to know who’s in the house, where in the house they’re at and what they’re up to. Simple, right?</p><p>Unfortunately, this has proven to be an impossibly hard problem. I have motion sensors everywhere, but they miss smaller movements. <a href="https://everythingsmarthome.co.uk/this-new-sensor-is-a-game-changer-for-your-smart-home/">mmWave sensors</a> help quite a lot, but it’s currently impossibly hard to identify the people in the room without a camera.</p><p>Wearing a watch that tracks your activity helps a little, but I’m excited about the potential of some of the new products that are coming out, like the <a href="https://www.amazon.com/Introducing-Halo-Rise-Bedside-Tracker/dp/B09MGBK9VV">Amazon Halo Rise</a> and <a href="https://atap.google.com/soli/">Google’s Soli</a></p><p>I can imagine a future where my home is fully aware of the layout and can adjust lighting, temperature, and even music to create the perfect ambiance for any situation. We’re not too far away from this.</p><h3>Automation</h3><p>Finally, probably the easiest part of the equation — make our home actually smart — do things.</p><p>Automation involves doing things (like switching lights on/off) based on what’s happening (maybe when people are in the room and it’s dark outside?). The power &amp; expressiveness provided by Home Assistant is incredible. We can build up a catalog of pretty creative automations quite easily.</p><p>I’d love to see features where automations get custom built for you and your home and are proposed. Users can then choose to adopt it. Something like Alexa’s <a href="https://www.pocket-lint.com/apps/news/amazon/155485-what-are-alexa-hunches-and-how-do-they-work-with-smart-home-devices">Hunches</a> — is directionally very exciting.</p><h3>Final Thoughts</h3><p>Overall, I’m very excited about where we are in this space. Things seem to be at a stage where they’re very close to “clicking”. It will take major innovations and breakthroughs, but I believe we are very close to seeing an explosion of exciting new technology to make our home actually smart and very boring.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=89b65ed7703b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ignore variables for Equatable Conformance in Swift]]></title>
            <link>https://medium.com/@dhavalshreyas/ignore-variables-for-equatable-conformance-in-swift-2f489fab76d9?source=rss-79e5540ec91------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f489fab76d9</guid>
            <category><![CDATA[property-wrapper]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Dhaval Shreyas]]></dc:creator>
            <pubDate>Wed, 27 May 2020 06:00:11 GMT</pubDate>
            <atom:updated>2020-05-27T06:04:52.970Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dHR6uhwnJZ5S1vYA" /><figcaption>Photo by <a href="https://unsplash.com/@unitasphotography?utm_source=medium&amp;utm_medium=referral">Charles &quot;Duck&quot; Unitas</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Synthesized Equatables are nice</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14c1b8b07244e36b677fef9f104c6eea/href">https://medium.com/media/14c1b8b07244e36b677fef9f104c6eea/href</a></iframe><p><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md">Synthesized Equatable</a> saves us from implementing our equality function, which is just boilerplate code and can easily become incorrect if we add values and forget to update our comparison function.</p><h4>Caveat</h4><p>However, when we introduce a property which does not conform to Equatable, the compiler will no longer be able to synthesize the comparison function. 😢</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kH2qkRqA94wfpK-mV4hDGA.png" /><figcaption>Compiler can no longer synthesize Equatable conformance, since b does not conform to Equatable.</figcaption></figure><h4>Workarounds</h4><p>If the non-Equatable property is not needed for our Equality check, we can use a few workarounds:</p><p><strong>Custom comparison function:</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e48b0854fc7cd52b796bf41d1847eea8/href">https://medium.com/media/e48b0854fc7cd52b796bf41d1847eea8/href</a></iframe><blockquote>What’s worse is that this operator must be updated if any properties are added, removed, or changed, and since it must be manually written, it’s possible to get it wrong, either by omission or typographical error.<br>- <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0185-synthesize-equatable-hashable.md">Swift Evolution Proposal - 0185</a></blockquote><h4>Use a wrapper:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/37200c16e201817499006513c8b8e465/href">https://medium.com/media/37200c16e201817499006513c8b8e465/href</a></iframe><p>This is a promising direction. We will have to generalize the wrapper for any type. However, it would be awkward to use the intermediate EquatableNoop type, when what we need is the value it’s wrapping.</p><h4>Property Wrappers</h4><p>Introduced in Swift 5.1, property wrappers can solve this problem rather nicely.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c80ee9d80512bc1439553f791b61fb32/href">https://medium.com/media/c80ee9d80512bc1439553f791b61fb32/href</a></iframe><p>Using this, we can now write:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/49f93719860a0b6a76911d75e8ac20fe/href">https://medium.com/media/49f93719860a0b6a76911d75e8ac20fe/href</a></iframe><p>This lets us mark some properties as EquatableNoop and get all the benefits of the synthesized- Equatable conformance.</p><p>A similar HashableNoop can also be used:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4fc84f1b3a7e4282c53e01ebe7f32be/href">https://medium.com/media/a4fc84f1b3a7e4282c53e01ebe7f32be/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f489fab76d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>