This is perfect!
I need few hours on google now, to at least begin to comprehend what you just wrote…
Thank you!! :) I’ll post when I get it somehow work (or get stuck :D )
This is perfect!
I need few hours on google now, to at least begin to comprehend what you just wrote…
Thank you!! :) I’ll post when I get it somehow work (or get stuck :D )
Thank for reply, but you can’t used it for already running script, can you? What I understood is, that is runs new py script.
Although it would probably work, I was looking for something that can listen/request data from already running script.
I was hoping I can call some function MagicFunction(localhost, port?, data) from python… and my module could have something like listen(localhost,port?); .onReceive(){ data = fromPython; }
I hope it makes sense.
ps: I understand there are better and simpler solutions how to turn on/off monitor, but this is supposed to be only beginning of what I’m trying to accomplish
EDIT: I just discovered there is “Socket.IO”. It sounds like exactly what I’m looking for. But honestly the more I read about it the more I’m confused how would I used it in my module.
Hello,
I’ve just got my MM up and running but sadly struggle with making a timer showing how long until screen goes off.
My MM has python script that controls when to turn on/off screen based on some sensors and time. It starts internal timer 60s when there is nobody in front of the mirror, turn screen off when timer goes off and resets it when it registers movement.
Although I’m terrible with JS I have somehow managed to create new module, that simply show remaining time.
I’d love to ask for some tips how to get get remaining time from python script to MM module. So far my only idea was to write the number into a file and let the module read it, but I’m sure there must be better way as this just sounds terrible considering I’d like to update it at least once a second.