Skip to main content
Jan 28, 2021 3:19 PM UTC
Solved

DataChange Problem with Subscription

Hi everyone,

 

I am sending Data (json) from an MQTT-Broker to a Property (Type: json) called "Sensor".

This is the Data I send:

{
"Temperatur": 20,
"Helligkeit": 75
}

Then I made a Subscription to store the two values of my Data into seperate properties called: "Temperatur" and "Helligkeit". (Type: Integer)

With the parameters:

Event: DataChange

Property: Sensor

and the Code:

me.Temperatur= me.Sensor.Temperatur;
me.Helligkeit= me.Sensor.Helligkeit;

 

Now to my problem:

Whenever I change the Data in the Property "Sensor" by hand in the Property itself, it works and the properties "Temperatur" and "Helligkeit" are updated.

 

But when the MQTT-Broker changes the Data in the "Sensor" property, the two other properties doesn't change. 

 

Why do my properties not change when the data change is done by the broker?

 

Thanks for any kind of help!

smainenteAnswer
Jan 29, 2021 7:22 AM UTC

This can be a permission issue (the MQTT entities are "running" as System user).

See https://www.ptc.com/en/support/article/CS270968

and https://www.ptc.com/en/support/article/CS275831

 

3 replies

Jan 28, 2021 3:55 PM UTC

Try the steps provided in below article,

https://www.ptc.com/en/support/article/CS253296

smainenteAnswer
Jan 29, 2021 7:22 AM UTC

This can be a permission issue (the MQTT entities are "running" as System user).

See https://www.ptc.com/en/support/article/CS270968

and https://www.ptc.com/en/support/article/CS275831

 

Jan 29, 2021 8:16 AM UTC

Thanks, that helped!

 

Changing the  permission --> visibility to Everyone. was enough to make it work!

 

I also changed the runtime permission as mentioned in the article, but it wasn't necessary at my case. Maybe because I am logged in as Administrator?