{"id":16780802,"url":"https://github.com/n-storm/digilivolo","last_synced_at":"2026-04-18T17:03:49.007Z","repository":{"id":232978488,"uuid":"780329913","full_name":"N-Storm/DigiLivolo","owner":"N-Storm","description":"Firmware \u0026 software to control Livolo RF 433 Mhz light switches","archived":false,"fork":false,"pushed_at":"2024-05-22T17:26:41.000Z","size":1999,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T19:56:16.212Z","etag":null,"topics":["arduino","arduino-platform","attiny85","avr","digispark","digispark-usb","hidapi","hidapi-library","home","home-automation","platformio","radio","switch","usb","usb-devices","usb-hid","usb-hid-compliant-device","usb-hid-devices"],"latest_commit_sha":null,"homepage":"https://github.com/N-Storm/DigiLivolo","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N-Storm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-01T08:38:28.000Z","updated_at":"2024-05-30T04:48:49.506Z","dependencies_parsed_at":"2024-05-30T04:48:41.222Z","dependency_job_id":"9e7f75d5-d139-43d5-854e-0dd7ad6d5585","html_url":"https://github.com/N-Storm/DigiLivolo","commit_stats":null,"previous_names":["n-storm/digilivolo"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-Storm%2FDigiLivolo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-Storm%2FDigiLivolo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-Storm%2FDigiLivolo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-Storm%2FDigiLivolo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N-Storm","download_url":"https://codeload.github.com/N-Storm/DigiLivolo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926016,"owners_count":20369914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","arduino-platform","attiny85","avr","digispark","digispark-usb","hidapi","hidapi-library","home","home-automation","platformio","radio","switch","usb","usb-devices","usb-hid","usb-hid-compliant-device","usb-hid-devices"],"created_at":"2024-10-13T07:35:59.700Z","updated_at":"2026-04-18T17:03:43.985Z","avatar_url":"https://github.com/N-Storm.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DigiLivolo\n\n[![Build firmware](https://github.com/N-Storm/DigiLivolo/actions/workflows/build-firmware.yml/badge.svg?branch=main)](https://github.com/N-Storm/DigiLivolo/actions/workflows/build-firmware.yml)\n[![Build DigiLivolo software](https://github.com/N-Storm/DigiLivolo/actions/workflows/build-software.yml/badge.svg?branch=main)](https://github.com/N-Storm/DigiLivolo/actions/workflows/build-software.yml)\n\nFirmware for Digispark Arduino compatible module (any probably other AVR parts capable runninng V-USB)\nto control Livolo RF 433 Mhz light switches via USB.\n\nOnce flashed, this firmware turns DigiSpark module into USB HID device. Which should have drivers\nshipped with most modern OSes. I.e. no driver will be required.\n\nDevice accepts commands from USB Host with Livolo Remote ID \u0026 keycode and sends it on radio with\nsome kind of 433 MHz dumb OOK/ASK transmitter, like cheap SYN115 modules.\n\n## Description\n\nFirmware are located inside `firmware` directory. It's supposed to be built with\n[PlatformIO](https://platformio.org/). [VSCode](https://code.visualstudio.com/) with PlatformIO plugin\nare used for development. VSCode workspace file `DigiLivolo.code-workspace` are included and you can\nopen it with VSCode. Building project from VSCode are supported if you have PlatformIO plugin installed.\nCan be built from ArduinoIDE as well, but it will take few more steps to prepare. See below for build instructions.\n\nFirmware code has been developed for\n[Digispark module by Digistump](https://en.wikipedia.org/wiki/List_of_Arduino_boards_and_compatible_systems#Digispark).\nThis module already has everything for running [V-USB](https://www.obdev.at/products/vusb/index.html).\nThis firmware should also work on any other ATTiny85 based Arduino module or bare AVR hardware. Depending on the\nboard/pin configuration, it might be required to adjust USB-related config headers.\nFor other AVR-based boards firmware will require some changes in the code, mostly changing V-USB config header to\nadapt it to hardware. Partial support for other AVR hardware are in the code, but it's not complete and not tested\nat all as for now. Feel free to open an issue on Github project page to drop a support request for other\nArduino board.\n\nI've also included custom Digispark board config `digispark-micronucleus-6586` which are based on the\ndefault Digispark board, but I've tweaked flash size for recent Micronucleus bootloader. Binaries in the\nReleases section has been build for that board config. But for now, the firmware compiles to a size which fits\ninto flash even with default 2Kb bootloader, so it should work along with it as well without rebuilding.\n\nBecause PlatformIO doesn't have the latest [DigistumpArduino](https://github.com/ArminJo/DigistumpArduino)\nframework, I've included one in `firmware/packages/framework-arduino-avr-digistump`. RF transmitter code\nuses hardware Timer 1 to generate accurate waveforms, so I've changed framework configuration to use Timer 0\nfor millis() instead of defaults using Timer 1 for that. Thankfully that required to change 1 line in the\n`core_build_options.h` file of the framework (set TIMER_TO_USE_FOR_MILLIS to 0 for ATtiny85 build options there).\n\nLibrary `DLUSB` for the HID USB communications are based on DigiUSB library, included with\n`DigistumpArduino`. Compared to original library it was improved slightly, mostly notable is to allow more than\n1 byte bidirectional USB communication via USB HID Reports.\n\n## Usage\n\nDownload compiled firmware from [releases page](https://github.com/N-Storm/DigiLivolo/releases) or build from\nsources (see below for instructions).\n\nSoftware binaries for Windows x64, Linux x86_64 and ARM can be downloaded from\n[releases page](https://github.com/N-Storm/DigiLivolo/releases) as well. Instructions for building from\nsources are provided below.\n\n_A more generic tool - [hidapitester](https://github.com/todbot/hidapitester) could be used to control device_\n_as well._\n\nUpload firmware to your Digispark module (via PlatformIO / Arduino IDE / micronucleus tool).\nConnect DATA pin of 433 Mhz transmitter module (SYN115 based modules were used \u0026 confirmed to work by me)\nto P5 of Digispark module (this pin can be changed in main sketch code). Also connect VCC \u0026 GND of the module.\n\n![f](https://raw.githubusercontent.com/N-Storm/DigiLivolo/main/wiring.jpg)\n\nOnce plugged to USB, the device should be recognized as USB HID device, not requiring any driver as every\nmodern OS have this standard USB class driver built-in.\n\nTo send ON/OFF codes to Livolo switches with the `digilivolo` software you need to provide it with\nLivolo Remote ID and key code as positional arguments:\n\n```shell\nUsage: digilivolo [OPTION...] REMOTE_ID KEY_ID\n\nSoftware to control DigiLivolo devices.\n\n Positional arguments:\n  KEY_CODE                   Livilo Key ID (1-255)\n  REMOTE_ID                  Livilo Remote ID (1-65535)\n\n Options:\n  -o, --old-alg              Use deperecated original transmit algorithm\n  -v, --verbose              Produce verbose output\n\n  -?, --help                 Give this help list\n  -V, --version              Print program version\n      --usage                Give a short usage message\n\nReport bugs to https://github.com/N-Storm/DigiLivolo/\nCopyright (c) 2024 GitHub user N-Storm.\nLicense GPLv3+: GNU GPL version 3 or later \u003chttp://gnu.org/licenses/gpl.html\u003e.\n```\n\nREMOTE_ID and KEY_ID can be specified either as deciman numbers or hex numbers if preceeded by `'0x'`.\n\nExamples:\n\n```shell\n#  Remote ID 0x214d (8525) and key code 0x10 (16).\n./digilivolo 0x214d 0x10\n\n# Same in decimal numbers:\n./digilivolo 8525 16\n```\n\n### Using from hidapitester\n\nYou can use [hidapitester](https://github.com/todbot/hidapitester) to communicate with device instead. It's a\ngeneric tool for HID devices which allows to send or read feature reports which is the way to communicate with\nthe device.\n\nExample usage:\n\n```shell\nhidapitester --vidpid 16c0:05df -l 8 --open --send-feature 76,1,77,33,16\n```\n\nThis should send Livolo command as remote ID 0x214d (77,33) and key code 0x10 (16).\n\nUSB HID reports size set to 8 bytes. First are the HID REPORT ID, hardcoded to 76 (0x4C) in the USB descriptor.\nSecond byte are the CMD ID (command ID). Currently only one command 0x01 (send Livolo code) are suppored\nfor Host to Device reports. Next 2 bytes are the Livolo Remote ID, little-endian (means you have to reverse\nbyte order from \"normal\" representation). 5th byte are the Livolo Key code. Remaining 3 bytes are reserved and\nnot used, can be omitted in `hidapitester` invocation (will be sent as zeros).\n\n## Building firmware\n\n### With PlatformIO\n\nBuilding with PlatformIO installed are simple. Just clone the repo \u0026 issue `pio run` from the firmware\ndirectory.\n\n```shell\ngit clone --recurse-submodules https://github.com/N-Storm/DigiLivolo\ncd DigiLivolo/firmware\npio run\n```\n\nOr open VSCode workspace file `DigiLivolo.code-workspace` after cloning the repo if you want to build\nit from there. Requires PlatformIO plugin installed.\n\n### With Arduino IDE\n\n* Download or clone git repo: `git clone --recurse-submodules https://github.com/N-Storm/DigiLivolo`\n* Install [DigistumpArduino](https://github.com/ArminJo/DigistumpArduino) core.\n* Locate Digistump core install directory and replace `cores/tiny/core_build_options.h` file with version, included\n  with this project: `[firmware/packages/framework-arduino-avr-digistump/cores/dtiny/core_build_options.h](https://github.com/N-Storm/DigiLivolo/blob/main/firmware/packages/framework-arduino-avr-digistump/cores/dtiny/core_build_options.h)`\n* Create new directory `DigiLivolo`, copy `firmware/src/DigiLivolo.cpp` as `DigiLivolo.ino` there.\n* Copy `DLUSB`, `DLTransmitter` and `Livolo` libraries from `firmware/lib` to your Arduino libraries directory.\n* Open `DigiLivolo.ino` with Arduino IDE, set board to DigiSpark and compile/upload.\n\n## Building software\n\nClone git repo with submodules (these are the build requirements for software part):\n\n```shell\ngit clone --recurse-submodules https://github.com/N-Storm/DigiLivolo\n```\n\nBuild with CMake from the `DigiLivolo/software` directory:\n\n```shell\ncmake -DCMAKE_BUILD_TYPE=Release -Wno-dev -B ./build . \u0026\u0026 cmake --build ./build\n```\n\nOr simply run `bash build.sh` script from this directory.\n\nFor building on Windows [MSYS2](https://www.msys2.org/) UCRT64 has been tested to work.\n\nResulting binary should be compiled as `build/digilivolo[.exe]`.\n\nBy default project compiles with `hidapi` library built from sources (linked as a git submodule) and\nstatically linked. If you wish to use system installed `hidapi` library and you have dev files (headers, etc)\ninstalled, add `-DUSE_SYSTEM_HIDAPI=true` option to first cmake command on the example above.\n\n## Software \u0026 libraries used\n\n### Project\n\n* [PlatformIO](https://platformio.org/)\n* [DigistumpArduino](https://github.com/ArminJo/DigistumpArduino)\n* [V-USB](https://www.obdev.at/products/vusb/index.html)\n* [Livolo Arduino library](https://forum.arduino.cc/t/control-livolo-switches-livolo-switch-library/149850)\n* [hidapi](https://github.com/libusb/hidapi)\n* [hidapitester](https://github.com/todbot/hidapitester)\n* [argp-standalone](https://github.com/tom42/argp-standalone)\n* [CMake](https://cmake.org/)\n* [VSCode](https://code.visualstudio.com/)\n\n### GitHub Actions\n\n* [Checkout V3](https://github.com/actions/checkout/tree/releases/v3)\n* [action gh-release](https://github.com/softprops/action-gh-release)\n* [Setup MSYS2](https://github.com/msys2/setup-msys2)\n* [install-package](https://github.com/ConorMacBride/install-package/)\n* [Get Ninja GitHub Action](https://github.com/turtlesec-no/get-ninja)\n* [GitHub Action: Setup Alpine Linux](https://github.com/marketplace/actions/setup-alpine-linux-environment)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-storm%2Fdigilivolo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn-storm%2Fdigilivolo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-storm%2Fdigilivolo/lists"}