This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed

Log-file

edited August 2015 in Archive

Hay,

Does Homey keeps a log-file with information like status changes of devices? I'm thinking of something like:

[Timestamp]-[device x]-[new status]-[user]

19-08-2015 16:53:23-lights livingroom-on-rest api

19-08-2015 16:53:50-lights livingroom-off-voice command

19-08-2015 17:00:00-thermostat-20°C-ThermoApp

I also would like a log-file which keeps track if the flows who are triggerd.

Is this all possible?

Comments

  • EmileEmile Administrator, Athom

    Even better, all kinds of data can be logged. And all these datapoints can be graphed in the Insights module, or exported to .csv.

  • We should have a like button for reply's :P

  • +1 p0nts

  • +1 Emile! and +1 p0nts!

  • If an app writes something to Homey.log, where do I find this information? I need to find out why my tiny little app gets stuck in a flow :)
  • I think it writes to the console same as console.log().
  • Got it - I was looking for a file and totally forgot the console :)

    Thanks!
  • I am working on an app and got stuck. Also need to figure out where ... but I don't seem to have the console.log in my Chrome developer tools. I guess I disabled it once but cannot find how to enable... who knows how to do this?

    I'm on a Mac, press cmd + alt + J to open the development console, then run my app but I don't see any messages, even though I have a lot of console.log entries in the app. It passes a lot of functions succesfully, but I don't even see those console.log entries. Any ideas?
  • RobinRobin Member
    Are you logging on the front-end (so in the settings panel, or pairing wizard)? Then they should appear in the browser console. Else you can find the console.log's in your terminal where you did the athom project --run.
  • I've applied console.log commands in the driver.js file. It doesn't show in the terminal where I started athom project --run (even though it says 'debugging').
  • RobinRobin Member
    Strange, then my guess is that you app doesn't run the piece of code where you applied the logs. Try putting a console.log in the init function of the driver (as first line) this should always run. Then you at least know it is logging:p
  • Nah, I don't see that... Is there any way I can doublecheck?

    $ athom project --run

    ? Select active Homey: Homey @ 192.168.1.77:80

    Archiving...

    Uploading to 192.168.1.77:80...

    Running `com.onkyo`...

    Debugging...

  • RobinRobin Member
    Well, I can't look at your code, but if you log something in the init function of a driver, this should be logged to your terminal when ever you enable the driver. If you don't see the logs, my best guess is your code is stuck somewhere or doesn't get the log parts.
  • Tried that... also tried it by downloading the zips of the E-mail app, hyperion app, Marantz  .... most of them have logs.

    For example, the Marantz app has app.js:

    function init() {

            Homey.log("Marantz app - init start");

            Homey.log ("Marantz app - init done");

    }

    I don't see that after 'Debugging'.... clueless :)

  • RobinRobin Member
    Weird, just tried and it works here. What firmware version are you running? You could try to update the athom cli (npm install -g athom-cli)
  • Robin, you're a lifesaver!

    I was indeed on an old version. Not sure which version, but I ran sudo npm install -g athom-cli and now I have logs in my terminal :) Thanks, now it's time to finally put some effort into this app ;)
  • RobinRobin Member
    edited March 2016
    Great, goodluck with your app :)
This discussion has been closed.