Skip to content

Instantly share code, notes, and snippets.

@ivesdebruycker
ivesdebruycker / volumio-gpio-buttons.py
Created November 22, 2016 21:51
Control Volumio2 with GPIO buttons
# https://volumio.org/forum/gpio-pins-control-volume-t2219.html
# https://pypi.python.org/pypi/socketIO-client
# https://volumio.github.io/docs/API/WebSocket_APIs.html
import RPi.GPIO as GPIO
import time
import subprocess
from socketIO_client import SocketIO, LoggingNamespace
@ivesdebruycker
ivesdebruycker / index.js
Created January 22, 2018 19:50
Volumio playlists (app/plugins/music_service/mpd/index.js)
'use strict';
var libMpd = require('./lib/mpd.js');
var libQ = require('kew');
var libFast = require('fast.js');
var libFsExtra = require('fs-extra');
var exec = require('child_process').exec;
var nodetools = require('nodetools');
var convert = require('convert-seconds');
var pidof = require('pidof');
@ivesdebruycker
ivesdebruycker / PoiMapContainer.js
Created January 24, 2018 09:47
React component for OpenLayers
import React, { Component } from 'react';
import PropTypes from 'prop-types'
import ol from 'openlayers';
class PoiMapContainer extends Component {
constructor(props) {
super(props);
this.state = {
map: null,
@ivesdebruycker
ivesdebruycker / cava-odroidc1-install.md
Last active September 10, 2018 07:43
Cava Audio Visualizer on Odroid C1

Raspbian 8 jessie - 3.10.96 - Volumio - Odroid C1

Compile + install libsigsegv

wget https://ftp.gnu.org/gnu/libsigsegv/libsigsegv-2.12.tar.gz
gunzip libsigsegv-2.12.tar.gz
tar -xvf libsigsegv-2.12.tar
cd libsigsegv-2.12
./configure --prefix=/usr --enable-shared --disable-static
make
@ivesdebruycker
ivesdebruycker / snapcast-install-config.md
Last active November 8, 2020 14:51
Snapcast on Volumio - client & server install

Snapcast on Volumio - client & server install

MPD config

sudo nano /etc/mpd.conf

..
# disable default ALSA output
.. 
audio_output {
    type            "fifo"
CHARGER_1 0
CHARGER_2 1
CHARGER_3 2
CHARGER_4 3
CHARGER_5 4
CHARGER_6 5
CHARGER_7 6
EMOTE_ALARM 7
EMOTE_ANGRY 8
EMOTE_ANNOYED 9
CHARGER_1 0
CHARGER_2 1
CHARGER_3 2
CHARGER_4 3
CHARGER_5 4
CHARGER_6 5
CHARGER_7 6
EMOTE_ALARM 7
EMOTE_ANGRY 8
EMOTE_ATTENTION 9
EMOTE_ALARM 0
EMOTE_NO 1
EMOTE_SCAN_SWEEP 2
EMOTE_SCARED 3
EMOTE_YES 4
EMOTE_AFFIRMATIVE 5
EMOTE_AGITATED 6
EMOTE_ANGRY 7
EMOTE_CONTENT 8
EMOTE_EXCITED 9
/*
ESP 32 - Sphero R2D2
*/
// https://github.com/nkolban/esp32-snippets/issues/757
// https://gist.github.com/sam016/4abe921b5a9ee27f67b3686910293026
// neilkolban.com/esp32/docs/cpp_utils/html/class_b_l_e_remote_characteristic.html#aa00bffdf3b2843aee32a27af9b643da5
// https://github.com/nkolban/ESP32_BLE_Arduino/blob/master/examples/BLE_client/BLE_client.ino
// https://github.com/igbopie/spherov2.js/blob/9a9fee843a9da6b26c14c60a93870ba242f03566/lib/src/toys/core.ts
/**
* @file main.cpp
* @brief ESP8266 MQTT Relay Controller
*
* This file contains the implementation of an ESP8266-based relay controller
* that connects to a WiFi network and communicates with an MQTT broker.
*
* The controller subscribes to various MQTT topics to control four relays and
* a master switch. It also supports firmware updates via MQTT.
*