Login |  Register



Welcome
Welcome to engineeringdiy

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today!


Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Preset Radio Stations
PostPosted: Sun Jan 18, 2015 6:53 pm 
User avatar
Joined: Thu Oct 16, 2014 6:33 pm
Posts: 12
Location: Germany Wiesbaden
Hi,

where can i set the Radio-start-Station such as 105,9 ? default is 106,7 and the start volume? default is 0
I habe found this path: /home/pi/.xbmc/addons/plugin.program.radioFM/resources
for Radio Stations, but not the on start Radio Station.

regards Tauri


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Sat Jan 24, 2015 6:47 pm 
Joined: Thu Jan 01, 2015 10:55 am
Posts: 115
I want to know this also


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Wed Jan 28, 2015 4:50 pm 
User avatar
Joined: Tue Nov 11, 2014 8:51 am
Posts: 75
Location: Regina, Sk, Canada
+1 me aswell


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Tue Feb 03, 2015 5:37 pm 
Joined: Sat Jan 10, 2015 5:07 pm
Posts: 50
Location: Paderborn, Germany
just found a possible solution for your problem:
the 106,7 is hardcoded into carpc-controller. Just look into the sourcecode. File "cmd.cpp"
You could try to change it by editing that value and recompile the carpc-controller.

I did not try it, but it could be a solution.


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Thu Feb 12, 2015 2:03 am 
Joined: Fri Jan 16, 2015 3:07 am
Posts: 5
I created a python script that reads the preset stations list and tunes it to the first one just after start up. I created a file using the following code and then put a command to run it in the StartCarPC_stage2 file just after the gpio_description launches.

-------------------------------

import socket
import threading
import time


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.close()


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Thu Feb 12, 2015 8:35 pm 
User avatar
Joined: Thu Oct 16, 2014 6:33 pm
Posts: 12
Location: Germany Wiesbaden
Hi godzra,

perfect it works great!

Many thanks.

Regards Tauri.


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Thu Feb 12, 2015 11:41 pm 
Joined: Fri Jan 16, 2015 3:07 am
Posts: 5
You're welcome. Trust me, I struggled for hours with the same issue until I figured out how to do this.


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Fri Feb 13, 2015 7:56 am 
Joined: Thu Jan 01, 2015 10:55 am
Posts: 115
Awsome :) Then it must be possible to add to the script so it set the volume also for example level 3 or 4 ?


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Mon Mar 09, 2015 7:58 am 
Joined: Thu Feb 26, 2015 9:11 pm
Posts: 26
Hi could someone please explain to me how to go about getting that script to work as i cant seem to get it right ive created a file with python and saved that on the RPI then added what i think a start command should look like to the StartCarPC_stage2 but it still does not want to work so i know im doing something wrong


Report this post
Profile  Offline
 
 Post subject: Re: Preset Radio Stations
PostPosted: Mon Mar 09, 2015 9:25 am 
Joined: Thu Jan 01, 2015 10:55 am
Posts: 115
I have the same problem.


Report this post
Profile  Offline
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 1 guest

Panel

Top You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Search for:
Jump to:  


cron
suspicion-preferred