API: Can't transmit IR commands except using use_scan

(Note: this is all using the API on a Bond Home running firmware v2.15.8.1)

When trying to send an IR command using the signal/tx API, I get a “frequency out of range” error.

curl [...]/v2/signal/tx -d '{
"freq": 38,
"modulation": "OOK",
"encoding": "hex",
"bps": 40000,
"reps": 1,
"data": [...]
HTTP/1.1 400 Bad Request
Content-Length: 56
Content-Type: application/json; charset=utf-8

  "_error_id": 30,
  "_error_msg": "frequency out of range"

It seems like any frequency below 300000 returns this error. However, if I scan the same command + send using signal/tx with “use_scan”: true, it works fine. It seems like there’s a validation error.

I tried to repro this, but it works for me.

Testing on a unit (serial number starting with ZZ), version v2.28.0 firmware:

curl -iH "Bond-Token: 5exxxx52efb09a4a" -X PUT -d '{"freq":38,"modulation":"OOK","encoding":"hex","bps":40000,"reps":1,"data":"FF00FF00FF00"}

HTTP/1.1 204 No Content
Content-Length: 0

Looking at the source code, I don’t see why this wouldn’t work on v2.15.8.1. Anyways, you could upgrade to more recent firmware. If you have a “Snowbird” unit (serial number starting A or B) then you’ll need to use the “beta” firmware channel and be warned that there’s a chance of data loss with an upgrade of those Snowbird units.