Giter Club home page Giter Club logo

zigbee_home's Introduction

Zigbee Home

Project that aims to provide similar functionality to ESPHome, but for Zigbee devices.

ℹī¸ Note

dev branch is for experiments and exploration. It cannot be used to determine quality of resulting project.

Status

Currently work is being carried to develop CLI application and adding sensors.

Priorities can be ordered as:

  • Board(bootloader) support
  • Adding known sensors
  • Adding Zigbee clusters & templates for unavailable clusters in ZBOSS

Examples

Some examples of configuration files can be seen in examples directory. They do not provide complete and full configuration option usage, at least for now.

Licenses

This project uses information from ZBOSS SDK, license for which can be found in zboss_license.txt.

References

Special thanks

  • @rsporsche - for donating nRF52840 DK board
  • @Hedda - for informational support

zigbee_home's People

Contributors

bbadrignans avatar ffenix113 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zigbee_home's Issues

Code does not compile for more than 4 sensors

I got this error message when having 2 on_off, ias_zone, temperature and humidity.

main.go:30: generate base: write app src: write template: execute source template "clusters.h.tpl": template: clusters.h.tpl:103:10: executing "clusters.h.tpl" at <$i>: wrong type for value; expected int; got *base.CommonDeviceClusters
exit status 1

Seems that for more than 4 end points, Nordic zboss force some differences, but I don't understand what here .

Nevertheless, there is something wrong in templates/src/zigbee/clusters.h.tpl but don't know how to fix it.

Add wiki for project documentation?

Maybe consider adding wiki to this GitHub repository for project documentation?

https://docs.github.com/en/communities/documenting-your-project-with-wikis

https://docs.github.com/en/communities/documenting-your-project-with-wikis/about-wikis

https://docs.github.com/en/communities/documenting-your-project-with-wikis/adding-or-editing-wiki-pages

A few pros and cons, but the benefit over Git based documentation is that it makes it easier to contribute to end-user documentation.

You could choose to do regular dumps from wiki to files that can be pushed to git if want a Git copy of the project documentation.

Any plans to support ESP32 H2?

Your Projekt description looks promising but I have too little knowledge wether it is also transferable onto the the ESP32 H2

Include a few Zigbee examples as reference sample applications/projects?

Discussed in #34

Originally posted by Hedda March 18, 2024
An idea could be to include a few Zigbee examples as reference application samples similar most commercial Zigbee SDKs, and since some of those samples are open souce it might be a good idea to copy and/or adapt those examples for reference that help with ideas. Check out:

https://github.com/espressif/esp-zigbee-sdk/tree/main/examples

https://github.com/SiliconLabs/zigbee_applications

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee.html

https://software-dl.ti.com/simplelink/esd/plugins/simplelink_zigbee_sdk_plugin/1.60.01.09/exports/docs/zigbee_user_guide/html/zigbee/developing_zigbee_applications/example_applications.html

Support for other sensors

Hi,
I find your project really useful for building custom home automation on zigbee.

I'd like to contribute by implementing more sensor/actuator support. I'm especially interested in rotary encoders as sensors and light outputs. I suppose interrupt support for encoders would be useful, but will this break any other parts of the application?

Any pointers where I should start to look to implement these?

Setup CI to verify that all examples can be compiled to firmware

All examples that are present in the repo(as code, not a part of Docs or wiki pages) should be able to be compiled in some CI.

This would allow to guarantee that examples always have valid configuration and will build, providing a great experience.

Implementation should keep in mind that compiling the firmware can take ~a minute, and multiplied by a number of examples present.

Add pre-built binaries to releases

Useful to have pre-built binaries on release, as it will mean that Go does not need to be installed on target machine, resulting in wider consumer base.

Considered using nrf-docker for builds?

First of all, awesome project! I thought of this several years ago, but never started on it. Amazing to see that you took the initiative, thank you.

Just listing this here, in case you hadn't seen it yourself, but there is a docker image that could do the firmware builds for you. This is very beneficial when you want to run tests, or make it possible for users to compile without setting up the whole toolchain.

I might try to add this myself, but my main experience is in Python/C, so working with Go might be a bit of a hurdle here.

https://github.com/NordicPlayground/nrf-docker

Add support for contact sensor

This platform is ideal for contact sensors with low power usage and quick responses.

P.S.: the work is already in progress, and soon should be ready.

on_off sensor: generated code does not build

Hi,

first of all, thank you for this project. Looks really promising.

I wanted to generate a firmware using on_off sensor. If I try to build the generated project it fails with the following errors:

/home/lescho/Devel/zigbee_home/cli/firmware/src/main.c:197:17: warning: implicit declaration of function 'sensor_sample_fetch' [-Wimplicit-function-declaration]
  197 |                 sensor_sample_fetch(base_onoff_1_2);
      |                 ^~~~~~~~~~~~~~~~~~~
/home/lescho/Devel/zigbee_home/cli/firmware/src/main.c:197:37: error: 'base_onoff_1_2' undeclared (first use in this function)
  197 |                 sensor_sample_fetch(base_onoff_1_2);
      |                                     ^~~~~~~~~~~~~~
/home/lescho/Devel/zigbee_home/cli/firmware/src/main.c:197:37: note: each undeclared identifier is reported only once for each function it appears in
/home/lescho/Devel/zigbee_home/cli/firmware/src/main.c:198:17: warning: implicit declaration of function 'zbhome_sensor_fetch_and_update_on_off' [-Wimplicit-function-declaration]
  198 |                 zbhome_sensor_fetch_and_update_on_off(base_onoff_1_2, 2);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/lescho/ncs/v2.5.2/build

Using a configuration that is only using bme680/i2c sensor produces a project that can be built without issues.
It seems that the files for the on_off sensor are not generated. Maybe I missed something?

Thank you and BR
Dennis

This is my configuration file:

# Format for this file is not stable, and can change at any time.

general:
  # Defines how much time a loop will sleep after each iteration.
  runevery: 1m
  board: nrf52840dongle_nrf52840
  
  # This paths are necessary to build the generated firmware.
  # If nRF Connect setup was done with VS Code extension -
  # most probably this can be left empty, but if version changes -
  # new path would need to be set here.
  # Paths specified here can start with `~/`, and contain
  # environmental variables, which will be resolved.
  # This values have sane defaults and point to ~/ncs/...
  # Env variables NCS_TOOLCHAIN_BASE & ZEPHYR_BASE have
  # priority over this fields.
  #ncs_toolchain_base: ~/toolchains/7795df4459/
  #zephyr_base: ~/ncs/zephyr

  # zigbee_channels will provide optional list of channels to use.
  # Note: if not defined device will use all available channels,
  # so it is not needed to define this if not specifically necessary.
  zigbee_channels: [11,13,15,16,17]

  # Flasher tells which flashing method to use.
  # Currently `nrfutil`, `mcuboot` and `west`
  # are defined(but not equally tested). Nrfutil works though.
  flasher: nrfutil
  # Flasheroptions are flasher-specific options
  flasheroptions:
    port: /dev/ttyACM1

# This section is for defining peripherals
# on the board. I.e. uart, spi, i2c, etc.
# NOTE: Only changes should be defined here.
# See https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/<arch>/<board_name>/<board_name>.dts
# for existing definitions for the board.
# For example nRF52840 Dongle would have board devicetree at
# https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
board:
  # Specifically define bootloader for the board.
  # This field is optional, and in most cases this might not be needed.
  # But it is possible that board can be flashed
  # with some non-default bootloader, or that the generated firmware is not
  # placed correctly in memory. This setting can help in above situations.
  # Also this option can be used to try and support boards that
  # are not labeled as officialy supported.
  #bootloader: nrf52_legacy

  # This option will add UART loging functionality.
  # User can choose which console to use(usb or uart).
  # UART has to be defined either in default device tree,
  # or in `board.uart` section.
  # Quite limited for now, but can be easily extended
  debug: 
    enabled: false
    console: uart0
    leds:
      enabled: true
      # Define led which will be used to show that the board is powered.
      power: led_green
  # Change device type from sleepy end device to router.
  # This allows for device to always be available from coordinator
  # and other devices.
  # By default device will be configured as sleepy end device.
  # Note: Enabling router will increase the size of the firmware.
  is_router: false
  # I2C is optional, only to provide different pins for i2c instance(s)
  i2c:
      # ID of instance is the same as defined in the SoC definition.
      # Generally they are in form of `i2c[0-9]`.
      # Number of i2c instances is also limited, and this allows only to
      # re-define pins for specified i2c instance.
    - id: i2c0
      sda: 0.29
      scl:
        port: 0
        pin: 31
  uart:
    - id: uart0
      tx: 1.03
      rx: 1.10
  leds:
    - id: led_green
      pin: 
        port: 0
        pin: 6
        inverted: true

sensors:
  # - type: bme680
  #   i2c:
  #     id: i2c0
  #     addr: '0x76'
  # - type: scd4x
  #   i2c:
  #     id: i2c0
  # - type: device_temperature
  # on_off is a sensor that will respond to on/off state of the pin.
  # For now verifyied to be controlled by the client only,
  # so not by actually changing the state of the pin manually.
   - type: on_off
     pin:
       # This is Green LED(LD1) on nrf52840 Dongle
       port: 0
       pin: 6
       inverted: true

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.