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

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
yarrichar
I’m very new to Elixir, so sorry if this is a silly question: I am wondering what happens to the mailbox of a process when the machine i...
New
pragdave
How do I tell Hologram not to escape HTML when substituting into templates? {Textile.render(@product.long_description)} escapes the HTM...
New
Fl4m3Ph03n1x
Background When trying to execute mix release on a Windows 11 machine for a Phoenix project I get the following error: * assembling mark...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
rlipscombe
I’d like to create a file with 600 permissions (rw-------), but there’s a race condition if I create it and then change the permissions. ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
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
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
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews