Hi all,
I’m developing a very simple temperature and humidity Web Thing based on a NodeMCU board with NodeMCU firmware. LUA code for the project can be found on GitHub here.
Long story short: Mozilla Gateway cannot find my Thing during discovery and when I manually insert my thing’s URL.
I’ve followed a very naive approach in supporting REST APIs, consisting of a simple “manual” parsing of the request to identify the corresponding REST resource to manage, so it is possible that the root cause is somewhere here.
- By accessing the thing from a browser using its URL (say: http://192.168.0.2) it correctly provides me the JSON of the Thing resource.
- The Thing resource provides the links to the properties (e.g., “links”: [{ “href”: “/things/temphumi/properties/temperature” }]), so they should be there and accessible
- Using the web browser to debug REST APIs I correctly see the expected results (JSON content).
I think I’m missing something very trivial here. Here are my questions:
- Is there any minimal reference REST reply that a Thing must provide to be correctly discovered by the Gateway?
- Is there any log file I can check on the Gateway to get more info about what is going wrong during the discovery? Is there any debug procedure I can check to understand if there is something in my thing’s reply that is not accepted by the Gateway?
- I’m using mDNS to advertise the presence of my node on the network. However, automatic discovery seems to fail, since I’m not seeing any request on the node (btw, I’m connected to the node by means of a serial line, so I can debug any received request), which suggests me that I’m also missing something on the automatic discovery part.
Any suggestion or comment is very welcome!
Kind regards,
Alessandro