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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

QueryPropertyHistory Service does not show values

Lenn
8-Gravel

QueryPropertyHistory Service does not show values

Hi,

 

Via MQTT the property "Speedometer" gets every 10 seconds a new value which is in json format. All the other properties have a subsciption to the "Speedometer" property and so they change their values every 10 seconds too.

 

When I run the Service QueryPropertyHistory no values are displayed. The Thing and its template have a Value Stream and all the properties are persistent and logged. 

ACCEPTED SOLUTION

Accepted Solutions
Constantine
17-Peridot
(To:Lenn)

Then try to add your MQTT user to Administrators group temporarily -- if that works, then you just need to find where you missed some access rights. Adding debug statements to your subscriptions and monitoring Application and Script logs for errors should help you with identifying the culprit.

 

If nothing seems to help -- try to grant your MQTT user as much permissions as possible (for example, full access on collections level) until it works, and then start to take them away until it breaks -- this approach works well for me when I'm stuck with permissions.

 

/ Constantine

View solution in original post

17 REPLIES 17
Constantine
17-Peridot
(To:Lenn)

Hello @Lenn,

 

I'm sorry for a stupid question, but I have to ask it -- you run this service on the thing with those properties, don't you? Not on the value stream itself.

 

Regards,
Constantine

Hi Constantine,

 

yes I run it on the thing

Constantine
17-Peridot
(To:Lenn)

And do you specify any parameters?

Also, does it work if you manually set the value of Speedometer property in Composer under Administrator user?

No, I didn't set any parameters.

 

Yes, it works when I set the value manually.

 

 

Constantine
17-Peridot
(To:Lenn)

Then try to add your MQTT user to Administrators group temporarily -- if that works, then you just need to find where you missed some access rights. Adding debug statements to your subscriptions and monitoring Application and Script logs for errors should help you with identifying the culprit.

 

If nothing seems to help -- try to grant your MQTT user as much permissions as possible (for example, full access on collections level) until it works, and then start to take them away until it breaks -- this approach works well for me when I'm stuck with permissions.

 

/ Constantine

I don't know what you mean by "my MQTT user". I'm not sure if I have such a user. But if I have it, how can I find this user? 

 

I am simply using a template which has MQTT as a base thing template. In the permissions tab of this template, I gave "Users" all permissions. It's still not working.

 

Thank you very much!

 

Constantine
17-Peridot
(To:Lenn)

Sorry, let’s take one step back. On what thing do you specify Speedometer property? What thing template does it use?

I assumed that you have such an “asset” thing, and by “MQTT user” I mean the user, in whose context the MQTT thing sets the properties on those asset things. Try to give System user all permissions on the asset thing (of course if you have it), not on the MQTT client one.

For my project I created a Thing Template named "MQTTMaster" (which uses the Base thing template "MQTT"). In this Thing Template I specified the property Speedometer (which receives data in json format via MQTT) and a lot of other properties. All properties are subscribing to the property Speedometer and change when Speedometer changes. Afterwards I created a couple of Things that inherit those properties and subscriptions.

slangley
23-Emerald II
(To:Lenn)

Hi @Lenn.

 

Are you still trying to resolve your issue?  If so, please let us know so we can try to help.

 

Regards.

 

--Sharon

Lenn
8-Gravel
(To:slangley)

Hi Sharon

 

Yes, I'm still trying to find a solution.. 

slangley
23-Emerald II
(To:Lenn)

Hi @Lenn.

 

I am happy to open a case on your behalf but you will need to provide your company name and a PTC support email address (under private email).

 

Please let me know if you choose to go that route.

 

Regards.

 

--Sharon

drichter
15-Moonstone
(To:Lenn)

Do you see errors in logs?

 

Try to add "Everyone" to Visibility of your ValueStream and to the ThingworxPersistenceProvider.

Lenn
8-Gravel
(To:drichter)

After changing the visibility of the ThingworxPersistenceProvider it’s working, I can see the values now.

 

But strangely now I have a problem with tw analytics.. I can’t see any analysis jobs in Thingworx Analytics anymore.. is there any connection between this?

drichter
15-Moonstone
(To:Lenn)

I would guess that it's a different problem. Adding more permissions should have nothing to do with this new problem.

nsampat
17-Peridot
(To:Lenn)

@Lenn ,

 

Hello, my name is Neel, and I am with the ThingWorx Analytics Support Team. @slangley asked me to take a look at this thread regarding your Analysis Jobs disappearing in Analytics Manager.

 

I understand you are having issues seeing previously created Analysis Jobs in ThingWorx Analytics Manager.

 

Have you check if your user permissions are part of the appropriate user groups to view Analytics Manager jobs?

 

You can find information of the appropriate setup in the Analytics Manager setup Extension Installation Guide - Page 29. Please note that this guide is for version 8.5.4, but is relevant for releases 8.4+

 

If this resolves your Analytics Manager issues, please let me know.

 

Regards,

 

Neel

slangley
23-Emerald II
(To:Lenn)

Hi @Lenn.

 

If one of the previous responses allowed you to resolve your issue, please mark the appropriate one as the Accepted Solution for the benefit of others with the same issue.

 

Thank you for your participation in our community!

 

Regards.

 

--Sharon

 

Announcements


Top Tags