Skip to main content
1-Visitor
November 23, 2022
Question

Unable to write thing property via script because things are showing not running

  • November 23, 2022
  • 2 replies
  • 825 views

Hi Team,

 

1. How to list out the device things via some script and inbuilt PTC service which are showing "Thing Not Running"?

2. Also let know how to write properties of things which are showing "Thing Not Running"?

Could you please share the snippet.

 

Thanks in advance.

2 replies

22-Sapphire I
November 23, 2022

Although a little 'lame' any service you invoke on a thing will error with a Thing Not Running or Enabled if it isn't.

So you can do a try catch and find them that way.

You can look into the 'Enabled' property as well and perhaps query for that using something like QueryImplementingThings

I would avoid 'mass enable/restart' of all entities/things as that might cause you performance issues.

17-Peridot
November 24, 2022

Hello,

 

Perhaps this forum post is similar to your needs?

It was never marked as solved, but maybe it could help you.