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.

    How to detect SBC model?

    Scheduled Pinned Locked Moved Development
    13 Posts 3 Posters 5.4k Views 3 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.
    • ? Offline
      A Former User
      last edited by

      I have 2 SBCs - Raspberry Pi & Asus Tinker board.
      I’m not an expert of sysadmin, so I have no idea how to distinguish these 2 devices programmatically. Is there any common way to detect OS and device among these kinds of SBCs?

      strawberry 3.141S 1 Reply Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer @Guest
        last edited by

        @Sean where do you want to detect the device, on a webserver etc.?

        Please create a github issue if you need help, so I can keep track

        ? 1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User @strawberry 3.141
          last edited by A Former User

          @strawberry-3.141 In module itself.

          strawberry 3.141S 1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer @Guest
            last edited by

            @Sean can you give a little more details, what are your plans?

            Please create a github issue if you need help, so I can keep track

            ? 2 Replies Last reply Reply Quote 0
            • ? Offline
              A Former User @strawberry 3.141
              last edited by

              @strawberry-3.141 There is some difference between RPI and ATB. By example, the thermal zone virtual file, default sound configuration, I want to make a module to work conditionally by device. But I don’t know how to detect it programmatically. If my module is running on ATB, do something A, and if running on RPI do something B… etc.

              1 Reply Last reply Reply Quote 0
              • ? Offline
                A Former User @strawberry 3.141
                last edited by

                @strawberry-3.141 Maybe I could check thermal zone file for that purpose. That is only I know. But I believe there is something better… like /proc/hardware/board…

                strawberry 3.141S 1 Reply Last reply Reply Quote 0
                • strawberry 3.141S Offline
                  strawberry 3.141 Project Sponsor Module Developer @Guest
                  last edited by

                  @Sean why not make a config option, that would be probably the easiest

                  Please create a github issue if you need help, so I can keep track

                  ? 1 Reply Last reply Reply Quote 0
                  • ? Offline
                    A Former User @strawberry 3.141
                    last edited by

                    @strawberry-3.141 Maybe. I know that is the easiest way. If I could not find any proper solution, I’ll do it.
                    But Just want to know.

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @Guest
                      last edited by

                      @Sean If for some reason, after an update, the thermal zone file gets changed and then your detection will fail, but your module isn’t related to the thermal zone fail you want to have a running module. So therefore I would prefer a config option as it doesn’t depend on something else.

                      Please create a github issue if you need help, so I can keep track

                      ? 1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User @strawberry 3.141
                        last edited by

                        @strawberry-3.141 Okay. thanks for your suggestion.

                        strawberry 3.141S 1 Reply Last reply Reply Quote 0
                        • strawberry 3.141S Offline
                          strawberry 3.141 Project Sponsor Module Developer @Guest
                          last edited by

                          @Sean keep me posted with your work in progress or github

                          Please create a github issue if you need help, so I can keep track

                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            edubey
                            last edited by

                            @Sean said in How to detect SBC model?:

                            Asus Tinker board.

                            A question out of context,

                            Does this mirror application works properly (including electron) in Asus Tinker board.?

                            Thanks

                            ? 1 Reply Last reply Reply Quote 0
                            • ? Offline
                              A Former User @edubey
                              last edited by

                              @edubey Yes. 99% works. The performance is better than rpi.

                              1 Reply Last reply Reply Quote 0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              • 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