Skip to content

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

License

Notifications You must be signed in to change notification settings

domenicoblanco/gBridge_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages