mmmries
Just logged into my raspberry pi that I use as a garage door controller and saw this
████▄▄ ▐███
█▌ ▀▀██▄▄ ▐█
█▌ ▄▄ ▀▀ ▐█ N E R V E S
█▌ ▀▀██▄▄ ▐█
███▌ ▀▀████
garage 0.2.0 (32d4ac88-9d52-5173-f118-86c36714154b) arm rpi3a
Serial : 0000000089bf37cd
Uptime : 141 days, 1 hours, 2 minutes and 14 seconds
141 days running with no restarts. I use it to open my garage from my phone and my car and to check the status of the garage door if I’m away from the house. It’s connected to a NATS server to interop with a hosted website that handles authentication/authorization. Thanks @fhunleth @jjcarstens and the other maintainers.
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
I’m posting this in response to Jose’s recent tweet (Cr. link) :
People are sleeping on Elixir for a coding harness:
Hot-code swappi...
New
Hello,
I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes.
We’re a small ...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #ai
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 6- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
jjcarstens
Whoa! So fun. You got me curious - I have a similar home controller which does simple functions. Not as cool an uptime (we had a power blip
), but it is still running Elixir 1.10.3 released April 25, 2020! (Maybe I should be ashamed of that). Truthfully left alone for so long that I had lost the SSH key on it, but had left Erlang distribution running and was able to get in with
-remsh!lawik
That’s awesome!
I’ve just started to put my Nerves devices to work for home automation. Homex is pretty nice for getting sensors out there. I need to try some switched and stuff as well which I guess you’d need for a garage door
Then again, if it ain’t broke …
jc00ke
@mmmries any chance you have a writeup or code you could share? I’ve wanted to build a garage door opener, would love to see how you did it.
mmmries
The project itself is open source and it’s only 12 commits of history, so probably not too bad to go explore, but I haven’t ever done an overview of the project. GitHub - mmmries/garage · GitHub
I probably should write up a blog post or something that provides an overview since it’s one of the most successful/boring projects I’ve ever done with Nerves
mmmries
I decided to a minimal write-up in case it’s useful to anyone else. The project really centers around 2 components:
Then in my repo you can see that the nerves config is just starting a couple of GenServer’s to watch the input from the hall effect sensor and publish state changes to a NATS topic. Similarly it listens to a NATS topic and triggers the relay.
I have a little phoenix app that is running on fly.io that connects to those same nats topics. It uses OAuth with google and has just 2 email addresses allowlisted for which authenticated users are allowed to “click” the button which will trigger the NATS message back to the nerves device.
I went with a hosted app since I wanted to be able to remotely monitor the door and I didn’t want to wait on WiFi connection before I could push the button from my car. But you could easily run NATS and Phoenix locally if you prefer that for privacy/simplicity reasons.
jc00ke
Yes! Thanks for the write-up and sharing the code! I’ve wanted to do something like this for so long. Part of what I’m waiting on is to build a home server, and my plan is to connect via Tailscale, but nothing is set yet.