Read the statement by Michael Teeuw here.
MagicMirror electrical cabinet door
-
Most Excellent! Fit it right between the door molding! Great spot for visibility!
-
It’s been a while…
So, I mounted my MM in place, customized it to my preference and enjoyed it for a while.
If you read my other post about sending data from arduino to MM over ethernet, I’ve given up from it as I realy suck at programming web aplications.
But, it’s not all lost. I’m running my “not so smart” home on multidrop RS485 network and my master node is right behind RPI3 running MM.
So I made packet sniffing node using arduino nano.
In short, it listens for packets that are interesting to be shown on MM, translates them to format for MMM-ArduPort and sends them over usb. If no packet is received in 5 minutes, than it sends request.So I installed MMM-ArduPort, configured config.js and then…
Disaster! I was only getting black screen! I taught: “NOOOOO!!! I’m to ugly to watch my self in a mirror!”
Started to remove modules one by one and nothing helped.
So I deleted MagicMirror folder and went to reinstal. But instalation got frozen at “Updating packages”.
Fortunatly, manual instalation worked. I reinstalled all modules and copied configuration from old config.js (yes, i made backup :D ), and finaly got it to work.Problem was that i have updated it prior installing MMM-ArduPort and somehow update crashed MM.
Now it is 1:57 am so I’m going to sleep. Arduport will have to wait till morning.
I’ll slap some new pictures tomorrow!
-
I’m having trouble uploading pictures…
But, I’m allso having trouble with MMM-ArduPort. It connects to arduino, shows sensors, and then returns to “waiting for connection…” :confused_face:
-
Well, I have abandoned ArduPort. Never got it to work. So I switched to json-feed.
It wasn’t easy for me because I had zero knowledge about http requests. But I got it working.
For anyone, with limited knowlege, like me, here is the code I’m sending from arduino ethernet server:
void sendjson(EthernetClient cl) { // send a standard http response header cl.println("HTTP/1.0 200 OK"); cl.println("Content-Type: application/json"); cl.println("Connection: close"); cl.println(); // cl.println("{"); // start of json data cl.print("\"Info\":\" "); if(y==true){cl.print("ERR COM");} // error in comunication if(y==false){ if(inverterukljucen==1){ cl.print("ON"); // system is on } else { cl.print("OFF"); // system is off i.e. no sun } } cl.println("\","); cl.print("\"Baterija\":\" "); // battery voltage cl.print(naponbaterije); cl.println(" V\","); cl.print("\"Struja\":\" "); // current going in or ouf trom battery cl.print(strujabaterije); cl.println(" A\","); cl.print("\"Proizvodnja\":\" "); // production of electricity cl.print(snagapanela); cl.print(" W / "); cl.print((snagapanela/560)*100); cl.println("%\","); cl.print("\"Teret\":\" "); // load at inverter side cl.print(snagainvertera); cl.print(" W / "); cl.print((snagainvertera/1200)*100); // load percentage cl.println(" %\""); cl.println("}"); //end of json data }
And json data received by MM:
{ "Info":" ON", "Baterija":" 26.15 V", "Struja":" -0.79 A", "Proizvodnja":" 6.72 W / 1.20%", "Teret":" 27.52 W / 2.29 %" }
And result:
Back of the cabinet (I have to tie those cables):
-
How do you lock and unlock this mirrored door? A friend of mine is also hiding all patch panels and circuit brakers behind a mirror. He once told me that the mirrored door is the cause of too many issues. Firstly, due to complicated mechanisms, it was tough to install. He hired a locksmith emergency service to give him a hand. Now then, the circuit brakers are out of order, and he has to take the mirror completely out.
What struggles have you encountered?