# \[APP\]\[Pro\] Simple (Sys) LOG - Use this app for Simple (Sys) Logging

**URL:** <https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, logging, syslog\
**Created:** [March 11, 2023, 8:40pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533 "2023-03-11T20:40:00Z")\
**Posts on this page:** 20\
**Page:** 22

<div class="post-metadata">

**Author:** ![B3rt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/b3rt/32/9435_2.png) [@B3rt](https://community.homey.app/u/B3rt)\
**Post date:** [May 2, 2024, 9:35pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/426 "2024-05-02T21:35:44Z")

</div>

How does this work?

I created a syslog device I went into settings and entered the details:  
 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/9/29c7082445e8fdde1808e86dbd43b986ab6aa9d3.png)

In the synology server I also ceated a rule to receive los on udp 516…  
 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/8/28a2db1f264e3c4b8442d8a7bebcdd4f0aa759b0.png)

The i triggered a log card in Homey…

In the simle log the log line is written, but in the syslog server nothing happens…

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/e/4ed6496357b8660c4fa5e935ec8258a9b00337e6.png)  
 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/5/3551945bbf0d605becbc0d1af9d15e37aed6d833.png)  
 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/c/fc7e361dac1d0497e31926029602bf095903796a.png)

I also tried tcp an other port and other protocol, but nothing works.  
I use this syslog server also for other application and that those logs are registered.

 ![afbeelding](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/6/f6dec72843e55327a41d28b0086ab14f37845d5d.png)

So actually I have no idea what I am doing wrong here…

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [May 2, 2024, 9:52pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/427 "2024-05-02T21:52:55Z")

</div>

> [@B3rt](#):
>
> How does this work?

Create a Syslog Client Device to connect to Synology.

You have now create a Syslog Server on your Homey to handle **incoming** syslogmessages.  
😉

---

<div class="post-metadata">

**Author:** ![Henk\_Bartels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_bartels/32/12762_2.png) [@Henk\_Bartels](https://community.homey.app/u/Henk_Bartels)\
**Post date:** [May 3, 2024, 11:21am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/428 "2024-05-03T11:21:29Z")

</div>

Hello Peter,

Thank you for making it clear for me.  
It now works fine.

Henk

---

<div class="post-metadata">

**Author:** ![AxelS](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/axels/32/69263_2.png) [@AxelS](https://community.homey.app/u/AxelS)\
**Post date:** [May 27, 2024, 8:47pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/429 "2024-05-27T20:47:37Z")

</div>

Anyone experiencing issues with the Simple Sys Log app on Homey Pro 2019? A couple of hours after my Homey was updated to version 10.0.10, I see “The app Simple (Sys) Log has stopped working. The developer has been notified.” in my Homey timeline. I have tried uninstalling and installing the app again, same problem.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 27, 2024, 11:06pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/430 "2024-05-27T23:06:43Z")

</div>

Axel,

```auto
Simple Log v3.0.35 & v3.0.33
2x Pro 2019 v10.0.10

```

No issues here with both Homeys after the mentioned FW update.

Did the app actually stopped working? Yeah, that might sound like a stupid question, but,  
despite that error msg, I’ve seen apps just keep on working like before.

Long time ago I’ve come to the conclusion it’s best to pull the power for 10 minutes after an FW update what caused issues.  
Did that help in your case?

---

<div class="post-metadata">

**Author:** ![AxelS](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/axels/32/69263_2.png) [@AxelS](https://community.homey.app/u/AxelS)\
**Post date:** [May 28, 2024, 8:26am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/431 "2024-05-28T08:26:36Z")

</div>

@Peter_Kawa The app stopped working, marked with a “Crashed” tag. A power cycle indeed did the trick, thanks for the tip. I started getting nervous when it was unavailable for the first hour or so after booting, but suddenly it was back online. Perhaps time to make the switch to 2023 😅

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [May 28, 2024, 12:36pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/432 "2024-05-28T12:36:45Z")

</div>

> [@AxelS](#):
>
> The app stopped working, marked with a “Crashed” tag

Yup, then it definately was crashed 😉  
Good to hear it’s solved for now.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [June 15, 2024, 12:43pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/433 "2024-06-15T12:43:57Z")

</div>

Not to take anything away from the deep dive in the recent messages about servers, I would like to stress the simple use case for many: just logging and sending notifications without using any servers.

With the addition of BLL in the Simple Log cards, its use for logging is efficient and obvious.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/2/02ab4f7fd55c1041e946b1b3a25286bace8b1d50.png)

PS  
@Arie_J_Godschalk I will submit a feature request for an AND card with a list of severities. That would be more efficient than text based Logic AND cards (“…is exactly”).

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [June 15, 2024, 8:41pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/434 "2024-06-15T20:41:11Z")

</div>

> [@Rrrr](#):
>
> an AND card with a list of severities.

Hi,  
What crossed my mind:  
You can use several triggers instead, one for each severity type?

> ![Screenshot_20240615-222525_Firefox](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/c/4c0eb74d566e22a6aa58cf163b772ebc0761d765.jpeg)

> ![Screenshot_20240615-223212_Firefox~01](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/4/04b34f11a769819e82a24b8ae36f239e3aa463a3.jpeg)

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [June 16, 2024, 10:40am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/435 "2024-06-16T10:40:46Z")

</div>

True and good point. As I use 6 different severity types where some of them overlap and have the same THEN action cards, it is much easier to have it all in one flow.

---

<div class="post-metadata">

**Author:** ![Wout\_van\_den\_Dool](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wout_van_den_dool/32/391_2.png) [@Wout\_van\_den\_Dool](https://community.homey.app/u/Wout_van_den_Dool)\
**Post date:** [July 19, 2024, 8:51am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/436 "2024-07-19T08:51:39Z")

</div>

Thanks @Rrrr @Peter_Kawa and @Arie_J_Godschalk your post inspired me to re-assess my messaging setup, based on Simple Log… I am currently simplifying all my flows in terms of Messages… And it looks like this (taken into account Severity level)

**Advanced Flow based on Simple Log**

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/a/5a3d12547aa3175fee6ae5cd3b8ab3e90e226ca7.jpeg)

**Severity levels and Device to send message to:**

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/a/0ae408042d36311125d1b972733f1f6f0fd0f8d5.png)

**Synology Log Center**

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/5/05f219eb6519ff3a56497eb593045dc7d677fe96.png)

**Default card used in all Flows**  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/6/06d1609bb116a3ec41f073a048c478740db3151f.png)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [July 19, 2024, 11:41am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/437 "2024-07-19T11:41:43Z")

</div>

@Wout_van_den_Dool that looks gorgeous!

And fyi, for all:  
I have migrated (again) to the HP2023 past week.  
And (finally) everything seems to be working correctly.  
So, soon, ill be able to really start developing and picking up tickets again. 😁

(Although im having holidays with the kids the next 4 weeks hahah)  
But at least i have a non-overloaded Homey so i am at least able to develope again.  
The hp2019 was so overloaded that installing my apps to test and run it, made it crash or at least function improperly.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [July 24, 2024, 11:18am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/438 "2024-07-24T11:18:21Z")

</div>

> [@Rrrr](#):
>
> PS  
> @Arie_J_Godschalk I will submit a feature request for an AND card with a list of severities. That would be more efficient than text based Logic AND cards (“…is exactly”).

@Arie_J_Godschalk Bitbucket issue #42

---

<div class="post-metadata">

**Author:** ![wrutjes](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wrutjes/32/169342_2.png) [@wrutjes](https://community.homey.app/u/wrutjes)\
**Post date:** [August 14, 2024, 5:13pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/439 "2024-08-14T17:13:36Z")

</div>

Peter is this working for you now. I have been busy with all stuff and haven’t been paying attention to this en now I have got time again and see that it still doesn’t work.

kind regards, Wilfried

---

<div class="post-metadata">

**Author:** ![ferno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ferno/32/79177_2.png) [@ferno](https://community.homey.app/u/ferno)\
**Post date:** [August 23, 2024, 10:19pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/441 "2024-08-23T22:19:33Z")

</div>

Is there a way to PUT a log just form HomeyScript? I’ve looked through this post and the former one, and found nothing.

The only post that said something about it, it didn’t work in my Homey Pro 2023… ([Simple LOG app - Former main topic [Deprecated] - #67 by MarkS](https://community.homey.app/t/simple-log-app-former-main-topic-deprecated/146/67))

I’m new at Homey and learning fast about Flows, cards and HomeyScripts.

I’m eager to get some logging from a script.  
This simple Log App es very useful!!  
Thanks!  
Ferno.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 23, 2024, 10:57pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/442 "2024-08-23T22:57:53Z")

</div>

No I didn’t get it to work, Wilfried

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 23, 2024, 10:59pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/443 "2024-08-23T22:59:44Z")

</div>

> [@ferno](#):
>
> Is there a way to PUT a log just form HomeyScript?

When you mean this, yes (always check 1st posts of app topics for howto’s):

> [@Arie\_J\_Godschalk](#):
>
> ### API
> 
> The folowing API endpoints can be used:
> 
> - Grab log data:  
> GET /api/app/nl.nielsdeklerk.log/
> - Add log data:  
> PUT /api/app/nl.nielsdeklerk.log/addlog/  
> Content-Type: application/json  
> {“log”: “Test 1,2,3”, “group”: “TEST”}
> - Clear log  
> GET /api/app/nl.nielsdeklerk.log/clearlog

---

<div class="post-metadata">

**Author:** ![ferno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ferno/32/79177_2.png) [@ferno](https://community.homey.app/u/ferno)\
**Post date:** [August 24, 2024, 11:25am UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/444 "2024-08-24T11:25:06Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> PUT /api/app/nl.nielsdeklerk.log/addlog/

Sorry I wasn’t specific enough… I’ve been reading all through this post and I’ve tried that, but it seems there’s something I’m coding wrongly.

Here’s a copy of my script of all the different methos I’ve tried:

```auto
function simpleLog(message, groupName)
{
// let uri = "http://localhost/api/app/nl.nielsdeklerk.log/clearLog"
// let uri = "http://localhost/api/app/nl.nielsdeklerk.log/"

  let uri = "http://localhost/api/app/nl.nielsdeklerk.log/addLog"
  let bodyContent = JSON.stringify({ log: message });
  if(groupName != undefined)
    bodyContent = JSON.stringify({ log: message, group: groupName });
  let response = fetch( uri, 
  { method: 'PUT',
    body: bodyContent 
    } );
// log (response);
// let homeyScript = await Homey.apps.getApp({ id: 'nl.nielsdeklerk.log' } );
// await homeyScript.put('addlog' , { log:message, group: groupName} );
}

function simpleLog2(message, groupName)
{
  PUT /api/app/nl.nielsdeklerk.log/addlog/
  { "log":message, "group":groupName};
}

/*
function simpleLog3(message, groupName)
{
  PUT /api/app/nl.nielsdeklerk.log/addlog/
  Content-Type: application/json
  { "log":message, "group":groupName};
}*/

simpleLog("Testing simpleLog()");
simpleLog2("Testing simpleLog2()");

//log(await Homey.apps.getApp({ id: 'nl.nielsdeklerk.log' }));
// response = await fetch(uri, { method: 'PATCH', 'headers': headers, body: JSON.stringify(body) })
//PUT /api/app/nl.nielsdeklerk.log/addlog/
//{log: "Test 1,2,3"};

```

- simpleLog function it doesn’t throw any error, but it doesn’t create the log.

- simpleLog2 function throws the following error:  
———————————————————  
❌ Script Error  
⚠ ReferenceError: PUT is not defined  
at simpleLog2 (testSimpleLog.js:21:3)  
at testSimpleLog.js:34:1  
at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)

- simpleLog3 I had to comment it because it was throwing the following error:  
———————————————————  
❌ Script Error  
⚠ testSimpleLog.js:28  
Content-Type: application/json  
^  
SyntaxError: Unexpected token ‘:’  
at new Script (node:vm:99:7)  
at HomeyScriptApp.runScript (/app/app.js:352:23)  
at Object.runScript (/app/api.js:30:38)  
at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)

Hope this information is useful for anyone to give me a hint.  
Thanks in advance!  
Ferno.

---

<div class="post-metadata">

**Author:** ![ferno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ferno/32/79177_2.png) [@ferno](https://community.homey.app/u/ferno)\
**Post date:** [August 26, 2024, 5:35pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/445 "2024-08-26T17:35:59Z")

</div>

Finally I could log to Simple Log form a Homey Script.

I leave here the workaround I found… maybe there is some other way (perhaps a simpler one). The only thing I coudn’t achieve, is to log the Severity or Hostname:

```auto
// Definition of the function simpleLog to be called in a simpler way
function simpleLog(message, groupName, severity, facility)
{
  Homey.flow.runFlowCardAction(
    {uri:'homey:flowcardaction:homey:app:nl.nielsdeklerk.log:Input_group_log',
     id:'homey:app:nl.nielsdeklerk.log:Input_group_log',
     args: {log:message, 
            group:groupName,
            severity:severity,
            facility:facility} });
}

//Call SimpleLog with the message to be logged.
simpleLog("Test message", "Test Group","Alert","127.0.0.1");

```

I leave the print of the log with the sent message:

 ![Captura de pantalla 2024-08-26 a las 14.33.59](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/9/b9586f5e8a209591d55eab907d71ab2104b7084c.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 26, 2024, 11:15pm UTC](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533/446 "2024-08-26T23:15:20Z")

</div>

Yeah that’s indeed a way to do it, but it’s the flow card emulator.

For Severity and Facility you ought to use these numbers:

```auto
// Facility: 0 kernel, 1 user, 2 mail, 3 system, 4 authorisation, 5 syslog,
/// 6 LPR, 7 News, 8 UUCP, 9 Cron, 10 Deamon, 11 FTP, 12 NTP,
/// 13 Security, 14 Console, 15 Clock, 16 Flow, 17 Device,
/// 18 App, 19 Scene, 20 Trigger, 21 Condition, 22 Action
// Severity: Emergency=0 Alert=1 Critical=2 Error=3 Warning=4 Notice=5 Informational=6 Debug=7

```

I’m also trying to write to the logs, by using  
`PUT api/app/nl.nielsdeklerk.log/addlog`

but all i got is errors too (@Arie_J_Godschalk : what’s the secret to PUT logs per API please?)

I got:  
‘unauthorized’  
or  
`Promise { <pending> }`  
or  
`Promise { <rejected> TypeError: Only absolute URLs are supported`

Script trial:

```auto
//const URL = "https://192-168-1-7.homeylocal.com/api/app/nl.nielsdeklerk.log/addlog";
const URL = "http://192.168.1.7/api/app/nl.nielsdeklerk.log/addlog";
//const URL = "/api/app/nl.nielsdeklerk.log/addlog";

const myLogData = {
    'log':'Test 1,2,3',
    'group':'TEST',
    'facility':18,
    'severity':6
    };

await fetch(URL,{
	method: 'PUT',
	headers: {
	'Content-Type':'application/json'
	},
    mode: 'no-cors', 
	body: JSON.stringify(myLogData)
    });

return true;

```

[Previous page](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533.md?page=21)

[Next page](https://community.homey.app/t/app-pro-simple-sys-log-use-this-app-for-simple-sys-logging/77533.md?page=23)
