You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
screen -ls # list screens<br>
screen -d # detach from screen<br>
screen -r # resume attache to screen<br>exit# close screen window<br>
Strg a c # new screen window<br>
Strg a ESC # enter scroll mode 'Strg u d' up down<br>
Strg a SPACE # cycle screen windows<br>
Strg a |# vertical split<br>
Strg a TAB # move between splits<br>
Strg a :remove # to remove split<br>
nano /etc/environment # append privates=/path/to/private/ with /paht/to/private/privates.py
sudo homebridge -D -U /path/to/ # with path/to/config.js to start hb manually
hb service configuration
nano /etc/default/homebridge # append privates=/path/to/private/ # set HOMEBRIDGE_OPTS=-D -U "/path/to" and UIX_STORAGE_PATH="/path/to" with path/to/config.js
nano /etc/systemd/system/homebridge.service # change user to root to run hb as root
nano /etc/default/homebridge # HOMEBRIDGE_OPTS=-D -U "/path/to/config" --allow-root
to choose network intervace /var/lib/homerbidge/config.json
cp -f usr/bin/ffmpeg /usr/lib/node_modules/homebridge-camera-ffmpeg/node_modules/ffmpeg-for-homebridge/ffmpeg
# replace ffmpeg bundled with plugin with ffmpeg bundled with rasbian full img
"_comment": "to capture desktop when booting to desktop use this in config",
"source": "-f x11grab -r 10 -video_size 1280x720 -i :0.0",
"stillImageSource": "-f x11grab -t 1 -video_size 1280x720 -i :0.0 -vframes 1",
"_comment": "to capture cli when booting to cli use this in config",
"source": "-f fbdev -framerate 15 -i /dev/fb0""stillimageSource": "-f fbdev -i /dev/fb0 -t 1 -vframes 1"
usefull others
pinout # prints rpis pinout __ACHTUNG__ diff between gpioNr. and board pinNr
ifconfig # list interfaces
vcgencmd measure_temp # return fantemp
mportosimporttimeimportbusioimportdigitalioimportboardimportadafruit_mcp3xxx.mcp3008asMCPfromadafruit_mcp3xxx.analog_inimportAnalogIn# create the spi busspi=busio.SPI(clock=board.SCK, MISO=board.MISO, MOSI=board.MOSI)
# create the cs (chip select)cs=digitalio.DigitalInOut(board.D22)
# create the mcp objectmcp=MCP.MCP3008(spi, cs)
# create an analog input channel on pin 0chan0=AnalogIn(mcp, MCP.P0)
print('Raw ADC Value: ', chan0.value)
print('ADC Voltage: '+str(chan0.voltage) +'V')
whileTrue:
print('Raw ADC Value: ', chan0.value)
# hang out and do nothing for a half secondtime.sleep(0.2)
python to gert cpu temp
from gpiozero import CPUTemperature
cpu = CPUTemperature()
print(round(cpu.temperature))