cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Thing view property value receive from Mqtt Broker but not store that in value stream

Highlighted
Newbie

Thing view property value receive from Mqtt Broker but not store that in value stream

Hi All,

I need information about the following problem :

I used MQTT  extention in Thingworx (I have impoted the MQTT estention) and I created a Thing using  Thing Template MQTT.

I have configured the connection Mqtt to Broker mosquitto using serverName test.mosquitto.org

I have  developed a Mqtt published publisher.exe using  C#.

I checked the system and Thingworx has received the values published from publisher.exe.

The property value on Thingworx was defined  as STRING with persistent and logged enabled.

The property values  published from publisher.exe are visible on Thing property (by refresh) or in mashup that used GetData service (GetProperty + convert string value to number) that refresh the value every every 5 second.

When I want to look the property value using a widget  Time Series  Chart by QueryPropertyHistory I’m not found value in value stream.

The property value was received from the MQTT broker but they  are not stored in value stream, Why ?

Is needed  particularly configuration ?

Many Thanks

BR

Dimitri

Tags (1)
20 REPLIES 20

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Dimitri! Have you checked the properties as "Logged"? It is required to push them to the Value Stream.

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Adam,

many thanks for your answer.

The Property of thing  have persistent and logged enabled.

BR

Dimitri

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Adam,

I checked the Application Monitoring and I received the following message (I think for any value received from Broker).

These message could be the reason that the value stream was not loaded ?

BR

Dimitri

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

It certainly can be the issue. I've looked more deeply into the MQTT Extension and found the line with this error. It is not clear, but can be associated with baseType of the value. Try to change it from String to Numeric or Integer in Thing property.

BR,

Adam

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Adam,

I have changed the basetype of property from STRING to NUMBER (I restarted the web server Apache/Tomcat) but the problem is not solved.

Thingworx received the new property value but not stored it into values stream.

BR

Dimitri

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Dimitri,

Can you specify which version of ThingWorx are you using and which database?

And one more thing is that you are calling QueryPropertyHistory service on Thing or on the ValueStream?

BR,

Adam

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Adam,

I'm using :

1)  the version 7.2.3-b48 of Thingworx

2) the H2  database 

3) the service  QueryPropertyHistory on Thing.

BR

Dimitri

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Dimitri,

Have you tested a QueryPropertyHistory service directly from the Thing with your parameters or with default ones? If the Thing is receiving data and storing it in property without problems, there should be no problem with ValueStream also.

5.PNG

You also test it, by changing a property value by yourself. Just click on SET button in the Value column in your property row. Change the value few times and check if it is stored in ValueStream.

BR,

Adam

Re: Thing view property value receive from Mqtt Broker but not store that in value stream

Hi Adam,

I have tested the QueryPropertyHistory on the Thing with parameters value and without value, but the output it's the same. Empty.

If I change  the  property value using button set (in Panel Property of Thing)  the values are  stored the values on value stream.

The output of QueryPropertyHistory is now not empty

The previous image are referred to the output of QueryPropertyHistory after manual setting.

Why this process does'nt work for data received from Mqqt Broker ?

Br

Dimitri

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________