I’ve actually built such magic mirror myself. I also included stuff from my openHAB instance running on a separate raspberry. I’m just using the REST interface of openHAB to get my current states (reloading them in various intervals).
Unfortunately I haven’t had the time to commit stuff to my github project and the code is currently a little messy.
If you wan’t I can provide some JS/PHP snippets here because I don’t think I will/can commit it soon.
Here you get some impression how it currently looks (currently I’m displaying lights, windows, sockets …):