mqtt-bridge | Simple bridge to stream MQTT Broker data

 by   mchmarny JavaScript Version: 0.7.0 License: BSD-2-Clause

kandi X-RAY | mqtt-bridge Summary

kandi X-RAY | mqtt-bridge Summary

mqtt-bridge is a JavaScript library typically used in Programming Style applications. mqtt-bridge has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i mqtt-bridge' or download it from GitHub, npm.

Simple bridge to stream MQTT Broker data to dynamically defined back-ends
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              mqtt-bridge has a low active ecosystem.
              It has 29 star(s) with 5 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 0 open issues and 1 have been closed. On average issues are closed in 313 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of mqtt-bridge is 0.7.0

            kandi-Quality Quality

              mqtt-bridge has 0 bugs and 0 code smells.

            kandi-Security Security

              mqtt-bridge has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              mqtt-bridge code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              mqtt-bridge is licensed under the BSD-2-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              mqtt-bridge releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of mqtt-bridge
            Get all kandi verified functions for this library.

            mqtt-bridge Key Features

            No Key Features are available at this moment for mqtt-bridge.

            mqtt-bridge Examples and Code Snippets

            No Code Snippets are available at this moment for mqtt-bridge.

            Community Discussions

            QUESTION

            "Invalid gcp.key" from Mongoose OS when connecting ESP32 to Google Cloud Platform
            Asked 2020-Mar-26 at 10:39

            I am trying to connect my ESP32 device to Google Cloud Platform (GCP) with Mongoose OS. I am new to Mongoose OS, but have got as far as to build and flash code as well as connection to wifi. But I get problems when I add info to the mos.yml file to connect to GCP. This is the error:

            mgos.gcp.c:361 Invalid gcp.key (0xffffc200)

            I have created my key pair with the following commands:

            ...

            ANSWER

            Answered 2020-Mar-26 at 10:39

            So, it turned out I didn't need to set all that GCP info info in "mos.yml", but it was set for me when running

            Source https://stackoverflow.com/questions/60845439

            QUESTION

            Sending a message to a remote broker using a pem-certificate
            Asked 2019-Feb-20 at 15:06

            I'm writing a script to get some sensor-data using MQTT, transform the incoming value is a specific way and forward it to a cloud which uses an encrypted communication. The script runs on RaspberryPi 3 (Raspbian) where Mosquitto runs as MQTT-broker ( The sensors send the data to this broker)

            So far I get the information from the the sensors and I can transform the content like desired.

            The problem is when I try to connect to the remote broker, I got following error-message

            ...

            ANSWER

            Answered 2019-Feb-20 at 15:06

            The entry for the cert should not be the path to the certificate file, but the actual cert it's self. You need to read the file in and pass that.

            Somethings like this:

            Source https://stackoverflow.com/questions/54784813

            QUESTION

            Google IoT - Right mode to receive notifications (subscribe working)
            Asked 2019-Feb-05 at 16:45

            I am following this tutorial and I already have my code publishing messages to /devices/sm1/events topic, in which sm1 is my device id.

            I would like to know how to subscribe to this topic since the tutorial says to use /devices/sm1/config but I am getting empty messages. I already tried use the same "path" used in publishing (/devices/sm1/events), but it also did not work.

            It is strange that the name I gave to the topic was sm1 and the topic associated to my device is on GoogleIoT console is exhibited as projects/myprojectname/topics/sm1. So, besides to discover how to subscribe to mentioned topic, I appreciate also any explanation related to the correct way of using pub/sub topics in GoogleIoT (the documentation is not so clear).

            This is my subscribe.py:

            ...

            ANSWER

            Answered 2018-Apr-04 at 18:23

            Edit: Clarifying based on comment below...

            There's two GCP components in play here. There's the MQTT topic (which is the /events topic), which is used by the device to talk to IoT Core. Then there's the projects/myprojectname/topics/sm1 which isn't in IoT Core, it's in Pub/Sub. When you send messages to the /events MQTT topic, IoT Core brokers the payloads from your device that was sent to the /events MQTT topic through to the Pub/Sub topic that was created and attached to the IoT Core registry where your device was registered.

            To see those messages, you have to create a subscription in Pub/Sub on the topic projects/myprojectname/topics/sm1. If you go to the console, and Pub/Sub->topics. Click the three dots next to the topic and select "New subscription". Once you have the subscription, you can send some data from your device, then on commandline you can run (assuming you have the gcloud tools installed):

            gcloud beta pubsub subscriptions pull --max-messages=3

            To do anything with the messages, you can script subscribing to the Pub/Sub topic (check out the Pub/Sub APIs) to trigger on messages being added to the topic.

            Original message:

            Are you sending a config message to the device? The confusion might be that the MQTT topics are one-directional.

            So: 1) the /events topic is for device->IoT Core. 2) the /config topic is for IoT Core Admin SDK->device

            In another script somewhere, or from the IoT Core UI interface you need to send a configuration message to see the on_message fire properly.

            In the IoT Core UI (on console.cloud.google.com) you can drill down to an individual device you have registered, and at the top of the screen, click on "Update Config". A popup window will come up that lets you send a text or a base64 encoded message to that device and it will come in on the /config topic.

            Source https://stackoverflow.com/questions/49638010

            QUESTION

            Google Cloud IoT - Invalid MQTT publish topic
            Asked 2018-Jun-17 at 21:25

            I am using a Python client with paho-mqtt to publish in this specific topic of Google Cloud IoT: projects/my_project/topics/sm1. My code is below, based on examples of the Google IoT documentation:

            ...

            ANSWER

            Answered 2018-Jun-05 at 04:55

            You have the incorrect topic name.

            It's confusing (I just hit this too).

            The client ID (as you have) must be:

            Source https://stackoverflow.com/questions/49907529

            QUESTION

            Is it possible to connect to the Google IOTCore MQTT Bridge via Javascript?
            Asked 2018-Apr-20 at 21:03

            I've been trying to use the javacscript version of the Eclipse Paho MQTT client to access the Google IOTCore MQTT Bridge, as suggested here:

            https://cloud.google.com/iot/docs/how-tos/mqtt-bridge

            However, whatever I do, any attempt to connect with known good credentials (working with other clients) results in this connection error:

            ...

            ANSWER

            Answered 2018-Apr-20 at 21:03

            I'm a Googler (but I don't work in Cloud IoT).

            Your code looks good to me and it should work. I will try it for myself this evening or tomorrow and report back to you.

            I've spent the past day working on a Golang version of the samples published on Google's documentation. Like you, I was disappointed to not see all Google's regular languages covered by samples.

            Are you running the code from a browser or is it running on Node.JS?

            Do you have a package.json (if Node) that you would share too please?

            Update

            Here's a Node.JS (JavaScript but non-browser) that connects to Cloud IoT, subscribes to /devices/${DEVICE}/config and publishes to /devices/${DEVICE}/events.

            https://gist.github.com/DazWilkin/65ad8890d5f58eae9612632d594af2de

            • Place all the files in the same directory
            • Replace values in index.js of the location of Google's CA and your key
            • Replaces [[YOUR-X]] values in config.json
            • Use "npm install" to pull the packages
            • Use node index.js

            You should be able to pull messages from the Pub/Sub subscription and you should be able to send config messages to the device.

            Source https://stackoverflow.com/questions/49418312

            QUESTION

            Connecting to IoT Core MQTT
            Asked 2018-Mar-05 at 20:00

            I am trying to connect to Google's MQTT server but I am getting errors I created all the certificates and registered my device (Adafruit huzzah32)

            and the documentation says you connect to mqtt.googleapis.com:8883

            So I do

            ...

            ANSWER

            Answered 2018-Mar-05 at 20:00

            here the IAM roles are being explained ...the paragraph here sounds alike what you describe:

            On the IAM page in Google Cloud Platform Console, verify that the role Cloud IoT Core Service Agent appears in the Members list for the relevant project service account. (Look for the project service account that ends in @gcp-sa-cloudiot.iam.gserviceaccount.com.)

            If the Cloud IoT Core Service Agent role does not appear in the Members list, use gcloud to add the cloudiot.serviceAgent role to the relevant project service account. This role includes permission to publish to Pub/Sub topics.

            if not yet having installed it, the Cloud SDK is required for all those gcloud CLI commands, which can be used to list & edit the configurations (of which all can be done through the console, as well)... it's maybe easier, because all of the examples there use it, too.

            update ...

            concerning JWT refresh tokens, see this article or have some Q & A or the specification: JSON Web Token (JWT), JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants. here's another relevant article: https://medium.com/google-cloud/refreshing-json-web-tokens-jwts-for-google-cloud-iot-core-897318df3836

            Source https://stackoverflow.com/questions/49056012

            QUESTION

            Connection uri of local MQTT broker
            Asked 2017-Feb-06 at 21:12

            I currently have two MQTT brokers both working perfectly fine. One of them is a Raspberry Pi on my local network. The other one is a remote broker hosted on CloudMQTT.

            The goal is to sync both brokers with each other. The easy solution for this, of course, is a bridge, but I'm having some trouble getting a proper bridge setup.

            As you can see in the image below, when I try to setup a bridge on CloudMQTT, it asks for a 'Connection uri'. For a remote broker, this would be mqtt://username:password@m20.cloudmqtt.com:1883, but I can't seem to figure out how to do this for a local broker.

            As far as I know, you can only connect to your local network when you have a static IP and the ports forwarded to the Raspberry Pi, so how would I be able to get around this? The two brokers need to keep a permanent TCP connection open, but the remote broker can't open it himself. Wouldn't it be possible for the local broker to open this connection? If so, how would I get the two brokers to sync?

            Any help is appreciated, thanks a lot for your help in advance!

            Edit:

            This is my full /etc/mosquitto/mosquitto.conf file:

            ...

            ANSWER

            Answered 2017-Feb-06 at 20:31

            You can create bridges with mosquitto, the "Configuring Bridges" section of the man page covers all the options, but the basics you will need are:

            Source https://stackoverflow.com/questions/42076363

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install mqtt-bridge

            You can install using 'npm i mqtt-bridge' or download it from GitHub, npm.

            Support

            Contributions, new/improved backbends or otherwise, are welcomed:.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i mqtt-bridge

          • CLONE
          • HTTPS

            https://github.com/mchmarny/mqtt-bridge.git

          • CLI

            gh repo clone mchmarny/mqtt-bridge

          • sshUrl

            git@github.com:mchmarny/mqtt-bridge.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular JavaScript Libraries

            freeCodeCamp

            by freeCodeCamp

            vue

            by vuejs

            react

            by facebook

            bootstrap

            by twbs

            Try Top Libraries by mchmarny

            knative-demos

            by mchmarnyShell

            vimp

            by mchmarnyGo

            s3cme

            by mchmarnyGo

            tsignal

            by mchmarnyGo