I hope this is the right spot for this, if not please let me know and I’ll repost it. I have a Pioneer SC-25 receiver I have been trying to get working with HASSio. Unfortunately because of its age I can’t use the Pioneer component as is. First off, my receiver does not IP control. I was able to get around that using a raspberry pi with a USB to serial adapter and by running a script to go from IP to serial. Unfortunately, I’ve run into another roadblock. The Pioneer component queries the receiver to build a dictionary of source names and numbers using the command ?RGB. My receiver doesn’t support this command. I’m hoping there is a way I can modify the component and hard code in my source names.
Here is the relevant section of the pioneer,py file (I think):
# Build the source name dictionaries if necessary
if not self._source_name_to_number:
for i in range(MAX_SOURCE_NUMBERS):
result = self.telnet_request(telnet,
"?RGB" + str(i).zfill(2),
"RGB")
if not result:
continue
source_name = result[6:]
source_number = str(i).zfill(2)
self._source_name_to_number[source_name] = source_number
self._source_number_to_name[source_number] = source_name
I decided to try my hand and manually add the source name and number to the code. Here’s what I changed it to:
# Build the source name dictionaries if necessary
"""if not self._source_name_to_number:
for i in range(MAX_SOURCE_NUMBERS):
result = self.telnet_request(telnet,
"?RGB" + str(i).zfill(2),
"RGB")
if not result:
continue"""
result = 'RGB020Chromecast'
source_name = result[6:]
source_number = '20'.zfill(2)
self._source_name_to_number[source_name] = source_number
self._source_number_to_name[source_number] = source_name
result = 'RGB021Steam'
source_name = result[6:]
source_number = '21'.zfill(2)
self._source_name_to_number[source_name] = source_number
self._source_number_to_name[source_number] = source_name
As you can see I just commented out the section that scans, and tried manually defining the source number and name. I saved this as “Pioneer2,py” in /config/custom_components/media_player. I then added this section to my configuration.yaml:
media_player:
- platform: pioneer2
host: raspberrypi
port: 8102
This seems to be partially working. My receiver now appears on my main page and I can see if it is powered on. If it is on and I’m one of the two inputs I have manually defined, it also shows the input name. If I send a general media_play turn off service call my receiver turns off. I set up a test automation and I can change the input on the receiver. Unfortunately though, I am not seeing any controls on the main page. I don’t see any source selection or power buttons, volume control, etc. Any ideas? I’m in way over my head with python here, I’ve basically been trying different things until they work and have made it this far. I’m wondering if something that is normally included when using the official component is left out when I made it a custom component. If I use the normal pioneer component I can control my receiver from the main page. I get a working power button and volume control. It also has drop down for the source but it does not work as it cannot build the dictionary. Also I feel it’s worth mentioning the pioneer,py file I’m using was one I saved 5 or 6 months ago. Since then I redid my HASS installation and went with HASSio. I was not able to find the pioneer,py file.