The goal of this project is to control the IO pins of a Raspberry Pi from cloud queues, rest endpoints or over websockets.
- For now, only Google Cloud Platform is supported.
- Configuration is handled in a config file. See config.json
- Credentials are to be generated and made available. See config.json for credentials filename.
- Create a project in GPC.
- Enable the PubSub API.
- Create a Topic.
- Create a subscription.
- Create a user with SUBSCRIBE on GCP PubSub. Download the
credentials.json
file. - Edit the app-config.json with details for your PubSub config.
- Clone the repo your local machine.
- Run
dep ensure --v
- Replace
projectID
,topicID
&credentialsFile
variables - Run
go run application.go
- The message must conform to type model/PinMessage.
- Use BCM codes as the PinIDs in the message.
- For more info on pins: see https://pinout.xyz/
- Set output pin n to on or off over GCP PubSub queue.
- Subscribe to pin as input as some interval (PubSub)
- Interrogate pin for ON or OFF
- AWS integration as an alternative.
- Websocket host and reverse connection for real-time output pin control.
- Subscribe to an input pin in with feedback at a paricular interval in real time.
- Use both clouds together for redundant message delivery.
- Keep history of events / other details for a particular length of time.
- Garbage collection of events
- Interrogate history remotely
*** This project in no way associated with the Raspberry Pi company. ***