{"swagger":"2.0","info":{"description":"This API enables interfacing to an ESP32 webserver connected to an IGD 2-wire device","version":"1.0.0","title":"2-Wire REST","contact":{"email":"thomas.finch@internationalgasdetectors.com"}},"tags":[{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/settings/channelstateandaddress":{"get":{"tags":["developers"],"summary":"read channel state and address","produces":["application/json"],"parameters":[{"in":"query","name":"addr","description":"address","required":true,"type":"integer","format":"int16"},{"in":"query","name":"index","description":"channel index","required":true,"type":"integer","format":"int8"}],"responses":{"200":{"description":"OK - Valid response","schema":{"type":"object","properties":{"channelstate":{"type":"string","example":"ENABLED","description":"Channel state e.g. NOT_PRESENT, DISABLED, ENABLED, ENABLED_PAIRED etc."},"channeladdr":{"type":"integer","example":5,"description":"Channel address"}}}},"400":{"description":"Bad Request - Invalid parameters provided by client"},"500":{"description":"Internal Server Error - serial communications problem"}}}},"/concentration/24bitflags":{"get":{"tags":["developers"],"summary":"read concentration with 24 bit value and status flags","description":"","produces":["application/json"],"parameters":[{"in":"query","name":"addr","description":"address","required":true,"type":"integer","format":"int16"},{"in":"query","name":"index","description":"channel index","required":true,"type":"integer","format":"int8"}],"responses":{"200":{"description":"OK - Valid Response","schema":{"type":"object","properties":{"conc":{"type":"number","example":1.2,"description":"24-bit float representation of concentration"},"sensorflag":{"type":"string","example":"NOT_SET","description":"Sensor status e.g. IN_WARMUP, UNDER_RANGE, SENSOR_FAULT, NOT_SET etc."}}}},"400":{"description":"Bad Request - Invalid parameters provided by client"},"500":{"description":"Internal Server Error - Serial communications problem"}}}},"/mode/bypasscommands":{"post":{"tags":["developers"],"summary":"start cable bypass mode","description":"Sets device into cable bypass mode, enabling commands to be sent to different cable","consumes":["application/json"],"produces":["empty"],"parameters":[{"in":"body","name":"JSON body","required":true,"schema":{"type":"object","properties":{"addr":{"type":"integer","example":255,"description":"Address of 2-wire node"},"cable":{"type":"integer","example":2,"description":"Cable to bypass commands to"}}}}],"responses":{"200":{"description":"OK - Valid response"},"400":{"description":"Bad Request - Invalid parameters provided by client"},"500":{"description":"Internal Server Error - Serial communications problem"}}}},"/mode/normal":{"post":{"tags":["developers"],"summary":"start normal mode","description":"Stops bypass mode, redirects commands to cable 0","consumes":["application/json"],"produces":["empty"],"parameters":[{"in":"body","name":"JSON body","required":true,"schema":{"type":"object","properties":{"addr":{"type":"integer","example":255,"description":"Address of 2-wire node"},"selftest":{"type":"integer","example":1,"description":"0 - Perform test, 1 - Don't perform test"}}}}],"responses":{"200":{"description":"OK - Valid response"},"400":{"description":"Bad Request - Invalid parameters provided by client"},"500":{"description":"Internal Server Error - Serial communications problem"}}}}},"schemes":["http"],"host":"ip_addr_2-wire_server","basePath":"/api"}