Script for collecting and displaying trace/debug info


The programmer in me likes to display summaries after execution and possibly debug info. How ever, javascript is something I’ve never felt the urge to play with…

Could someone please point me in the right direction for declaring a local variable, append to it and print it on flow end?

Thanks :sunglasses:

Look in HomeyScript for these examples:


It’s for Global variables not Local (don’t think it is possible)


Ok, thanks. Was hoping for something “disposable” that would not risk being overwritten by concurrent flows. I’ll have a look :sunglasses:

Maybe this is what you look for?

1 Like

Maybe you’d like to get a push notification of the summary you’re after?
Here’s how you can use Homeyscript to output whatever you want as a push notification:

//Send push notification through Homeyscript (Only tested on a Homey with 1 account)
const usrs = await Homey.users.getUserMe();
let idArr = Object.entries(usrs);
const usrID = idArr[1][1]
const athomID = idArr[3][1]

await Homey.flow.runFlowCardAction({
  uri: "homey:manager:mobile",
  id: "push_text" ,
  args: {
	"user": {
		"id": usrID,
		"athomId": athomID
 //Change the sample text and the variables to your needs
  "text": "Sample text line 1: " +varResult1
  	+"\n"+"Sample text line 2: " + varResult2
1 Like