Send your iSpindel data to multiple services like Ubidots, Brewfather, Grainfather, Brewers Friend, Home Assistant, and more.
Configuration is stored in JSON format. A minimal configuration to send iSpindel data to an http service would look something like:
{
"serverPath": "/mySpindel",
"services": [
{
"type": "http",
"url": "http://example.com/endpoint"
}
]
}
In this example the server would listen on the path /mySpindel
and forward the iSpindel data to http://example.com/endpoint
.
See config.example.json
for reference.
By default, the server will look for a config.json
file in the root of this project to configure the services to send your iSpindel data to. This can be overriden by setting the CONFIG_FILE_PATH
to the full file system path of your configuration file.
serverPath
(optional) - the path for the server. If ommitted, the server will listen at the root.services
(required) - an array of service objects (seeconfig.example.json
):type
(required) - one of:http
- the main service which can be used to send data over HTTP or HTTPS:ubidots
- Ubidotshomeassistant
- Home Assistant
url
(required) - the URL to send todeviceLabel
(optional) - rename the device from what is configured in the iSpindel. Used for services like GrainFather and Brewfather which require a specific string in the name when using SG instead of Plato.headers
(optional) - a key-value object of headers and header values to send with the requesttoken
(optional) - the API token to send in the request for supported services (currently only used forubidots
andhomeassistant
)
Since the configuration may store sensitive information, it is a good idea to use environment variables for this info instead of storing it in config.json
. This allows you to version control your config without worrying about leaking keys or secrets.
To allow this, we use envsub for environment variable substitution using the ${MYVAR}
format. For example, if you were using ubidots
as a serivce, and set your Ubidots token in the UBIDOTS_TOKEN
environment variable, your config.json
would look something like:
{
"serverPath": "/mySpindel",
"services": [
{
"type": "ubidots",
"deviceLabel": "iSpindel",
"token": "${UBIDOTS_TOKEN}"
}
]
}
Deploy to your favorite node.js hosting service (see guide for deploying to Render).
yarn
yarn start
The server will listen on the port specified with the PORT
environment variable or 8080 if not set.
git clone https://github.com/chrisscott/iSpindel-multiservice
cd iSpindel-multiservice
yarn install
yarn run dev
The server will listen on the port specified with the PORT
environment variable or 8080 if not set.
Provides a service you can point your iSpindel to which then forwards the data to one or more supported services.
- You have an iSpindel and want to send data to Ubidots, Grainfather, Brewers Friend, a custom HTTP service, Home Assistant or more.
- You are on an old iSpindel firmware without HTTPS support want to send iSpindel data to a service that only supports HTTPS.
Currently, the following:
- HTTP - any HTTP or HTTPS endpoint
- Header-based token authentication is supported
- Ubidots
- Home Assistant
If there is a service missing you'd like to see, please submit an issue with the details.