Browse Source

send (hard coded) authorization token

master
Stefan Haslinger 6 months ago
parent
commit
6d422ac2dc
  1. 9
      publisher/lib/publisher.ex
  2. 2
      sensor_hub/README.md

9
publisher/lib/publisher.ex

@ -38,10 +38,13 @@ defmodule Publisher do
defp publish(state) do
result =
:post
|> Finch.build(
Finch.build(
:post,
state.weather_tracker_url,
[{"Content-Type", "application/json"}],
[
{"Content-Type", "application/json"},
{"authorization", "shiqbNfVhL91JZOtqK0896BYJfZbUDrI2ERIzmoc"}
],
Jason.encode!(state.measurements)
)
|> Finch.request(WeatherTrackerClient)

2
sensor_hub/README.md

@ -15,6 +15,6 @@ SensorHub is an **IOT-Demo Project Weather Station**
* Create firmware with `mix firmware`
* Burn to an SD card with `mix firmware.burn`
The SD-Card Reader is properly detected.
* Upload to the device with `mix upload`
* Upload to the device with `mix upload hub.local`
for Sensors and Links see the corresponding Wiki pages.

Loading…
Cancel
Save