Skip to content

Commit

Permalink
Improve README & example (#728)
Browse files Browse the repository at this point in the history
* update example and improve readme

* validate
  • Loading branch information
LDannijs authored Dec 21, 2023
1 parent a62d6ca commit 2cb3c5b
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 13 deletions.
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ One of the operating systems:

Development dependencies:

- Node.js version 16.x
- Node.js version 16.x
- (This is recommended, as newer versions may give errors)
- npm version 8.x
- Go version 1.18.x

Expand Down Expand Up @@ -94,19 +95,19 @@ An example directory structure with a vendor named `company-x` that produces two
```bash
lorawan-devices
├── vendor
│ ├── index.yaml # vendor index (1)
│ ├── index.yaml # vendor index (1)
│ ├── module-maker
│ │ └── module-profile-eu868.yaml # generic end device profile for EU868 (4)
│ ├── company-x
│ │ ├── index.yaml # vendor device index (2)
│ │ ├── logo.svg # vendor logo
│ │ ├── device-a.jpg # photo of device-a
│ │ ├── device-a.yaml # device-a definition (3)
│ │ ├── device-b.jpg # photo of device-b
│ │ ├── device-b.yaml # device-b definition (3)
│ │ ├── index.yaml # vendor device index (2)
│ │ ├── logo.svg # vendor logo
│ │ ├── device-a.png # photo of device-a
│ │ ├── device-a.yaml # device-a definition (3)
│ │ ├── device-b.png # photo of device-b
│ │ ├── device-b.yaml # device-b definition (3)
│ │ ├── custom-profile-us915.yaml # end device profile for US915 (4)
│ │ ├── codec.js # payload codec implementation (6)
│ │ └── codec.yaml # payload codec definition (5)
│ │ ├── codec.js # payload codec implementation (6)
│ │ └── codec.yaml # payload codec definition (5)
```

### Vendor Index
Expand Down Expand Up @@ -156,7 +157,7 @@ endDevices:
- device-b
```

All end device identifiers must be lowercase, alphanumeric with dashes and max 36 characters.
All end device identifiers must be lowercase, alphanumeric with dashes and max 36 characters. **Make sure you include every device you add.**

### End Device

Expand Down Expand Up @@ -204,6 +205,14 @@ There are many other fields that can be set: hardware versions, firmware version

> **NOTE** It is highly recommended to fill out as many information about the end devices as possible. The definition above is the bare minimum information.

### End Device Image

There are a few guidelines to follow for images:
- At least 1 image of each device you intent to add.
- Make sure the image has a transparent background.
- Image should be of high quality.
- The image cannot be bigger then 2000 x 2000 pixels.

### End Device Profile

Each referenced end device profile needs to be defined in the **End device profile**, with the same filename as the profile ID: `vendor/<vendor-id>/<profile-id>.yaml`:
Expand Down
Binary file removed vendor/example/windsensor-package.jpg
Binary file not shown.
Binary file added vendor/example/windsensor-package.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed vendor/example/windsensor.jpg
Binary file not shown.
Binary file added vendor/example/windsensor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions vendor/example/windsensor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ msrp:

# Photos
photos:
main: windsensor.jpg
main: windsensor.png # Image needs to have a transparent background
other:
- windsensor-package.jpg
- windsensor-package.png # Image needs to have a transparent background

# Youtube or Vimeo Video (optional)
videos:
Expand Down

0 comments on commit 2cb3c5b

Please sign in to comment.