• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MM to periodically run a python or JS script?

Scheduled Pinned Locked Moved Requests
4 Posts 2 Posters 2.5k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    zichao92
    last edited by Dec 21, 2016, 10:05 AM

    Hi there,

    Im still relatively new to the world of Magic Mirror and programming as well. As per topic, I have created a script that generates a JSON file as an output and i would like MM to make use of this output in one of my modules.

    is this possible?

    1 Reply Last reply Reply Quote 0
    • T Offline
      tosti007 Module Developer
      last edited by Jan 10, 2017, 5:27 PM

      I am not sure if you still need it, but just in case:
      As far as I know there is the “python-shell” library which lets you do exactly that.
      Paul-Vincent Roll used it in his facial recognition module, that’s how I found out.
      link: https://github.com/paviro/MMM-Facial-Recognition

      If there is anything don't hesitate to contact me!
      ProfileSwitcher, TouchNotifications

      1 Reply Last reply Reply Quote 1
      • Z Offline
        zichao92
        last edited by Jan 12, 2017, 3:47 PM

        Hi @tosti007 ,

        I found out that by making use of the “exec” command works too. I came across this command while i was looking at the PIR sensor module ( https://github.com/paviro/MMM-PIR-Sensor ) . Thanks for sharing anyway!

        T 1 Reply Last reply Jan 12, 2017, 3:57 PM Reply Quote 0
        • T Offline
          tosti007 Module Developer @zichao92
          last edited by Jan 12, 2017, 3:57 PM

          @zichao92 ah nice, that’s way easier aswell. Thanks for letting me know, might come in handy once!

          If there is anything don't hesitate to contact me!
          ProfileSwitcher, TouchNotifications

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy