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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

DataChange Problem with Subscription

DF_9703795
10-Marble

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!

ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

3 REPLIES 3

Try the steps provided in below article,

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

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

 

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?

 

 

Announcements


Top Tags