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

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
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
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
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
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews