I’ve been trying to work out the best (quickest) way to upload IR codes into Entities on my new Remote 3.
The GlobalCache code sets are great but in the wrong format, so I wrote some code to convert them quickly. See Below
This is designed to be run on https://colab.research.google.com/ which allows free accounts so it should let anyone do a quick convert of a GlobalCache CSV File.
Instructions
- Go here and select the data SET you want Database | Global Caché Control Tower
- Check your email and copy and paste the data set to a file called something like SamsnugTV.csv
- Run the code
- Upload the CSV File
- Wait a few seconds and it will auto download a UC-file.csv with the converted IR codes into the correct format to upload into Entities in the UC interface.
- Go to your remote interface
- Create new IR with EMPTY IRs
- Upload the UC-File.csv
- You should now have a fully working Entity with all the codes from GlobalCache
- Ensure the Dock is set to IR Blast on at least one IR Port
Hope this is useful to others.
p.s. think it might be a good idea to have a page on the forum for Converted CSVs aka a Database for others to share.
import pandas as pd
from google.colab import files
import os
# Upload the input CSV file
print("Please upload your CSV file")
uploaded = files.upload()
# Get the name of the uploaded file
if not uploaded:
print("No file uploaded. Please try again.")
raise SystemExit
input_file = list(uploaded.keys())[0]
output_file = 'UC-' + input_file
print(f"Processing file: '{input_file}'")
# Read the input CSV
try:
df = pd.read_csv(input_file)
except FileNotFoundError:
print(f"Error: '{input_file}' not found after upload. This is unexpected.")
raise
except Exception as e:
print(f"Error reading '{input_file}': {str(e)}")
raise
# Normalize column names (strip spaces, convert to lowercase)
df.columns = df.columns.str.strip().str.lower()
# Check if required columns exist
required_columns = ['function', 'hexcode1']
if not all(col in df.columns for col in required_columns):
print(f"Error: Missing columns. Available columns: {df.columns.tolist()}")
raise SystemExit
# Rename columns
df = df.rename(columns={'function': 'key', 'hexcode1': 'code'})
# Clean up the 'code' column: remove leading/trailing spaces and quotes
df['code'] = df['code'].str.strip().str.strip('"')
# Add 'format' column with static value 'PRONTO'
df['format'] = 'PRONTO'
# Select only the required columns
df = df[['key', 'format', 'code']]
# Save to new CSV
try:
df.to_csv(output_file, index=False)
print(f"Conversion complete. Output saved to '{output_file}'.")
# Download the output file
files.download(output_file)
except Exception as e:
print(f"Error writing to '{output_file}': {str(e)}")
print("DataFrame content (you can copy this if file saving fails):")
print(df.to_csv(index=False))
# Optional: Display the DataFrame for verification
print("\nOutput DataFrame preview:")
print(df.head())
Edit 2nd July 2025 Updated the code above to remove extra spaces and " from the HexCode that appear in several of GlobalCache Sets of data causing upload problems