Read the statement by Michael Teeuw here.
MMM-Arduport trouble
-
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.
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); }
-
@glorianneef your sensors definition is incorrect
it should be From
https://github.com/Dentrax/MMM-ArduPortsensors:[ // for each sensor { name:"?????", description:"???????", ... ... }, ... ]
-
@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
-
@glorianneef ok can u show the errors there and any in the terminal window where u npm start
-
@glorianneef also, there was an error when u ran the python script, to_node not found. did u install all the python dependencies?