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.

    MMM-SensorGateway installation issue.

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    8 Posts 2 Posters 1.1k 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.
    • JaanzterJ Offline
      Jaanzter
      last edited by

      About year ago I did had some issues with this module also, but I don’t recall it was this kind of.
      Previously it was related to “sudo” (and SSL) If my memory serves me right. (guide said “blahblah-command” and it didn’t work, but when I added “sudo” before it, it started to work… but anyway, enough with the old stuff…

      I’m not good with linux, but I manage with guide… sometimes though I get confused.
      I’ll show you an example: (I’ll bold the confusing part)

      • Clone and configure module
        Clone MMM-SensorGateway under modules in the MM2 platform as all 3rd party modules
        run npm install in module’s directory to install websocket and exec modules.
        Configuration (into config/config.js)

      • Install script for Gateway
        run install script with root priviledges : MMM-SensorGateway $ sudo ./install.sh
        This will install required bluetooth, Ruuvi and websocket related packages (see the script for details)
        This will also setup an service that will kick in during RasPi boot-up
        Expected final output

      Why there is a websocket twice?
      And why it installs python 2.7, do I need to install 2.7 when 3.9 is already preinstalled?

      Another thing which is confusing me is: which guide I should follow or both?
      https://github.com/mattileh/MMM-SensorGateway#clone-and-configure-module
      or this
      https://github.com/ttu/ruuvitag-sensor/blob/master/install_guide_pi.md

      Am I making this more diffucult for me than necessary?

      following problems are related to what I’ve mentioned above.
      (cannot make ruuvitag -f command to work without alias…)

      So please if some could guide me/explain what I’m doing wrong this time.
      I would appreciate it greatly.

      I’ll add installation log link.
      https://we.tl/t-AS6hvNTvjt (wetransfer)

      (and it’s not a problem that I’ve had few hours, I’ve been trying to solve it about a week now. ;))

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Jaanzter
        last edited by

        @jaanzter the internet keeps moving on, and this module hasn’t changed in 2 years .

        maybe what worked before doesn’t anymore.
        the conflict between python 2 and 3 is not new.

        maybe the author will look at it if u post an issue to the module GitHub page, and maybe not.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        JaanzterJ 1 Reply Last reply Reply Quote 0
        • JaanzterJ Offline
          Jaanzter @sdetweil
          last edited by

          @sdetweil Thanks for replying…
          I should have wrote a note “how to” when I first time got it working.
          (this time I’m going to do it, if/when…)

          This is what should be expected:

          • sudo service local_blegateway status

          –> you should expect seeing the packets routed:

          Oct 16 19:45:40 raspberrypi local_blegatewaykickstart.sh[962]: {‘temp’: 22, ‘battery’: 0, ‘state’: 1, ‘packet’: 189, ‘MAC’: ‘0A:1C:1C:12:18:04’, ‘type’: ‘movesense’}
          Oct 16 19:45:40 raspberrypi local_blegatewaykickstart.sh[962]: {‘acceleration’: 1003.0807544759296, ‘pressure’: 1008.86, ‘temperature’: 20.17, ‘acceleration_y’: -9, ‘acceleration_x’: -9, ‘battery’: 3043, ‘acceleration_z’: 1003, 'data_for

          This is what I get:

          • sudo service local_blegateway status
            local_blegateway.service - local_blegateway, Movesense and RuuviTag BLE advertisement message gateway to websocket interface
            Loaded: loaded (/lib/systemd/system/local_blegateway.service; enabled; vendor preset: enabled)
            Active: activating (auto-restart) (Result: exit-code) since Sat 2022-01-29 15:16:15 EET; 1s ago
            Process: 4693 ExecStart=/usr/share/local_blegateway/local_blegatewaykickstart.sh (code=exited, status=1/FAILURE)
            Main PID: 4693 (code=exited, status=1/FAILURE)
            CPU: 186ms
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @Jaanzter
            last edited by

            @jaanzter said in MMM-SensorGateway installation issue.:

            /usr/share/local_blegateway/local_blegatewaykickstart.sh

            what happens when u try to run that from the command line?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            JaanzterJ 1 Reply Last reply Reply Quote 0
            • JaanzterJ Offline
              Jaanzter @sdetweil
              last edited by Jaanzter

              @sdetweil
              Traceback (most recent call last):
              File “bleAdvWebSocket.py”, line 13, in
              import websocket
              ImportError: No module named websocket

              Edit:
              I followed that path “/usr/share/local_blegateway/local_blegatewaykickstart.sh”
              and looked inside of a file.

              cd /home/pi/MagicMirror/modules/MMM-SensorGateway/gateway/
              sudo /usr/bin/env python bleAdvWebSocket.py

              Edit2:
              then tried that “sudo /usr/bin/env python bleAdvWebSocket.py”
              python: can’t open file ‘bleAdvWebSocket.py’: [Errno 2] No such file or directory

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @Jaanzter
                last edited by sdetweil

                @jaanzter and there is the problem

                ImportError: No module named websocket

                the install of that part failed or the setup has changed

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                JaanzterJ 1 Reply Last reply Reply Quote 0
                • JaanzterJ Offline
                  Jaanzter @sdetweil
                  last edited by

                  @sdetweil

                  Yup.
                  This was the exact thread I also looked.
                  https://forum.magicmirror.builders/topic/11397/mmm-sensorgateway/7

                  Let’s see… crossing fingers

                  JaanzterJ 1 Reply Last reply Reply Quote 0
                  • JaanzterJ Offline
                    Jaanzter @Jaanzter
                    last edited by

                    I got old version running.
                    rpiosMM.png
                    Found an old image.
                    (I didn’t get that to work because SDCard extension/adapter didn’t accept all the cards)
                    But I don’t stop trying to get newer version to work.

                    @sdetweil Thank you for your help.

                    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