cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

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

Hariharasuthan
12-Amethyst

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

 

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,


});

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3

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 

Hi @Velkumar  

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

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

Top Tags