The SDK itself stores some data on the flash at an address of its chosing. Precisely where depends on how you've actually flashed your code. The SDK info is stored at 0x7c000 if you've flash it as a 512KB flash device, or 0xfc000 if you've flash it as a 1MB flash. If you've flashed it as a 4MB device it'll be at 0x3fc000.
If you don't know which you've flashed it as it'll probably be as a 512KB or 1MB device.
What you can then do is, once you've flashed your program and run it the SDK will probably have initialized this data - so you can read off what it's initialized it as, and change the appropriate byte, and then flash this back,
Something like:
esptool.py read_flash 0x7c000 0x1000 /tmp/flash.bin
This will read 0x1000 (4KB, 1 sector) of data into the file /tmp/flash.bin
Then use hexedit, or some other hex editor to tweak the byte indicated.
Then flash this back to the device:
esptool.py write_flash 0x7c000 /tmp/flash/bin
There may well be an easier way with the IDE!
esp8266 otb-iot documentation - https://otb-iot.readthedocs.io/
esp8266 related blog - http://www.packom.net/