# Webthing addon with java

**URL:** <https://discourse.mozilla.org/t/webthing-addon-with-java/72242>\
**Category:** WebThings\
**Created:** [December 15, 2020, 7:41pm UTC](https://discourse.mozilla.org/t/webthing-addon-with-java/72242 "2020-12-15T19:41:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.chrust](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@michal.chrust](https://discourse.mozilla.org/u/michal.chrust)\
**Post date:** [December 15, 2020, 7:41pm UTC](https://discourse.mozilla.org/t/webthing-addon-with-java/72242/1 "2020-12-15T19:41:45Z")

</div>

Hi,  
I wanted to download & run mocked web thing and connect it to my server set on raspberry pi. Firstly I downloaded sample code from below repository and run this app, then I tried to connect it by webthing addon. Unfortunately, it cannot connect and after further investigation, I still don’t know why. I used following url to connect it to my app:  
[http://192.168.0.15:8888](http://192.168.0.15:8888)  
where 192.168.0.15 is my internal ip, and 8888 is the port on which I run my application. The host on which I run my app is mac big sur, webthing server I have set on raspberry pi.

What is done incorrectly in the following statement? Please find me as a beginner, not only in Webthings but also in computer science, therefore I understand that reason can be trivial and obvious for some of you.

> **[GitHub - WebThingsIO/webthing-java: Java implementation of a Web Thing server](https://github.com/WebThingsIO/webthing-java)**
>
> Java implementation of a Web Thing server

---

<div class="post-metadata">

**Author:** ![bfrancis](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/bfrancis/32/43355_2.png) [@bfrancis](https://discourse.mozilla.org/u/bfrancis)\
**Post date:** [December 16, 2020, 1:21pm UTC](https://discourse.mozilla.org/t/webthing-addon-with-java/72242/2 "2020-12-16T13:21:10Z")

</div>

Hi Michal, welcome.

Are you able to connect to your mocked device using another means in order to debug it?

The [curl-example](https://github.com/WebThingsIO/curl-examples) repository provides some examples of how to communicate with a device using the curl command line tool.

[Postman](https://www.postman.com/) is a useful graphical tool for composing and sending HTTP requests.

You can also open developer tools in Firefox/Chrome by pressing F12 and inspect the HTTP requests going back and forth in the Network tab to look for errors.

I recommend using Postman.

You could start by sending a GET request to your thing URL ([http://192.168.0.15:8888](http://192.168.0.15:8888)) and see whether it responds with its thing description. You’ll need to set an “Accept” header to “application/json” in your HTTP request to tell the web thing server that you would like a JSON response.

---

<div class="post-metadata">

**Author:** ![michal.chrust](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@michal.chrust](https://discourse.mozilla.org/u/michal.chrust)\
**Post date:** [January 23, 2021, 10:54am UTC](https://discourse.mozilla.org/t/webthing-addon-with-java/72242/3 "2021-01-23T10:54:39Z")

</div>

Thank you for your advices. My problem was noob worthy, it was connected with a security issue on my company computer. Please forgive me for making unnecessary troubles.
