Read the statement by Michael Teeuw here.
MagicMirror and adruino over ethernet
-
@Kereknjek I would see this module… MMM-ArduPort and how to send data from the arduino to the pi via serial
I also had added an http server to my arduino ESP8266 NodeMCU and provided apis for data access as another route, which keeps the devices from having to be physically wired together
-
@Kereknjek said in MagicMirror and adruino over ethernet:
Arduino mega, located at electrical cabinet, is running HTTP server to wich I can connect from my PC or mobile to view current status, statistics and errors.
Now I want to make module for MagicMirror to display that data.how do you ‘view’ that
-
@sdetweil if u want to send requests (in code) to the arudino web server, its just a the nodejs request library
see https://www.npmjs.com/package/request
you could use my sample module. https://github.com/sdetweil/SampleModule
there are also modules that will show ae existing page, MMM-IFrame -
Arduino sends data formated as simple HTML page. Pure text.
-
Thank you!
I’ll need some time to digest all the info you have provided. :smiling_face_with_open_mouth_cold_sweat: -
@Kereknjek no problem… come on back, there is all kinds of help around
-
@sdetweil said in MagicMirror and adruino over ethernet:
@Kereknjek I would see this module… MMM-ArduPort and how to send data from the arduino to the pi via serial
I also had added an http server to my arduino ESP8266 NodeMCU and provided apis for data access as another route, which keeps the devices from having to be physically wired together
Your MMM-ArduPort module looks EXACTLY like what I had in mind!
I’ll give it a detailed examination. :D -
I think that this is way to extensive for my knowledge. I can’t make heads or tails out of it…
-
@Kereknjek basically the arduino sends text strings with Serial.println(“[COMMAND:NAME:DATA]”)
To transmit a sensor data to the module: `[sensor:SENSOR_NAME:SENSOR_VALUE]**
Example:
Serial.println(“[sensor:MQ2:19]”);
Serial.println(“[sensor:LM35:11]”);
Serial.println(“[sensor:HCSR04:64]”);but anyhow, lots of work in the arduino code to make this work
-
@sdetweil
That part is perfectly clear.Here is C/P of what I am using now:
client.println("< !DOCTYPE HTML >"); client.println("< html >"); client.print("Napon panela: "); client.print(PanelU); client.println(" V < br/>"); client.print("Struja panela: "); client.print(PanelI); client.println(" A < br/>"); client.print("Napon baterije: "); client.print(BatU); client.println(" V < br/>");
.
.
.
client.println(“< / html >”);That is slightly modified ethernet server sample program from ethernet library.
Edit: had to add spaces because html wasn’t showing.