MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

AVStock not responding to Hello-Lucy commands/notifications



  • Hi day @Mykle1,
    Thanks so much for your work on this module. Just great functionality and elegant solution. Being able to control individual modules visibility is a massive help!! 🙂

    I personally am still pretty new to this so you’ll need to forgive my ignorance off the bat. I’ve installed MM along with a good range of modules, including Hello Lucy. One module in particular, namley AVStock, is however giving me grief and doesn’t appear to be responding to the hide/show commands.

    Would you mind helping me with it? I’ve incorporated the code exactly as suggested and i can’t for the life of me work out why the module isn’t responding when the others are? I’ve even had other check it for me. Have you had any experience using this module? Do instructions differ at all?

    Also is there a way to view the contents of variables in an “online / debug” mode? If so how? (please forgive the stupid question)


  • Project Sponsor Module Developer

    @bazil1000 said in AVStock not responding to Hello-Lucy commands/notifications:

    Would you mind helping me with it?

    Wow. I didn’t think anyone was using Lucy these days. Yes, I’ll do what I can to help you. I took a look at the AVStock.js file. I see the getDom function closes at line 47. I assume you made your modification at line 48

      getDom: function() {
        var wrapper = document.createElement("div")
        wrapper.id = "AVSTOCK"
        return wrapper
      },
    
    notificationReceived: function(notification, payload) {
            if (notification === 'HIDE_STOCK') {
                this.hide();
            }  else if (notification === 'SHOW_STOCK') {
                this.show(1000);
            }        
        },
    

    It can be tedious but you’ll have to check and recheck your other modifications. Check that you’ve changed the command words and that they all match in each modification.

    This one
    One in the new node_helper
    Two in the new MMM-voice.js file

    I don’t use AVStock but Lucy should work. Any time Lucy failed to work it was always an oversight on my part. Please do this first. If it still doesn’t work we may have to move the notificationReceived function or add the modification to the existing notificationReceived function that is already present in MMM-AVStock.js file. Keep me posted. Sorry for the delay in response


Log in to reply