GithubHelp home page GithubHelp logo

domenicoblanco / gbridge_client Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 12 KB

A Python client that links RPi GPIO and Google Assistant with MQTT

License: MIT License

Python 100.00%
mqtt googleassistant assistant raspberry pi raspberry-pi-gpio gbridge

gbridge_client's Introduction

gBridge_client

This is an unofficial client to connect Raspberry Pi's GPIO to Google Assistant using Kappelt gBridge

Installation

Debian

First of all, create a new gBridge account. Install the dependencies.

  $ sudo apt install python3 mosquitto
  $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  $ python3 get-pip.py
  $ pip3 install paho-mqtt

Let's setup Mosquitto Open with a text editor with admin privileges the following path /etc/mosquitto/mosquitto.conf, we will use nano:

 $ sudo nano /etc/mosquitto/mosquitto.conf

and copy the following configuration making sure to edit text inside the brackets {}

 connection kappelt-gbridge
 address mqtt.gbridge.kappelt.net:8883
 bridge_attempt_unsubscribe true
 cleansession true
 remote_username {gbridge-mqtt-username}
 remote_password {gbridge-mqtt-password}
 topic gBridge/u{gbridge-userid}/d{device-id}/{onoff} both 0 "" ""
 topic gBridge/u{gbridge-userid}/d{device-id}/{onoff}/set both 0 "" ""
 #you might need to change the path of the CA files
 bridge_capath /etc/ssl/certs/
 bridge_tls_version tlsv1.2

❗gBridge credentials are available here. Remember to set your password in that page. Restart Mosquitto

 $ sudo service mosquitto restart

Now we're ready to setup our client, let's set it up. Open the client and edit MQTT_TOPIC and PIN according to your needs and your gBridge topic's name. Start the client Your client is complete, it's time to execute it with python3 client.py

TODO

  • Improve English
  • Write Windows setup guide
  • Write macOS setup guide

gbridge_client's People

Contributors

domenicoblanco avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.