IO.T.WebThing - always "disconnected"

I have installed “Mozzila.IoT.WebThing” on Visual Studio .netCore.

The communication with the two test examples works, but in the Gateway, their status is always “greyed out” = “disconnected”.

Do you have any idea where to look for that error?

Do other (non-webthing) devices work? If you need something to test with, you could install the “Virtual Things” add-on.

Yes, i have two ESP8266 boards running, but i working on a new adapter, and would like to develop it in C#.

The gateway find the new adapter perfect, but it keeps saying “Disconnected”.

Just now i’am adding mDNS to the Examples “FakeHumidity” and “ExampleDimmableLight”…

It’s possible that mDNS isn’t working properly. Try this:

  1. Remove your broken devices. Open each device, click the 3-dot menu in the lower right, then click “Remove”.
  2. On the main Things screen, click the + button in the lower right.
  3. For each device, click “Add by URL…” and enter the URL of the device, e.g. http://<ip-address>:<port>/<path>, then click Save.

This will bypass mDNS.

I tried, manuel add,
then it starts out online, but after 10 sec. it goes offline, but the communication, and other functions seems to work.

Thanks for filing an issue to the library, I was just going to suggest that. :smiley:

How does the gateway register a Thing as “disconnected”.

The C # example “Mozzila.IoT.WebThing” does not implement Websockets, but communicates via Rest-Api.

If communication is Rest-Api, how does the gateway register Things as “connected”.

The thing will be marked as disconnected when one of these things happens:

  • The mDNS service announcement disappears
  • The WebSocket is closed (for devices that support WebSockets)
  • An error occurs while polling properties/actions/events (for devices that do NOT support WebSockets) - a log message occurs in this case, containing Failed to poll device: <error message>
1 Like