A Raspberry Pi server to manage messages to be sent to the CactusPi Client.
- Raspberry Pi
- Publisher
- AWS SQS
- PubNub
- MQTT (Home Assistant)
- CommandManager
/hello- sends'Hello World!'to cactuspi client/message/:message- sends given message to cactuspi client/start- sends start command to start the message queue on cactuspi client/stop- sends stop command to pause the message queue on cactuspi client (can resume with start command)/clear- sends clear command to empty the message queue on cactuspi client/end- sends end command to stop and empty the message queue on cactuspi client
Cactus Pi Server is importing the plugins from the Cactus Pi Service library. Some of the availale plugins are:
- Download cactuspi-server.
git clone https://github.com/dannielum/cactuspi-server.git
cd cactuspi-server
npm i
- Create config.json.
cd cactuspi-server
cp config.json.sample config.json
- Open config.json and set the
addressandportof the service. - Replace the SQS, PubNub, or MQTT configs in
config.json. - Set
pubsubTypetosns,pubnub, ormqttinconfig.json. - Run
npm start
To test if your server is running, run
curl localhost:8081/hello
Assuming you are running it on localhost with port 8081. You should see Hello World! is returned on the terminal if the server is responding.