Help getting started with ST (custom Arduino+Ethernet device: how to connect it to ST?)

Everything is done in DTH. there is no smartapp.

In DTH:
device.deviceNetworkId = settings.mac;

From my experiments I figured out how it works:

  1. you set device.deviceNetworkId = settings.mac; Now ST knows that your DTH is associated with physical device which MAC address is DEADBEEFFEED for example.
  2. Device (Arduino) issues a POST http request to hubIP:39500 with some data (I used JSON) (see sendNotify(EthernetClient client) in arduino code)
  3. ST Hub listens on port 39500 for any incoming http requests.
  4. ST Hub receives POST requests and determines that it is incoming from some device with MAC address DEADBEEFFEED for ex.
  5. Because DEADBEEFFEED is associated with our Garage DTH, ST parses and sends that request to parse() method of Garage DTH.
  6. Do your magic in parse() method.