For the receiver, you can remove the stale-match risk instead of guarding against it, because it takes absolute commands. Denon's published telnet protocol has SIBD to select Blu-ray and PWON to power on, and each one names the target state rather than flipping the current one. So I'd send SIBD even when the read says already, then confirm on port 23. It's still one command per step, not a resend, and a stale HTTP value can now only delay the confirmation. It can't skip the step and log a success.
Read before send stays the right rule for the recorder, where the only key is a toggle and a wrong read turns it back off. Sorting each device by whether its command is absolute or a toggle tells you where a read has to gate the send and where it only confirms the result.
For the receiver, you can remove the stale-match risk instead of guarding against it, because it takes absolute commands. Denon's published telnet protocol has SIBD to select Blu-ray and PWON to power on, and each one names the target state rather than flipping the current one. So I'd send SIBD even when the read says already, then confirm on port 23. It's still one command per step, not a resend, and a stale HTTP value can now only delay the confirmation. It can't skip the step and log a success.
Read before send stays the right rule for the recorder, where the only key is a toggle and a wrong read turns it back off. Sorting each device by whether its command is absolute or a toggle tells you where a read has to gate the send and where it only confirms the result.