• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Arduport trouble

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 2 Posters 638 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    glorianneef
    last edited by Feb 13, 2021, 4:19 AM

    Hello! So I am simply trying to run this module and I am just making my arduino code send the number “17” just to test. As you can see, when I run my python code, it receives this message correctly. Below is my config file

     {
                module: "MMM-ArduPort",
                position: "bottom_right",
                header: "MMM-ArduPort",
                config: {
                    portname: "/dev/ttyACM0",
                    displayIcons: true,
                    showDescription: true,
                    hideLoading: true,
                    hideWaiting: true,
                    useColors: true,
                    sensors: 
                        {
                            name: "Timer",
                            description: "LPG, Propane, Hydrogen",
                            maxValue: 19,
                            maxFormat: "({0} cm) TOO FAR",
                            highestValue: 30,
                            highestFormat: "({0} cm) FAR",
                            highValue: 15,
                            highFormat: "({0} cm) NORMAL",
                            lowValue: 10,
                            lowFormat: "({0} cm) CLOSE",
                            lowestValue: 5,
                            lowestFormat: "({0} cm) TOO CLOSE",
                            minValue: 0,
                            minFormat: "({0} cm) OK"
                        }
                }
            },
    
    

    As you can see when I start

    npm start dev
    

    I get a plethora of errors in which I have no idea how to fix. Any help would be super appreciated.
    2021-02-12-192811_1184x624_scrot[9806].png 2021-02-12-193400_1184x624_scrot[9807].png

    Also here is my arduino code (almost exactly like the one supplied by MMM-arduport git page:

    volatile int32_t m_counter = 0;
    bool WasStarted = false;
    
    static const char *pcMQ2Prefix = "[sensor:Timer:";
    static const char *pcPostfix = "]";
    
    void setup() {
      Serial.begin(9600);
      while(!Serial);
      
      Serial.println("[status:setup:starting]");
      
      int test = 1;
      m_counter = test;
    
      if(test > 1) {
        WasStarted = false;
        Serial.println("[status:setup:failed]");
        return;
      }
      
      delay(3000);
      WasStarted = true;
      Serial.println("[status:setup:started]");
      delay(100);
    }
    
    void loop() {
      //Serial.print(pcMQ2Prefix);
      //Serial.print(m_counter);
      //Serial.println(pcPostfix);
    Serial.println("[sensor:Timer:19]");
      if(m_counter % 3 == 0) {
        delay(1000);
        delay(2000);
      }
    
      if(m_counter >= 60) m_counter = 0;
      m_counter++;
    
      delay(1000);
    }
    
    S 1 Reply Last reply Feb 13, 2021, 1:28 PM Reply Quote 0
    • S Away
      sdetweil @glorianneef
      last edited by sdetweil Feb 13, 2021, 1:28 PM Feb 13, 2021, 1:28 PM

      @glorianneef your sensors definition is incorrect

      it should be From
      https://github.com/Dentrax/MMM-ArduPort

      sensors:[
      // for each sensor
      {
           name:"?????",
           description:"???????",
           ...
           ...
      },
      
      ...
      ]
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      G 1 Reply Last reply Feb 14, 2021, 12:46 AM Reply Quote 0
      • G Offline
        glorianneef @sdetweil
        last edited by Feb 14, 2021, 12:46 AM

        @sdetweil The only difference I see between that and mine is the extra

          [ .....
        ]
        

        added correct? I added the square brackets and I was still given the same errors

        S 2 Replies Last reply Feb 14, 2021, 12:52 AM Reply Quote 0
        • S Away
          sdetweil @glorianneef
          last edited by sdetweil Feb 14, 2021, 12:53 AM Feb 14, 2021, 12:52 AM

          @glorianneef ok can u show the errors there and any in the terminal window where u npm start

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Away
            sdetweil @glorianneef
            last edited by Feb 14, 2021, 5:28 PM

            @glorianneef also, there was an error when u ran the python script, to_node not found. did u install all the python dependencies?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              1/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy