Update textbox content from other thread

ok, api tests are now working, with:

curl -X POST http://127.0.0.1:7861/api/turn_off -H ‘Content-Type: application/json’ -d ‘{“data”: [“Rel 1”]}’

the above function turn_off_relay(id) was called