This type of opto-triac is mostly used in mains voltage applications. Due to the limited current capabilities it's often used as a driver for a triac which is the actual switching device. Your requirements are modest, so you won't need that, and you can use the opto-triac to switch your load directly. The opto-triac is a cheaper solution than an electromechanical relay then, so at first sight looks like a better choice.
An important difference between electronic and electromechanical switches, however, is that the latter have a very low on-resistance, while the former always will have a voltage drop when switched on. That's the on-state voltage mentioned in the datasheet. This can be up to 3V, which in a 230V application won't matter much, but if your supply voltage is only 24V AC that's more than 10%. Your load will probably work at 21V, but you'll have to check it.
Repetitive peak off-state current is the leakage current when the triac is switched off. 2\$\mu\$A is a safe value.
Holding current is the minimum load current the triac needs to remain on when the gate is no longer driven. For an average triac your 20mA may be a bit low, but again the opto-triac's 3.5mA is a safe value. (Besides, the gate will be continuously driven, so it's a moot point. It is important in four-component dimmers, where the diac gives a pulse to switch on the triac, after which the triac is on its own.)
Then there is the minimum trigger current. That's the minimum current you have to supply to the LED to switch the triac on, and we'll have to calculate the series resistor accordingly.
Where did you get that 38\$\Omega\$ resistor value? You need figures 3 and 4 to calculate the value for the LED resistor. Figure 4 shows that 10mA is a safe value, and figure 3 shows that at 10mA the LED voltage will be maximum 1.3V. So \$R=\frac{3.3V - 1.3V}{10mA}=200\Omega\$ maximum. Your 38\$\Omega\$ would result in more than 50mA, which is not only more than Absolute Maximum Ratings (page 4), but also more than your microcontroller will be able to supply. So don't exaggerate, and pick a 180 \$\Omega\$ resistor. At lower resistances the current may become too much for your microcontroller's output. If you want more current through the LED (no more than 20mA, never use the Absolute Maximum Ratings!) you may want to use a transistor. Since you'd need a lot of them, consider a driver IC like an ULN2803.
In conclusion I think this opto-triac is a good choice. Alternatively, you may have a look at the MOCxxx series, for instance the MOC3012 needs only half of the LED current, which your microcontroller would appreciate. It doesn't give a nominal value for triac current directly, but from maximum power dissipation (300mW) we can derive that this should be 100mA. (It says peak repetitive surge current is 1A, 120pps, 1ms pulse width.)
Yes, with the clarification I think that would work. Stereo closet has the mains power, one end of speaker wires and one end of a Cat5 cable. Remote location has other end of speaker wires and other end of Cat5. Low voltage power source (5-12v) applied to Cat5 in stereo closet, switch closed in remote location on Cat5 completes circuit and triggers relay, activating mains power to room amplifier. Input from audio source amplified by room amplifier and piped to remote location via speaker wires.
I think that you may want to consider a latching relay. A regular relay makes a connection when the coil is energized. You hook up the thing you are powering to the NO or NC contacts and when the coil gets power the thing you are powering is switched on or off as long as the coil is energized. A latching relay would allow you to leave the room amps on with the relay in a resting unenergized state. A regular relay is analogous to an invisible somebody standing there smashing down a momentary button for as long as you want the amp on, while a latching relay would be more the passive switch I think you have in mind.
Finding a suitable predone 8 channel, zero crossing, latching relay module could be a tall order. You may need extreme Google-fu or Digikey-fu. Or 8 1 channel models.
HTH.
Best Answer
Let's start with a simple model.
Your data sheet lists a maximum control current of 1 mA at 15V, which means the input acts like roughly a 15 kOhm equivalent resistance. What you want is a voltage divider that takes your 24V down to 15V, with a lower resistor of 15 kOhm.
$$ \frac{15 k\Omega}{15 k\Omega+x}= \frac{15V}{24V} \\ x=9 k\Omega $$
Now, that's your lower limit. Any less series resistance, and the voltage across the input will be over 15V and out of spec.
The data sheet also lists that the controls will pull a minimum current of .2 mA at 4.5V, which is a 22.5 kOhm equivalent resistance. In that case, you get a maximum dropping resistance of 97.5 kOhm. Any more than that and your voltage will be too low and out of spec.
The problem here is that we don't know what happens in between. The control current at 15V will not exceed the 1 mA spec. The data sheet doesn't say it can't be less than 1 mA at 15V, though. So what happens then? Suppose the control current is .5 mA. Now you only get a 4.5V drop across your 9 kOhm resistor, and your voltage is 19.5V, out of spec. The same problem applies to our maximum resistance if the controls draw more current than the specified minimum: your voltage will drop below spec.
Unfortunately we can't make any guarantees based on the information in the data sheet. All we can do is make some reasonable assumptions.
Let's assume the input response is linear between the two points provided. That means it's basically a diode with a resistor in series, which is not unreasonable. Taking the two voltages and currents they provide, you can model the input as a 1.875V constant drop and a 13.125 kOhm resistance. This lets us compute the terminal behavior at any operating point, not just the two provided. Of course, its behavior could be totally different, but it's the best we can do
Now we can ignore the terminal voltage and just worry about keeping the current between .2 mA and 1 mA. So you have a voltage drop of 24V - 1.875V = 22.125V across (13.125 + x) kOhm. We'll target .6 mA, middle of the range. A 23.75 kOhm resistor will hit that target.
I'd use a 22 kOhm. Even 1/16W should be fine.