Help with curl, echo and grep

I have a beginner question.
I want to know if it is 1 or 0 the value of a string that I get by curl on a website:

click:
curl "http: // admin: password@192.168.15.107/io.cgi?"

Answer back:
relays 0000

outputs 00000000

inputs 00000000

I want to know if the relay in position 4 is a one or zero.

relays 0000 -> 0

relays 0001 -> 1

Can it be done with a grep or something?

I have tried this:

echo $ {curl "http: // admin: password@192.168.15.107/io.cgi?": 10: 1}

But it gives me error.