Universal IR Remote for Mac to control Media Player

First of all, I am not good in English, but I am programmer. :)

Idea Detail: For long story short, I want use a custom IR remote to control iMac & LED Strip.

  • iMac Volume Inc & Dec
  • iMac Display Brightness
  • iMac Media Player Play / Pause
  • (optional) iMac Volume Mute
  • (optional) iMac Full Screen On / Off
  • LED Strip Light On/Off

Solution - A (Ideal) :

  • ATtiny85 (or ATtiny45) using V-USB as HID Keyboard
  • 5 Pins available on ATtiny85 / 45
  • 2 Pins For USB D+ & D-
  • 1 Pin For IR Receiver
  • 1 Pin For controlling LED Strip via BC337 / S8050
  • Leave PB5 as Reset Pin
  • Challenge: How to send out the KeyCode (Volume & Brightness). Also I have no experience on AVRDUDE CLI

Solution - B (Trying) :

  • ATtiny85 (or ATtiny45) with USB Serial
  • 5 Pins available on ATtiny85 / 45
  • 2 Pins For TTL TX & RX
  • 1 Pin For IR Receiver
  • 1 Pin For controlling LED Strip via BC337 / S8050
  • Leave PB5 as Reset Pin
  • ATtiny will send out a CMD (just a string / char via USBTTL) to iMac, a Serial listener will monitor the incoming message.
  • Challenge: Which language / way to control the Volume & Brightness. I have experience on listening message using Python. But I have not found the way to control iMac.
  • Try a Python library to simulate the Keyboard key press, but unfortunately, there are no Mute, VOL+, VOL-, DispBr+ & DispBr-.

Something on hand:

  • ATtiny85 DIP
  • ATtiny45 SMD
  • IR LED Sender (850nm & 940nm)
  • IR Receiver (VS1838 & HS0038B)
  • LED Strip
  • S8050 & BC337

Long Story: I have iMac & projector in my room. But I did not have the Apple Remote on hand. I had tried POC: Replay the Apple Remote IR Codes using ATtiny85. But I got troubles

  • Unstable, seems not work all the time
  • Unable to control the Display Brightness

Question: 1) How to convert the USB Serial message to iMac command (Volume, Play/Pause & Brightness)? 2) How to which programming language can archive that?

I have got another POC, will update here while it is fully ready.