Thingworx connecting to Raspberry Pi
Hello,
i am trying to get the data from my PIR motion sensor to the remote PiThing i created in the Quickstart guide.
i added this code in the PiTemplate.lua
properties.PIR = { baseType="NUMBER", pushType="ALWAYS", value=0 }
local sensorCmd = io.popen("python etc/custom/templates/11.py")
s = sensorCmd:read("*a")
properties.PIR.value = s
and i tried with 2 types (with and without a loop) of python code (the code works fine if i am trying it from terminal only in the raspberry Pi, does not work in TW) that i attached.
the other sensors as in the guide work just fine, only with this one i am not getting any data, event though the remote thing sees it as a property
can anyone please help?

