Folgende Warnungen sind aufgetreten:
Warning [2] Undefined variable $unreadreports - Line: 34 - File: global.php(961) : eval()'d code PHP 8.2.2 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(961) : eval()'d code 34 errorHandler->error_callback
/global.php 961 eval
/showthread.php 28 require_once
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 43 - File: showthread.php(1621) : eval()'d code PHP 8.2.2 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1621) : eval()'d code 43 errorHandler->error_callback
/showthread.php 1621 eval




Themabewertung:
  • 5 Bewertung(en) - 5 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Diskussionsthread - CarPi/CarPC Image 2016 (Raspbian Jessie, Kodi 15.2)
/Edit:
Ok habs hinbekommen.

/opt/carpc/startup/radio_config.py
Code:
import socket
import threading
import time

time.sleep(10)

UDP_IP = "127.0.0.1"
UDP_PORT = 5005

# Path to stations preset file
file = open('/home/pi/.kodi/addons/plugin.program.radioFM/resources/stations','r')
# Read the stations file into string and close it
data = file.readlines()
file.close()
# Take first line from station list and split it up by spaces
item = data[0]
requestedFrequency = item.split(' ')
# Use the first value of the split string for first station to tune radio to

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto("radio_tune_" + requestedFrequency[0] + "\0", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))
sock.sendto("radio_volume_plus", (UDP_IP, UDP_PORT))

sock.close()

Eigentlich müsste es auch gehen 1x "radio_volume_15" auszuführen, aber das frisst er nicht. Dafür halt 14x "radio_volume_plus".

Am Ende von /opt/carpc/startup/StartCarPC_stage2
Code:
# Set Radio freq and vol
sudo python radio_config.py
CarPi: RPi 3 mit 7" RPi Touchscreen & PiUSV+, Jessie, Kodi 15.2
Testing: Raspbian Jessie mit Kodi 15.2 - Step by Step
Projekte: SmartHome, Ambilight


Nachrichten in diesem Thema
RE: Diskussionsthread - CarPi/CarPC Image 2016 (Raspbian Jessie, Kodi 15.2) - von cbrauweiler - 12.03.2016, 20:02

Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 24 Gast/Gäste
RasPiCarProjekt