Skip to main content
Jun 8, 2022 10:58 AM UTC
Solved

Datachange event not firing with MQTT

As per this thread- same issue:

 

Hi @PaiChung 

 

I am doing the exact same exercise. I've already changed the property aspect to Always. Still my property values do not update. Is this a permissions issue? Do I need to do something differently?

 

Many Thanks

JanicenAnswer
Jun 9, 2022 9:45 AM UTC

Just to give some context, the exercise I am doing is on a ThingWorx server.

I have values coming from MQTT and it updates the JSON. I have written a service that takes JSON values and passes them to the respective thing property. A subscription calls this service. The values on the property are not still updating. Even after I gave run time permissions to the system user. I've also got a persistent provider, are there any changes that I need to make on this?

Is there something I am overlooking ?

 

Any suggestions is much appreciated.

2 replies

JanicenAuthorAnswer
Jun 9, 2022 9:45 AM UTC

Just to give some context, the exercise I am doing is on a ThingWorx server.

I have values coming from MQTT and it updates the JSON. I have written a service that takes JSON values and passes them to the respective thing property. A subscription calls this service. The values on the property are not still updating. Even after I gave run time permissions to the system user. I've also got a persistent provider, are there any changes that I need to make on this?

Is there something I am overlooking ?

 

Any suggestions is much appreciated.

JanicenAuthor
Jun 10, 2022 5:35 AM UTC

Hi all,

 

I found the problem.

It was in the subscription.

The correct code for the subscription is in the image below.