Skip to main content
13-Aquamarine
April 28, 2023
Solved

AddServiceDefinition(); using created services but how to action script pass through services

  • April 28, 2023
  • 1 reply
  • 1284 views

 

AddServiceDefinition(); using created services but how to action script pass thorugh services need code 

Hariharasuthan_0-1682671658757.png

services script how to add in this servics

var serviceImplementation=me.name;
Things["Scheduler_Dynamic_CRON13"].EnableThing();
Things["Scheduler_Dynamic_CRON13"].RestartThing();

Things["Scheduler_Dynamic_CRON13"].AddServiceDefinition({
name: "hari" /* STRING */,
description: "welcome" /* STRING {"defaultValue":""} */,
definition:"hi welcome",
implementation: serviceImplementation,


});

 

 

 

 

 

Best answer by Velkumar

Hi @Hariharasuthan 

 

This Community post has the answer to your question. Please look into this carefully and implement it in your case

 

Check Script Line Number: 60

 

Velkumar_0-1682785835706.png

 

 

PS: It is too challenging to write whole business logic for you so you have to create it on your own based on this reference 

 

/VR

1 reply

19-Tanzanite
April 28, 2023

Looks like a repeated post. Many of them gave a solution to your question. Please try to implement it 

 

Refer - Solved: how to create services in New Thing using javascri... - PTC Community

 

Please follow the related posts and try to implement those in your code 

13-Aquamarine
April 29, 2023

Hi @Velkumar  

   actually your share and my post , service using create new thing, 

Velkumar19-TanzaniteAnswer
19-Tanzanite
April 29, 2023

Hi @Hariharasuthan 

 

This Community post has the answer to your question. Please look into this carefully and implement it in your case

 

Check Script Line Number: 60

 

Velkumar_0-1682785835706.png

 

 

PS: It is too challenging to write whole business logic for you so you have to create it on your own based on this reference 

 

/VR