あとは%CHID%取れてるなら、こんなコマンドの戻り値を使うとか

curl http://mirakurun.local:40772/api/services/{chid} | jq '.channel.type'