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.

    Need help for PIR-SENSOR

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    4 Posts 2 Posters 966 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.
    • C Offline
      cyberjarou
      last edited by cyberjarou

      Hello everyone, I need help for PIR-SENSOR, I have followed all the steps to make the sensor work on the raspberry but I have the impression that it doesn’t work on the gpio port.

      If someone could help me solve the problem, it would be nice.

      I am French and I speak English with the translator so if you don’t understand things tell me.

      I’d give you more information but I’d like to make sure first that someone will answer me.

      I’m a beginner in programming so if you could simplify things a little bit.

      0_1572631446516_Capture imagee-compressed.jpg

      FoziF 1 Reply Last reply Reply Quote 0
      • C Offline
        cyberjarou
        last edited by

        language: "fr",
        timeFormat: 24,
        units: "metric",
        
        modules: [
                    {
        		module: "alert",
        	},
        	{
        		module: "updatenotification",
        		position: "top_bar"
        	},
        	{
        		module: "clock",
        		position: "top_left"
        	},
        	{
        		module: "compliments",
        		position: "lower_third"
        	},
        	{
        		module: "currentweather",
        		position: "top_right",
        		config: {
        			location: "ferel",
        			locationID: "3018692",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
        			appid: "3d1a7886937461a9c659f9f2984fac88"
        		}
        	},
        	{
        		module: "weatherforecast",
        		position: "top_right",
        		header: " ",
        		config: {
        			location: "Ferel",
        			locationID: "3018692",  //ID from https://openweathermap.org/city
        			appid: "3d1a7886937461a9c659f9f2984fac88"
        		}
        	},
        	{
        		module: "newsfeed",
        		position: "bottom_bar",
        		config: {
        			feeds: [
        				{
        					title: "Le Monde",
        					url: "http://www.lemonde.fr/rss/une.xml"
        				}
        			],
        			showSourceTitle: true,
        			showPublishDate: true
        		}
        	},
                    {
        	        module: "MMM-Screencast",
        	        position: "center", // This position is for a hidden <div /> and not the screencast window
        	        config: {
        		        position: "center",
        		        height: 300,
        		        width: 500,
        	        }
                    },
                    {
        	        module : "MMM-PIR-Sensor",
        	        config : {
                                     sensorPIN: 4,
                                     powerSaving: true
                            }
                     },
                     {
                            module: "MMM-LocalTemperature",
                            position: "top_left", // Only add a position if you want this module to display the data
                            header: "temperature de la maison",
                            config: {
                                    sensorPin: 21, // For GPIO 22
                            }
                     },                                     	
         ]
        

        I tried everything I don’t understand I still have wring-pi

        put the code request in the config.js and in the command prompt

        -Navigate into your MagicMirror’s modules folder and execute git clone https://github.com/paviro/MMM-PIR-Sensor.git. A new folder will appear navigate into it.
        -Execute npm install to install the node dependencies.
        -Add your user (pi?) to the gpio group by executing sudo usermod -a -G gpio pi.
        -Execute sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt to allow turning on/off the hdmi output.
        -Reboot your Pi.

        1 Reply Last reply Reply Quote 0
        • FoziF Offline
          Fozi Project Sponsor @cyberjarou
          last edited by

          @cyberjarou
          Try to add the delay time when the monitor should turn off, e.g. after 60 seconds.

          Like this:

          {
          	module: 'MMM-PIR-Sensor',
          	config: {
          	powerSavingDelay: 60, // (seconds) how long the monitor will be turned on
          	
          	}
          },
          

          After 60 seconds the monitor will turn off and turn on after the sensor detect motion.

          HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

          C 1 Reply Last reply Reply Quote 0
          • C Offline
            cyberjarou @Fozi
            last edited by cyberjarou

            @Fozi

            {
            module : “MMM-PIR-Sensor”,
            config : {
            sensorPIN: 4,
            powerSaving: true
            powerSavingDelay: 60,
            }

            thank you for your answer but it doesn’t work at all, the mirror doesn’t configure as before, i.e. it doesn’t mark the required info anymore, it requests me to create a config file and can’t stop where I put the brace

            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