• 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.

Is it possible to ad an Arduino?

Scheduled Pinned Locked Moved Troubleshooting
55 Posts 4 Posters 14.4k Views 4 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.
  • S Offline
    Shinji0912
    last edited by Shinji0912 Sep 16, 2020, 12:46 PM Sep 16, 2020, 12:43 PM

    Hi, for school we need to build a project using an Arduino.
    For me the Arduino itself is boring thats why i decided to build a MagicMirror using Raspberry Pi and i wanted to integrate functions from Alex, different Sensor-stats like Temperature and the PIR
    But everything i tried didn’t worked and now im Wondering if it’s even possible to connect both.

    Sensors i have and want to use :
    DHT11, for Temperature in Room,
    HC-SR501, for Timeouts when not standing infont of it
    ESP8266 ESP-12E, to Connect to the Alexa

    Im Using a Raspberry Pi3
    and an Arduino Uno R3 with the ELEGOO Ultimate Starter kit and a few other modules.

    i would really appreciate if someone helps me and if you have good ideas to what i should add to get a good grad xD i would really appreciate it aswell.

    This is my Current Config :

    /* Magic Mirror Config Sample
     *
     * By Michael Teeuw https://michaelteeuw.nl
     * MIT Licensed.
     *
     * For more information on how you can configure this file
     * See https://github.com/MichMich/MagicMirror#configuration
     *
     */
    
    var config = {
    	address: "localhost", 	// Address to listen on, can be:
    							// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
    							// - another specific IPv4/6 to listen on a specific interface
    							// - "0.0.0.0", "::" to listen on any interface
    							// Default, when address config is left out or empty, is "localhost"
    	port: 8080,
    	basePath: "/", 	// The URL path where MagicMirror is hosted. If you are using a Reverse proxy
    					// you must set the sub path here. basePath must end with a /
    	ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], 	// Set [] to allow all IP addresses
    															// or add a specific IPv4 of 192.168.1.5 :
    															// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
    															// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
    															// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
    
    	useHttps: false, 		// Support HTTPS or not, default "false" will use HTTP
    	httpsPrivateKey: "", 	// HTTPS private key path, only require when useHttps is true
    	httpsCertificate: "", 	// HTTPS Certificate path, only require when useHttps is true
    
    	language: "de",
    	logLevel: ["INFO", "LOG", "WARN", "ERROR"],
    	timeFormat: 24,
    	units: "metric",
    	// serverOnly:  true/false/"local" ,
    	// local for armv6l processors, default
    	//   starts serveronly and then starts chrome browser
    	// false, default for all NON-armv6l devices
    	// true, force serveronly mode, because you want to.. no UI on this device
    
    	modules: [
    {
    		module: 'MMM-TelegramBot',
    		config: {
    			
    			telegramAPIKey: 'api token changed so you can't use it xD',
    			allowedUser: ['same for here'],
    			adminChatId: 'xxx'
    			
    		}
    	},
    
    
    
    
    
    
    
    
    
    {
    			module: "MMM-Online-State",
    			position: "top_left",
    
    		},
    
    {
    			module: "updatenotification",
    			position: "bottom_bar"
    		},
    
    		{
    			module: "clock",
    			position: "top_right"
    		},
    		{
                module: 'MMM-RBB-Weather',
                position: "top_left", 
                config: {
                             id: "18228265",
                             days: "0",
                             updateInterval: "600",
                             }
            },
    {
    			module: "calendar",
    			header: "Events",
    			position: "top_left",
    			config: {
    				calendars: [
    					{
    						symbol: "calendar-check-o ",
    						url: "my ical adress changed it aswell",
    						maximumEntries: "5",
    						maximumNumberOfDays: "7"
    					}
    				]
    			}
    		},
    
    
    {
      module: "MMM-NowPlayingOnSpotify",
      position: "bottom_left",
    
      config: {
        showCoverArt: false,
        clientID: "nothing to see here",
        clientSecret: "pls help me get a good grade",
        accessToken: "xD",
        refreshToken: "xxx"
      }
    },
    	]
    };
    
    /*************** DO NOT EDIT THE LINE BELOW ***************/
    if (typeof module !== "undefined") {module.exports = config;}
    
    

    EDIT:
    And oh before i forget i would like to add some w2812b RGB Strips

    S W 2 Replies Last reply Sep 16, 2020, 12:51 PM Reply Quote 0
    • S Offline
      sdetweil @Shinji0912
      last edited by Sep 16, 2020, 12:51 PM

      @Shinji0912 there are a bunch of arduino modules on github

      google search

      mmm-arduino github

      some are general (arduport)
      some are more specific MMM-temphumidity

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Sep 17, 2020, 9:55 AM Reply Quote 1
      • W Offline
        wishmaster270 Module Developer @Shinji0912
        last edited by wishmaster270 Sep 16, 2020, 7:16 PM Sep 16, 2020, 7:10 PM

        @Shinji0912 Hi, I wrote a module which converts messages received at serial interfaces to notifications (https://github.com/Tom-Hirschberger/MMM-Serial-Notifications). I have two Arduinos connected to my Pi with gesture and distance sensors.

        My temperature module (https://github.com/Tom-Hirschberger/MMM-Temperature) can receive notifications to update the values.
        Edit: The notification feature is only available in the development branch at the moment. I will mere it to the master the next days.
        There are examples integrated which show how to connect an esp32 board with WiFi to get temperature and humidity.
        Currently I am working on a module which should use MQTT to control an WS2801 LED Strip. But this one is in a very early state and will take a while to develop.

        S 1 Reply Last reply Sep 17, 2020, 9:49 AM Reply Quote 1
        • S Offline
          Shinji0912 @wishmaster270
          last edited by Sep 17, 2020, 9:49 AM

          @wishmaster270 Wow thank you very much , im completly new to this and first of all this helps me out very much and im going to try to make my own module showing an API from our school , is it okay if i ask you questions when i need help?
          and btw. rrealllyy appreciate your help :)

          1 Reply Last reply Reply Quote 0
          • S Offline
            Shinji0912 @sdetweil
            last edited by Sep 17, 2020, 9:55 AM

            @sdetweil I tried the “Arduports” one but for some reason it didn’t worked for the sensors im using ^^

            S 1 Reply Last reply Sep 17, 2020, 11:32 AM Reply Quote 0
            • S Offline
              sdetweil @Shinji0912
              last edited by Sep 17, 2020, 11:32 AM

              @Shinji0912 u have to have code running in the Arduino sending the data, doesn’t just happen

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 Reply Last reply Sep 17, 2020, 12:15 PM Reply Quote 0
              • S Offline
                Shinji0912 @sdetweil
                last edited by Sep 17, 2020, 12:15 PM

                @sdetweil I know I’ve set it up but it didn’t worked.

                S S 2 Replies Last reply Sep 17, 2020, 12:33 PM Reply Quote 0
                • S Offline
                  sdetweil @Shinji0912
                  last edited by sdetweil Sep 17, 2020, 12:34 PM Sep 17, 2020, 12:33 PM

                  @Shinji0912 seems pretty simple, connect serial port for arduino to serial port for PI…

                  arduino send 10
                  https://www.arduino.cc/reference/en/language/functions/communication/serial/write/
                  pi read 10
                  https://www.npmjs.com/package/serialport

                  u can test that without MagicMirror

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  S 1 Reply Last reply Sep 17, 2020, 12:56 PM Reply Quote 0
                  • S Offline
                    Shinji0912 @Shinji0912
                    last edited by Sep 17, 2020, 12:52 PM

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      Shinji0912 @sdetweil
                      last edited by Sep 17, 2020, 12:56 PM

                      @sdetweil Thats my Current Arduino code :

                      volatile int32_t m_counter = 0;
                      bool WasStarted = false;
                      
                      static const char *pcDHT11Prefix = "[sensor:DHT11:";
                      static const char *pcPostfix = "]";
                      
                      void setup() {
                        Serial.begin(9600);
                        while(!Serial);
                        
                        Serial.println("[status:setup:starting]");
                        Serial.println("[sensor:DHT11:11]");
                        
                        int test = 1;
                        m_counter = test;
                      
                        if(test > 1) {
                          WasStarted = false;
                          Serial.println("[status:setup:failed]");
                          return;
                        }
                        
                        delay(3000);
                        WasStarted = true;
                        Serial.println("[status:setup:started]");
                        delay(100);
                      }
                      
                      void loop() {
                        Serial.print(m_counter + 11);
                        Serial.println(pcPostfix);
                      
                        if(m_counter % 3 == 0) {
                          delay(1000);
                          Serial.print(pcDHT11Prefix);
                          Serial.print(m_counter + 11);
                          Serial.println(pcPostfix);
                          delay(2000);
                        }
                        if(m_counter >= 60) m_counter = 0;
                        m_counter++;
                      
                        delay(1000);
                        
                        }
                      

                      and i got the ArduPorts running on the MM itself

                      now it is running but always searching for the module … see Picture.
                      alt text

                      S 1 Reply Last reply Sep 17, 2020, 1:02 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 1 / 6
                      1 / 6
                      • First post
                        1/55
                        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