Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello,
I have completed the rasberry pi to Thingworx exercise. The mashup accurately displays the cpu voltage and temperature of the pi and updates those values in the mashup (i.e voltage stays the same, but I put a fan to the pi and can see the values for the temperature dropping in the mashup). I added an additional property which counts how many times a motion sensor detects movement. It's a simple python program that stores the value in a file. I use io.open to add the value to the property I create in my Lua script. However, this value does not get updated in my Mashup:
The led to the left is the concern. The guage works and updates the value as it is changes. I only see an update to the left most guage when I save the properties listing in the new composer (i.e. without making any changes to the properties), close out the PiThing in the browsing panel, and reopen the properties for it.
I was thinking I could update the config for the lua script, but all of these properties are configured in the same lua script.
Could you please share your io.open and Lua script code which you are using to update mentioned property. Also, confirm is the property type of left led is Persistent or not?
Regards,
Hello,
I ended up getting this to work correctly. I moved the task of obtaining the counter value and assigning it to a property below all the other property assignments in the lua script. It began updating right after. Go figure...
This can be marked as closed.
Thanks