Snake-Sanders

Snake-Sanders

Hi everyone!

I currently have a Raspberry Pi 3B running Nerves, and it’s communicating with some smart switches over WiFi, which works great. Now, I’m thinking about switching to Zigbee devices and I know I’ll need a Zigbee gateway for that.

Has anyone here used a Zigbee dongle with Nerves? How does it work for you?

This is what I have in mind:

SONOFF Zigbee 3.0 USB Dongle Plus Gateway

Any tips or recommendations would be really appreciated!

Thanks in advance! :blush:

Showing Posts 1 to 10

lawik

lawik

Nerves Core Team

Haven’t seen anything specific. This looks like it would do some of the basics: GitHub - jonathanhockman/ex_zigbee: An Elixir Library to communicate using a serial connected ZigBee device · GitHub

If bringing up something new I usually look at how a similarly high-level language does it. I come from Python, so zigpy maybe? That will usually tell me if I need to go off into native code and so on.

I think you need your Nerves system to include cp210x which I think would go in the linux defconfig. So check the custom system docs for how to build that in?

This is all sketchwork but hope it helps.

Snake-Sanders

Snake-Sanders OP

Awesome! thank you for the tips!

simpers

simpers

Did you get this working?

I bought the same dongle on impulse under the assumption “I’m sure somebody did this with Nerves, I’ll get my confirmation after ordering it”, and so here we are :clown_face:

I’m going to try to get into the IoT of Smart Home world, but I want to run my own thing on Nerves rather than Home Assistant or the like.

lawik

lawik

Nerves Core Team

I want to do everything with Nerves but I run HomeAssistant with Zigbee2MQTT. There are too many integrations in place already and I have too many types of devices (beyond Zigbee).

If you only want to do very specific things with a select few devices it is probably feasible to talk to a Zigbee radio device like the sonoff and implement the bits you need but I think reliability takes a lot of iterations there.

I wanted the app, the notifications and so on. I may still end up doing automation using Elixir as described here:

I don’t relish learning to do that stuff in Home Assistant yaml.

And I have added a bunch of Nerves devices using Homex.

Home Assistant is such a mature project with so much functionality that unless you have a smaller scope in mind and want the practice it makes a ton of sense to use it.

Home Assistant OS actually looks similar to Nerves in terms of technical choices for the underpinnings. It does A/B partitions, Buildroot and all that :slight_smile:

But keep us posted on what you end up doing.

Snake-Sanders

Snake-Sanders OP

Hi,

Unfortunately, I got busy and had to abandon the idea. Everything ended up in a box.
Anyways, LLMs are getting better now, so you could theoretically port it to Nerves as Lars originally suggested.

simpers

simpers

I remember trying it many years ago it even then it felt as you described, so I have no doubts in that regard. My scope is small, but I’m sure it will grow with time too. I just want control, and no python haha

I got the device and I will at some point soon try to get it up and running. The first goal is to just add programmable control to my IKEA lamps (Zigbee on the box, though they claim only their hub will be able to control them), and see if I could make one of those “clap twice toggle lights” triggers somehow, as a fun project, though the long-term goal is to be able to control all lights and audio in the apartment through one interface.

My goal

The journey is the goal, and to do it with Nerves. I want to deepen my knowledge of Nerves and its ecosystem, and hopefully provide something useful for others while doing so :slight_smile:

Another reason is that it will not “just” be a Smart Home Hub, but also do a lot of other custom things that Elixir does best, and where I want to minimise the image/container(s) as much as possible.

If I get something useful going with this, I’ll update here!

lawik

lawik

Nerves Core Team

Cool! Go for it. Sounds great for learning :slight_smile:

IKEA is bog standard Zigbee. If there are quirks they should be implemented in the zigbee2mqtt project already. For reference.

I have all my IKEA lights on off-brand Zigbee controllers.

zteln

zteln

I am attempting something similar, but decided not to go with the Zigbee dongle you linked. Instead I flashed an ESP32-C6 as a Zigbee NCP and using Nerves to communicate with it via ZNSP over UART. I am still in an early stage, but I managed to get it to initialize the Zigbee network. Next step is fully initializing the whole network and then allowing devices to join the network.

hez

hez

How has that been going?

zteln

zteln

It worked quite well. I haven’t done very much with it since I last wrote about it, but I managed to receive and send messages between the ESP32-C6 Zigbee NCP and Nerves Raspberry Pi.

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews