MacOS Spotify/Youtube Airplay

Workaround for stopping Audio Playback on MacOS 10.12.6, Firefox 59.0.2 (64-Bit) and Shairport Server on Libreelec 8.2.4 (Generic.x86_64).

keep Preference Pane/ Systemeinstellungen open

….it doesn’t matter, if u’re on audiosettings (“alt+Mute” or “alt+Vol+” or “alt+Vol-“); it looks as if keeping the Pane open forces MacOS to stay on Airplay and not to switch back to integrated speekers

Advertisements

Intel N3540 Hickup

force Performance Govenor Speed Settings by adding following line to your autostart.sh to fix system freeze. to force turbo

echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

CPU0: Intel(R) Pentium(R) CPU N3540 @ 2.16GHz (family: 0x6, model: 0x37, stepping: 0x8)

Bug 109051 – intel_idle.max_cstate=1 required to prevent crashes – Baytrail

didn’t work for me, so i disabled the intel_idle kernel extension via intel_idle.max_cstate=0

IBM Bug Description

dmesg |grep -i intel_idle

[ 0.000000] Command line: BOOT_IMAGE=/KERNEL boot=LABEL=System disk=LABEL=Storage quiet intel_idle.max_cstate=0
[ 0.000000] Kernel command line: root=/dev/ram0 rdinit=/init usbcore.autosuspend=-1 BOOT_IMAGE=/KERNEL boot=LABEL=System disk=LABEL=Storage quiet intel_idle.max_cstate=0
[ 0.918731] intel_idle: disabled

 

OpenELEC (official) 8 LIRC dropped

You don’t need Lircmap.xml in your userdata or yout lirc.cfg anymore, but you need to create an other keytable via ir-keytable… have a look here
furthermore i had to change the config.txt via

mount -o remount,rw /flash && nano /flash/config.txt

from:

dtoverlay=lirc-rpi

to:

dtoverlay=gpio-ir

and change autostart

systemctl stop eventlircd.service
ir-keytable -a /storage/.config/rc_maps.cfg

where rc_maps.cfg consists of ” * * NAME” which is pointing to
“.config/rc_keymaps/NAME” which looks as follows:

# table NAME, type: NEC
0x813712 BTN_TRIGGER_HAPPY
0x813755 KEY_INFO
0x81370f KEY_UP #Up
0x81370b KEY_DOWN #Down
0x813728 KEY_RIGHT #right
0x813727 KEY_LEFT #left
0x81370a KEY_PLAY #play_pause
[…]
0x813759 KEY_MENU #menu

[SOURCE]

everything else, linke longpress feature works as in the old days with lircd. [SOURCE]

TM1829 aka Aldilight Arduino Hyperion Control

at Last…

For Example using a string of 26 LEDs.
using the neobob library in arduino IDE
line 36
#include <neobob.h>
setting line 37 to
#define NOLEDS 26

and line 39 to
const char head[] = {0x41, 0x64, 0x61, 0x00, 0x1A, 0x4F}; //AdaMagic-26LEDS 01-26

source:Adalight prefix Magic Generator

aswell leaving line 56 as it is.
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NOLEDS, PIN, NEO_GRB + NEO_KHZ800);

made the strip light up. When using the preset Bootsequence
colorWipe(PINK);
delay(100);
colorWipe(ORANGE);
delay(100);
colorWipe(BLACK);

the first pixel won’t show the correct color, ignore it!
even a simple colorWipe(BLACK); lit up the first pixel in blue flashes…

when controlled via hyperion, using the following hyperion.config.json works for 26 Pixel (every TM1829 controls 3 LEDs in the Aldi RGB LED Strip Configuration)
http://codepad.org/53wcKxWN (even setting diffrent bautrates like in neobob.in “460800” and in hyperion.config.json “500000” works, had to, to interact with a ESP8266)
the syslog output shows correct number of leds:
tail -f /var/log/syslog"
Feb 19 11:58:23 pi systemd[1]: Starting Hyperion Systemd service...
Feb 19 11:58:23 pi systemd[1]: Started Hyperion Systemd service.
Feb 19 11:58:23 pi hyperiond[24219]: Hyperion Ambilight Deamon (24219)
Feb 19 11:58:23 pi hyperiond[24219]: Version : V1.03.2 (brindosch-99d9396/d3713a8-1469452981
Feb 19 11:58:23 pi hyperiond[24219]: Build Time: Jul 25 2016 06:54:40
Feb 19 11:58:24 pi hyperiond[24219]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json
Feb 19 11:58:24 pi hyperiond[24219]: HYPERION INFO: ColorTransform 'default' => [0; 26]
Feb 19 11:58:24 pi hyperiond[24219]: LEDDEVICE INFO: configuration:
Feb 19 11:58:24 pi hyperiond[24219]: {
Feb 19 11:58:24 pi hyperiond[24219]: "colorOrder" : "rgb",
Feb 19 11:58:24 pi hyperiond[24219]: "delayAfterConnect" : 200,
Feb 19 11:58:24 pi hyperiond[24219]: "name" : "Caps",
Feb 19 11:58:24 pi hyperiond[24219]: "output" : "/dev/ttyUSB0",
Feb 19 11:58:24 pi hyperiond[24219]: "rate" : 500000,
Feb 19 11:58:24 pi hyperiond[24219]: "type" : "adalight"
Feb 19 11:58:24 pi hyperiond[24219]: }
Feb 19 11:58:24 pi hyperiond[24219]: Opening UART: /dev/ttyUSB0
Feb 19 11:58:24 pi hyperiond[24219]: Device blocked for 200 ms
Feb 19 11:58:24 pi hyperiond[24219]: INFO: Creating linear smoothing
Feb 19 11:58:24 pi hyperiond[24219]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=75;updateDelay=0
Feb 19 11:58:24 pi hyperiond[24219]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects
Feb 19 11:58:24 pi hyperiond[24219]: EFFECTENGINE INFO: Initializing Python interpreter
Feb 19 11:58:24 pi hyperiond[24219]: INFO: Hyperion started and initialised

Set your Monitor to Standby

Hi there,
wanted to have a Kodi Screensaver, that set’s your Monitor or Screen into Standby via Timer?
There you go:
-Download:
Github Dlinny

  • copy the zip to your Kodi Media Center (OpenElec, Raspbian or Xbian …)
  • Install the Script via Addon Manager
  • ssh into KODI
  • do:
    nano ~/.kodi/addons/script.screensaver.xbian-hdmi-off-master/defaulty.py
  • delete line 44 & change line 35 & 43
     --35:os.system('tvservice -o')
     ++35: os.system('vcgencmd display_power 0')
     --43:os.system('tvservice -p')
     ++43:os.system('vcgencmd display_power 1')
     --44:xbmc.executebuiltin(‘XBMC.RestartApp()’)
  • Activate Addon in Kodi

rpi Ambilight w. Arduino Uno & TM1829

IT IS ALIVE!!!

what:

Ambilight Clone with hyperion over Arduino Uno (Adalight) and TM1829 LED

to do:

  • Color Edit
  • color fix integrated in neobob.cpp line474:
    //(b == 0xFF) b = 0xFE;//

Install hyperion

wget -N https://raw.github.com/tvdzwan/hyperion/master/bin/install_hyperion.sh

Start hyperion:

sh /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json 0/dev/null 2>&1 &

hyperion debug:

sh /storage/hyperion/bin/hyperiond.sh /storage/.config/hyperion.config.json

get neobob library from GITHUB:

https://github.com/chriszero/neobob

rename:

Adafruit_NeoPixel.h to neobob.h
Adafruit_NeoPixel.cpp to neobob.cpp

Tools:

for Prefix Calc:
Boblight Config Maker 

for the rest:
Hyperion Config Tool

neohyp.ino (15x TM182 a 3RGB LEDs=45Channels)

//pastebin.com/embed_iframe/jU9Ux9g7

hyperion.config.json
//pastebin.com/K3abwGbX

Bildschirmfoto 2015-12-30 um 03.02.18

—— edit 2017 ——

after fiddelling around after nearly a year ago reveals my flaws:

for correct colormode, i had to change “NEO_GRB” in line 58 of neobob.ino to “NEO_RGB”

further in neobob.cpp deactivate line 495 with “// comments //” activate line 496

Remote Python Programming

The Plan: use Python IDE on Raspberry Pi remotely
on both Machines enable X11-forwarding in your sshd_config
X11Forwarding yes

grep XQuarz from http://xquartz.macosforge.org

open XQuarz -> “Programme” Terminal:
ssh -X @

Xauth your Display:
xauth list|grep `uname -n`
sudo xauth add :0 .
for example, mine was
xauth list|grep `uname -n`
pi/unix:0 MIT-MAGIC-COOKIE-1 9173e45bef4ccd4740979e7682b76dc1
pi/unix:10 MIT-MAGIC-COOKIE-1 e3241e2b8ac1324521e38131a51dbe97
xauth add :0 . 9173e45bef4ccd4740979e7682b76dc1

A Python IDE called “idle”
start Python IDE:
idle