Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
I have added MQTT Extension 3-1-0 to Thingworx 9.3 platform, and trying to show in a little mashup the temp value from MQTT ESP8266 publisher.
I receive a temperature value mapped ok to the MQTT Thing, I test that values transferred values are shown when refreshing as
My problem is that this value is not refreshed into a LED widget... The refresh only happens when I uptate manually the value from console, but not when values are changed from MQTT subscriber.
Why values are not refreshed?
Solved! Go to Solution.
Solved. Simply assign runtime permissions to system (execute and subscribe) to thing.
I assume because you do not use the "GetProperties" service of the thing containing the values with the "Automatically update when able" option. In this case you only calling the service for retrieving the values once.
I have the getProperties in place, I have followed the Fundamentals Overview tutorial but retrieving from the new field comming from MQTT.
I have attached all views from compose to show all configurations.
Summarizing:
1) ESP8266 delivers HeatPreMQTT, this field is refresing in properties perfectly inside ReflowOven that is based upon MQTT thing Template.
2) New Mashup with Led, I add data from ReflowOven, use GetProperties.preHeatMQTT and bind this property to data from leddisplay-9 with "Automatically values when able" to data activated.
But nothing changes in the mashup, Instead it changes always to 0. Refreshing page, new view mashup, nothing changes.
Can you check if you have any errors in the script or application log? Also please look at the "Application Keys" section if Thingworx created some temporary application keys when you opened the mashup.
I read:
Error Executing Event Handler 'ForwardEvent' for event Type.Thing:Entity.ReflowOven:Event.DataChange:Property.preHeatMQTT
From https://community.ptc.com/t5/ThingWorx-Developers/Error-Executing-Event-Handler-ForwardEvent-for-event-Type-Thing/td-p/732013 I'm trying to put permissions for Administrator and System allow at entity and collection leven but still the same error.
No keys found in Application Keys section.
As far as I know the MQTT extension uses the "System" user internally. That means that the "System" user must have permission for "Event Execute" on your "ReflowOven" thing. Not sure if subscription permissions are also necessary. Maybe grant all permissions on your thing for the System user and then narrow it down.
Its working.
The problem: I was importing a Mashup.xml that I get from the Fundamental course. I't seems this xml is no compatible with Thingworkx current metadata version (9.3).
When I have just created a new Mashup from scratch it works.
Thanks for your help....
It works better now, but I have to refresh manually (F5) and does not update automatically.
I have checked "Automatically updates then enable"....
And I have added the autorefresh function....
I dunno exactly how to bind the autorefresh event with the mashup widget.... I have selected any of them without any result....
I have attached the "example project". It shoult work in any installation because my device is always connected to a public MQTT broker.
Solved. Simply assign runtime permissions to system (execute and subscribe) to thing.