Home/Support/Support Forum/Freeboard Error
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Freeboard Error

0 votes
Hi.

I try to recreate this project and followed the steps, but when i test the Push Monitor in api explorer it appears inactive, and from there on i can't run the Freeboard app.
Can anybody gave me advice where could i be wrong?
https://www.digi.com/resources/documentation/digidocs/pdfs/90002251.pdf

Those are the steps i make

1.Create a Push Monitor in api explorer digi manager
<Monitor>
<monTopic> DataPoint/dia/channel/00000000-00000000-00409DFF-FF6BA6D5/router/temperature </monTopic>
<monTransportType>http</monTransportType>
<monTransportUrl>https://dweet.io/dweet/for/00000000-00000000-00409DFF-FF6BA6D5-router-temperature</ monTransportUrl>
<monFormatType>json</monFormatType>
<monBatchSize>1</monBatchSize>
<monCompession>none</monCompession>
<monBatchDuration>1</monBatchDuration>
<monTransportMethod>POST</monTransportMethod>
</Monitor>

https://dweet.io/get/dweets/for/00000000-00000000-00409DFF-FF5C525A-router-temperature


2. Test the Push Monitor in api explorer digi manager

<?xml version="1.0" encoding="ISO-8859-1"?>
<result>
<resultTotalRows>2</resultTotalRows>
<requestedStartRow>0</requestedStartRow>
<resultSize>2</resultSize>
<requestedSize>1000</requestedSize>
<remainingSize>0</remainingSize>
<Monitor>
<monId>765614</monId>
<cstId>22067</cstId>
<monLastConnect>2019-07-05T13:39:34.827Z</monLastConnect>
<monLastSent>2019-06-25T09:50:45.890Z</monLastSent>
<monTopic>DeviceCore</monTopic>
<monTransportType>tcp</monTransportType>
<monTransportUrl>http://fakehost/dashboard/fakeendpoint</monTransportUrl>
<monFormatType>json</monFormatType>
<monBatchSize>1000</monBatchSize>
<monCompression>zlib</monCompression>
<monStatus>INACTIVE</monStatus>
<monBatchDuration>1</monBatchDuration>
<monDescription>DHD session cache: 4e46dd92461e92c6aee1d363ec1795c7</monDescription>
<monAutoReplayOnConnect>false</monAutoReplayOnConnect>
<monAckOption>explicit</monAckOption>
</Monitor>
<Monitor>
<monId>850502</monId>
<cstId>22067</cstId>
<monLastConnect>2020-04-22T12:08:26.583Z</monLastConnect>
<monLastSent>2019-10-19T14:07:30.623Z</monLastSent>
<monTopic>DeviceCore</monTopic>
<monTransportType>tcp</monTransportType>
<monTransportUrl>http://fakehost/dashboard/fakeendpoint</monTransportUrl>
<monFormatType>json</monFormatType>
<monBatchSize>1000</monBatchSize>
<monCompression>zlib</monCompression>
<monStatus>INACTIVE</monStatus>
<monBatchDuration>1</monBatchDuration>
<monDescription>DHD session cache: a348a17d470f80878f657093b00dbf27</monDescription>
<monAutoReplayOnConnect>false</monAutoReplayOnConnect>
<monAckOption>explicit</monAckOption>
</Monitor>
</result>

3. Perform a GET to https://dweet.io/get/dweets/for/00000000-00000000-00409DFF-FF5C525A-router-temperature to get the last five data points.
{"this":"failed","with":404,"because":"we couldn't find this"}



Can i upload files in this forum?
asked Jun 1, 2020 in Web Services by Martin91 New to the Community (19 points)

Please log in or register to answer this question.

2 Answers

0 votes
The Monitor you attempted to create in step 1 is not displayed in step 2. Be sure you have the path set to /ws/Monitor, the HTTP method set to POST, the content in the edit box, and then select the Send button. The response should display to the right and verify it has a 200 HTTP response code.
answered Jun 1, 2020 by pamw New to the Community (2 points)
According to the pdf, step 2 shows the results, that the monitor is active (    <monStatus>active</monStatus>),
but in my case is not (    <monStatus>INACTIVE</monStatus>), so it is different from the monitor in step 1.

My path is set to /ws/Monitor.

According to the pdf, the HTTP method had to be set to GET (i try the POST method too, but also received error).
0 votes
It doesn't look like you created any monitor, so I think you made a mistake on step 1.
You have to POST that payload in the API explorer or using your favorite Web service API tool.
Also I notice that the payload has a few extra spaces in it so take care to look for errors when you post the <Monitor> payload to create the first monitor.

In step 2:
The monitors that you're showing are internal monitors (used by the dashboard) to process changes to devices and are not one created manually by you.
answered Jun 1, 2020 by fkulack New to the Community (1 point)
Every tool does web APIs a bit different. In powershell the command to call a web API is "Invoke-RestMethod". You'll have to do some searching on the syntax because its quite different than the way you do it in curl.
Here is the microsoft documentation on the Invoke-RestMethod API. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.1
I try the command ''Invoke-RestMethod'' and ''Invoke-WebRequest'', but in PowerShell the commands is also unrecognizable. Any help?
I've noticed that in digi remote manager- event log i receive messages with url address from the Digi cloud kit. So, i try to use this address in Freeboard (with JSON data source), in order to obtain sensor data, directly from the https://xbeegateway.herokuapp.com/api/monitor , but  i don't receive no data. Is my idea possible?
I'm not a powershell user so I don't have any advice on that. Perhaps try another Web API client that you're more familiar with.
I update the PowerShell and now, when i use  curl https://dweet.io/listen/for/dweets/from/thing name  i've got '''request time out'' response and i can't get  the ''listen'' response. Any help?
...