Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ex_doc to process grisp dep #42

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
name: Erlang/OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}}
strategy:
matrix:
otp: ['25.2.3']
rebar3: ['3.20.0']
otp: ['27.1']
rebar3: ['3.24.0']
steps:
- uses: erlef/setup-beam@v1
with:
Expand All @@ -33,3 +33,8 @@ jobs:
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.STRITZINGER_BOT_SSH_KEY }}'
rebar3 ct
- name: Run ex_doc
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.STRITZINGER_BOT_SSH_KEY }}'
rebar3 ex_doc
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,43 @@

GRiSP.io Client Library for GRiSP

Table of content
## Table of content

- [grisp\_connect](#grisp_connect)
- [Usage](#usage)
- [Option 1. Use the `rebar3_grisp` plugin](#option-1-use-the-rebar3_grisp-plugin)
- [Option 2. Add `grisp_connect` Manually to your Application](#option-2-add-grisp_connect-manually-to-your-application)
- [Further Steps](#further-steps)
- [Check whether the board is connected](#check-whether-the-board-is-connected)
- [Link your Device to your GRiSP.io Account](#link-your-device-to-your-grispio-account)
- [Table of content](#table-of-content)
- [Usage](#usage)
- [Option 1. Use the `rebar3_grisp` plugin](#option-1-use-the-rebar3_grisp-plugin)
- [Option 2. Add `grisp_connect` Manually to your Application](#option-2-add-grisp_connect-manually-to-your-application)
- [Further Steps](#further-steps)
- [Check whether the board is connected](#check-whether-the-board-is-connected)
- [Link your Device to your GRiSP.io Account](#link-your-device-to-your-grispio-account)
- [Troubleshooting:](#troubleshooting)
- [Need to Unlink a Device?](#need-to-unlink-a-device)
- [Environment Options](#environment-options)
- [Environment Options](#environment-options)
- [`connect`](#connect)
- [`ntp`](#ntp)
- [`ws_request_timeout`](#ws_request_timeout)
- [`ws_ping_timeout`](#ws_ping_timeout)
- [`logs_interval`](#logs_interval)
- [`logs_batch_size`](#logs_batch_size)
- [Custom TLS options](#custom-tls-options)
- [See all Logs on GRiSP.io](#see-all-logs-on-grispio)
- [Development](#development)
- [Local Development](#local-development)
- [Development on GRiSP Hardware](#development-on-grisp-hardware)
- [Production on GRiSP Hardware](#production-on-grisp-hardware)
- [See all Logs on GRiSP.io](#see-all-logs-on-grispio)
- [Development](#development)
- [Local Development](#local-development)
- [Development on GRiSP Hardware](#development-on-grisp-hardware)
- [Production on GRiSP Hardware](#production-on-grisp-hardware)


Add this application as a dependency in your GRiSP2 project.
Your board will connect securely using mTLS to the [GRiSP.io](https://grisp.io) services.

# Usage
## Usage

## Option 1. Use the `rebar3_grisp` plugin
### Option 1. Use the `rebar3_grisp` plugin

The `configure` method of the `rebar3_grisp` version >= 2.6.0 will add `grisp_connect` with the needed configurations to your GRiSP application. See [GRiSP Wiki/Use-your-GRiSP-2-board-with-GRiSP.io](https://github.com/grisp/grisp/wiki/Use-your-GRiSP-2-board-with-GRiSP.io).

## Option 2. Add `grisp_connect` Manually to your Application
### Option 2. Add `grisp_connect` Manually to your Application

Add

Expand All @@ -59,9 +60,9 @@ You can find your device linking token on [GRiSP.io/grisp_manager](https://grisp

You can also skip this configuration and insert the token manually later.

# Further Steps
## Further Steps

## Check whether the board is connected
### Check whether the board is connected

```erlang
> grisp_connect:is_connected().
Expand All @@ -70,7 +71,7 @@ true
{ok,<<"pong">>}
```

## Link your Device to your GRiSP.io Account
### Link your Device to your GRiSP.io Account

```erlang
> grisp_connect:link_device(<<"...">>).
Expand Down Expand Up @@ -100,7 +101,7 @@ We currently do not expose a public API to unlink a Device. Please reach out to

If you encounter any problems or have questions, don't hesitate to contact [support](mailto:[email protected]). Happy coding!

# Environment Options
## Environment Options

### `connect`

Expand Down Expand Up @@ -147,7 +148,7 @@ grisp_connect sets the following options as default values if no `tls_server_tru
]
```

# See all Logs on GRiSP.io
## See all Logs on GRiSP.io

Once this app is started, it forwards all logs to GRiSP.io without the need of setting up anything. The only logs that we do not catch are the ones generated before `grisp_connect` boots.
If you want to see ALL logs, even from applications that boot before `grisp_connect`, you need to disable the default logger handler and set the grisp_connect handler as the default one. This involves changing the `kernel` and `grisp_connect` app configuration settings in your sys.config file.
Expand Down Expand Up @@ -182,9 +183,9 @@ You can copy paste these settings. Here we both swap the default logger handler
].
```

# Development
## Development

## Local Development
### Local Development

Add an entry in your local hosts file so the domain www.seawater.local points
to your local development server.
Expand All @@ -197,7 +198,7 @@ Run tests:

rebar3 ct

## Development on GRiSP Hardware
### Development on GRiSP Hardware

Add an entry in the grisp hosts file so the domain www.seawater.local points
to your local development server.
Expand All @@ -215,8 +216,7 @@ rebar.config and then run:

rebar3 as dev grisp deploy


## Production on GRiSP Hardware
### Production on GRiSP Hardware

To deploy on GRiSP hardware for production, configure rebar3_grisp's deploy
configuration in rebar.config and then run:
Expand Down
12 changes: 12 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,17 @@
{add, grisp_cryptoauth, [{erl_opts, [{d, 'EMULATE_CRYPTOAUTH'}]}]}
]},
{ct_opts, [{sys_config, "./config/test.config"}]}
]},
{docs,[
{deps, [
{grisp_emulation, "0.2.2"}
]},
{overrides, [
{add, grisp, [{erl_opts, [
{d, 'GRISP_HRL'},
{d, 'EMULATION_BACKEND', {grisp2, grisp_emulation}}
]}
]}
]}
]}
]}.
Loading