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.

Deploying app with 1.0.30 does reach step 4/4

Hi,

Yesterday I finally received my Homey.
Installed it, ran update. Added Plex etc, all works fine.

Tried my first Hello World app....

but even with help from one community member I cannot get any (console) feedback from Homey (after Flow Test).
The person who helped me does not have v 1.0.30 and it works for him.

The App is shown in Homey (Settings/Apps list)
When flow was added it was also visible in Flow manager.

But, this does not go beyond step 3/4

$ athom project --run
1/4 - Archiving...
2/4 - Uploading to Homey @ 192.168.1.229:80...
3/4 - Running `com.patrickbalm.hello`, press CTRL+C to abort...

(whatever I do, no 4/4 step is ever reached)

Any suggestions?

Homey Firmware Versie: 0.10.3
node_versionv4.6.0

$ npm --version
2.15.9

Comments

  • Probably something in your app. What happens if you install it? Does it crash? And with what stacktrace (hover over the icon in the apps-list).
  • It  is listed in the App tab 'Apps geinstalleerd op deze Homey' hovering over it does nothing.
    The app is NOT listed below in the Apps section on the left pane of the UI.

    Others are (like Plex, NOS Headlines,...)

    And when I install it via athom project --run (see above post) that is all I get/see.
    Any other pointers on where to look?
  • bvdbosbvdbos Member
    edited October 2016
    What is it supposed to do? Did you create a device with a trigger?
    Did you start with https://developers.athom.com/ ?

  • Het is een Hello world.

    [app.js]
    "use strict";

    function init() {
    Homey.log("Hello world! Patrick");
    }

    Homey.manager('flow').on('trigger.flow_test', function (callback, args) {
    console.log('This definitely should be logged')
    callback(null, true)
    });

    Homey.manager('flow').trigger('flow_test');

    Homey.manager('flow').on('action.mijn_test_actie', function(callback, args) {
         Homey.log("Als het goed is, komen we tot hier!");
         callback(null, true);
    });

    module.exports.init = init;

    [app.json]
    {
        "id": "com.test.patrick",
        "name": {
            "en": "Patrick's Test"
        },
        "version": "0.0.1",
        "compatibility": "0.x || 1.x",
        "author": {
            "name": "Patman",
            "email": "sometimesthingsget@complicated.donotuse"
        },
    "flow": {
    "triggers": [
    {
    "id": "flow_test",
    "title": {
    "en": "Flow was hit!"
    }
    }
    ],
    "actions": [
    {
    "id": "mijn_test_actie",
    "title": {
    "en": "Test action"
    }
    }
    ]
    }
    }


    Na $ athom project --run

    een flow gemaakt:
    {Als} Logica gezet "1>0"
    {en} niets
    {dan} "Patrick's Test"

    Als ik deze Test dan zie ik een groene vink bij kader van 'Patrick's Test' verschijnen alleen ik zie geen console/log output en dat verbaasd me.
     
  • It appears your Homey is not logging anything after step 3/4, but the app may very well be running fine. Try to add any visual feedback to your app so Homey can 'tell you' it's working. If thats working, we can look at the Homey.log function possibly not doing anything. 

    So, make Homey say something in your app.js when the action is being triggered and see if that works. 
  • bvdbosbvdbos Member
    edited October 2016
    Did you install another app from the CLI before you tried this one? Perhaps some internal Homey-settings had to be set first before debugging works properly? I'm on CLI 1.0.30 and FW0.10.3. Your app gives:
    1/4 - Archiving...
    2/4 - Uploading to Homey @ 10.0.3.35:80...
    3/4 - Running `com.test.patrick`, press CTRL+C to abort...
    4/4 - Debugging...

    -------------------------------------------------
    Hello world! Patrick


  • Also, you should have an extra option on the settings-page now : </> developers
  • Feedback appreciated!
    1. I did not install any other app via CLI
    2. Does step 4/4 on your environment appear after a (short) period? Because it does not happen for me, not even after rebooting Homey.
  • What happens if you do that, install another app first. Also: do you have the </> developers now?
  • I'v got more than 1 app.

    The Apps from the store were installed first and after succesful playing with them I started my Hello World.

    See screenshot for answers to your question(s).
  • Ok, you have the developer-tools :)I copied your code and it works for me. Perhaps someting to do with linebreaks (just guessing...). What editor do you use?
  • casedacaseda Member
    edited October 2016
    something i noticed yesterday when playing with one of the apps, i though i had the same,
    but after a few seconds only seeing just step 3/4 i pressed enter (CLI loses connection with homey sometimes, then this helps) 
    and it finally showed step 4 etc, so try pressing enter a few times when step 3 is showing for a few seconds.
  • I use TextMate or Sublime, both on OS X (El Capitan).
    @caseda thx for the suggestion but there is no newline or any feedback on CLI, except when I press Ctrl+C.
  • @Bas reformat (layout) van .json & .js maakte geen verschil
  • @patman ;
    Did you make a settings page? Your app will only appear when there are actually settings to adjust.
  • @DieterKoblenz ;
    No I have not, but this is not my issue. I am just trying to get some console output. 
    The last line after $athom project --run
    should mention 4/4 Debugging....

    but is doesn't.
  • mtudormtudor Member
    edited October 2016
    I'm seeing the same issue with Homey 0.10.5 - reaches step 3 but does not get to the debugging step.  Anyone else seeing / solved this?

    The app runs fine, but I can't get any Homey Log messages which makes debugging trickier.

    Pressing <enter> on the CLI does not cause it to progress to step four (although I have seen that behaviour before).
  • [SOLVED]
    Thx. 

    I had to install socket.io-client@0.9.17 and afterwards run npm install -g athom-cli again to finally get this working.
    socket.io-client was not even present on my machine!?

    $ athom project --run
    1/4 - Archiving...
    2/4 - Uploading to Homey @ 192.168.1.229:80...
    3/4 - Running `com.patrickbalm.hello`, press CTRL+C to abort...
    4/4 - Debugging...

    -------------------------------------------------
    Hello world! Patrick
    Hello world! Patrick
    -------------------------------------------------

    Stopping...
    App uninstalled
  • @patman For me, it was included in the node_modules folder underneath the athom-cli folder (i.e. node_modules/athom-cli/node_modules/).

    This is a guess, but what I suspect you did was install socket.io-client underneath the primary node_modules folder - at this stage, the version under athom-cli is still being used so that wouldn't have fixed it alone.  Uninstalling and reinstalling athom-cli would have removed the version under athom-cli/node_modules and then on reinstall it would NOT have been installed into that folder again as you had it installed already (in the main node_modules folder)... does that makes sense?
Sign In or Register to comment.