feat(pkg/db): postgres database

This commit is contained in:
2019-08-20 21:37:45 +02:00
parent c0aa155f36
commit 60ee044b88
53 changed files with 2269 additions and 81 deletions

View File

@ -0,0 +1,69 @@
package goldenfiles
import (
"bytes"
"encoding/json"
"strings"
"testing"
"github.com/go-flucky/flucky/pkg/types"
"github.com/stretchr/testify/require"
)
func CompareMeasuredValues(t *testing.T, goldenInterface interface{}, testInterface interface{}) {
require := require.New(t)
goldenBuffer := new(bytes.Buffer)
testBuffer := new(bytes.Buffer)
jsonEncoder := json.NewEncoder(goldenBuffer)
jsonEncoder.SetIndent("", " ")
err := jsonEncoder.Encode(&goldenInterface)
require.NoError(err)
jsonEncoder = json.NewEncoder(testBuffer)
jsonEncoder.SetIndent("", " ")
err = jsonEncoder.Encode(&testInterface)
require.NoError(err)
// t.Log(goldenBuffer.String(), testBuffer.String())
require.Equal(goldenBuffer.String(), testBuffer.String(), "Expected are not equal with actual value")
}
func GetGoldenDevices(goldenFilePath string) ([]*types.Device, error) {
file := string(MustAsset(goldenFilePath))
reader := strings.NewReader(file)
devices := make([]*types.Device, 0)
jsonDecoder := json.NewDecoder(reader)
err := jsonDecoder.Decode(&devices)
if err != nil {
return nil, err
}
return devices, nil
}
func GetGoldenMeasuredValues(goldenFilePath string) ([]*types.MeasuredValue, error) {
f := string(MustAsset(goldenFilePath))
r := strings.NewReader(f)
measuredValues := make([]*types.MeasuredValue, 0)
jsonDecoder := json.NewDecoder(r)
err := jsonDecoder.Decode(&measuredValues)
if err != nil {
return nil, err
}
return measuredValues, nil
}
func GetGoldenSensors(goldenFilePath string) ([]*types.Sensor, error) {
f := string(MustAsset(goldenFilePath))
r := strings.NewReader(f)
sensors := make([]*types.Sensor, 0)
jsonDecoder := json.NewDecoder(r)
err := jsonDecoder.Decode(&sensors)
if err != nil {
return nil, err
}
return sensors, nil
}

View File

@ -0,0 +1,9 @@
[
{
"device_id": "1efc3092-871e-4ac4-b0d4-ea5e5715460d",
"device_name": "poseidon",
"device_location": null,
"device_last_contact": null,
"creation_date": "2019-03-06T20:02:48.839308+01:00"
}
]

View File

@ -0,0 +1,142 @@
[
{
"id": "f94bb22a-d896-4bf7-bb48-74acd9211698",
"value": "45",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:20.409105+02:00",
"till_date": "2019-08-23T20:38:21.369122+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401141+02:00",
"update_date": "2019-08-23T20:41:05.347411+02:00"
},
{
"id": "4bf1f15f-2175-454d-b711-7642600437e4",
"value": "75",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:22.249136+02:00",
"till_date": "2019-08-23T20:38:22.249137+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401477+02:00",
"update_date": null
},
{
"id": "8e7653a4-c9c6-418c-8acb-73e73023cad2",
"value": "66",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:23.289123+02:00",
"till_date": "2019-08-23T20:38:23.289124+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401789+02:00",
"update_date": null
},
{
"id": "4dd27ac3-ec52-4453-9391-2f8483574161",
"value": "64.5",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:24.16919+02:00",
"till_date": "2019-08-23T20:38:24.169192+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401447+02:00",
"update_date": null
},
{
"id": "0e5ccd47-3ca0-4fe1-875b-a248790d44df",
"value": "64.25",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:25.209098+02:00",
"till_date": "2019-08-23T20:38:25.209117+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401447+02:00",
"update_date": null
},
{
"id": "9de64ca1-b4bd-4a0b-a750-1f751eb36031",
"value": "64",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:26.169711+02:00",
"till_date": "2019-08-23T20:38:27.049147+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401975+02:00",
"update_date": "2019-08-23T20:41:05.347447+02:00"
},
{
"id": "8c952afc-6824-4b06-bfd0-16a0d8c5fc80",
"value": "78",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:28.089+02:00",
"till_date": "2019-08-23T20:38:28.089+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401457+02:00",
"update_date": null
},
{
"id": "780c1008-fb17-494b-9c61-e0a34245d63c",
"value": "77",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:28.969711+02:00",
"till_date": "2019-08-23T20:38:28.96974+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401141+02:00",
"update_date": null
},
{
"id": "b206b39d-9f80-4ba8-bb6b-d171abc3c458",
"value": "61",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:30.009741+02:00",
"till_date": "2019-08-23T20:38:30.969711+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401668+02:00",
"update_date": "2019-08-23T20:41:05.347446+02:00"
},
{
"id": "4d381d84-a56c-4bc8-89c7-ea41b2432eaf",
"value": "55.25",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:31.929108+02:00",
"till_date": "2019-08-23T20:38:38.569141+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.407891+02:00",
"update_date": "2019-08-23T20:41:05.347789+02:00"
},
{
"id": "07ce5f6c-d860-448e-98cd-b390bdcf63b3",
"value": "55",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:39.529164+02:00",
"till_date": "2019-08-23T20:38:40.569106+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401456+02:00",
"update_date": "2019-08-23T20:41:05.347789+02:00"
},
{
"id": "18145034-237e-4066-a998-0dd1b4a0a3b4",
"value": "50",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:41.529216+02:00",
"till_date": "2019-08-23T20:38:41.529217+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401789+02:00",
"update_date": null
},
{
"id": "56794741-0758-401b-8697-e42998a53d2d",
"value": "49.5",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:42.489113+02:00",
"till_date": "2019-08-23T20:38:42.489114+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401789+02:00",
"update_date": null
},
{
"id": "7dbf1aa5-a122-4ba7-8444-fc7aac22246f",
"value": "48.5",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:43.369131+02:00",
"till_date": "2019-08-23T20:46:04.409158+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.401221+02:00",
"update_date": "2019-08-23T20:46:05.341739+02:00"
}
]

View File

@ -0,0 +1,422 @@
[
{
"id": "f94bb22a-d896-4bf7-bb48-74acd9211698",
"value": "45",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:20.409105+02:00",
"till_date": "2019-08-23T20:38:21.369122+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4bf1f15f-2175-454d-b711-7642600437e4",
"value": "75",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:22.249136+02:00",
"till_date": "2019-08-23T20:38:22.249137+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "8e7653a4-c9c6-418c-8acb-73e73023cad2",
"value": "66",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:23.289123+02:00",
"till_date": "2019-08-23T20:38:23.289124+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "4dd27ac3-ec52-4453-9391-2f8483574161",
"value": "64.5",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:24.16919+02:00",
"till_date": "2019-08-23T20:38:24.169192+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "0e5ccd47-3ca0-4fe1-875b-a248790d44df",
"value": "64.25",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:25.209098+02:00",
"till_date": "2019-08-23T20:38:25.2091+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "9de64ca1-b4bd-4a0b-a750-1f751eb36031",
"value": "64",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:26.169175+02:00",
"till_date": "2019-08-23T20:38:27.049148+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "8c952afc-6824-4b06-bfd0-16a0d8c5fc80",
"value": "78",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:28.089115+02:00",
"till_date": "2019-08-23T20:38:28.089116+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "780c1008-fb17-494b-9c61-e0a34245d63c",
"value": "77",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:28.969102+02:00",
"till_date": "2019-08-23T20:38:28.969104+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "b206b39d-9f80-4ba8-bb6b-d171abc3c458",
"value": "61",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:30.009139+02:00",
"till_date": "2019-08-23T20:38:30.969136+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4d381d84-a56c-4bc8-89c7-ea41b2432eaf",
"value": "55.25",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:31.929108+02:00",
"till_date": "2019-08-23T20:38:38.569141+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "07ce5f6c-d860-448e-98cd-b390bdcf63b3",
"value": "55",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:39.529164+02:00",
"till_date": "2019-08-23T20:38:40.569106+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "18145034-237e-4066-a998-0dd1b4a0a3b4",
"value": "50",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:41.529216+02:00",
"till_date": "2019-08-23T20:38:41.529217+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "56794741-0758-401b-8697-e42998a53d2d",
"value": "49.5",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:42.489113+02:00",
"till_date": "2019-08-23T20:38:42.489114+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "7dbf1aa5-a122-4ba7-8444-fc7aac22246f",
"value": "48.5",
"value_type": "humidity",
"from_date": "2019-08-23T20:38:43.369131+02:00",
"till_date": "2019-08-23T20:46:04.409158+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:46:05.341739+02:00"
},
{
"id": "f94bb22a-d896-4bf7-bb48-74acd9211698",
"value": "100146.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:20.409105+02:00",
"till_date": "2019-08-23T20:38:21.369122+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4bf1f15f-2175-454d-b711-7642600437e4",
"value": "100147.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:22.249136+02:00",
"till_date": "2019-08-23T20:38:22.249137+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "8e7653a4-c9c6-418c-8acb-73e73023cad2",
"value": "100144.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:23.289123+02:00",
"till_date": "2019-08-23T20:38:23.289124+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "4dd27ac3-ec52-4453-9391-2f8483574161",
"value": "100666.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:24.16919+02:00",
"till_date": "2019-08-23T20:38:24.169192+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "0e5ccd47-3ca0-4fe1-875b-a248790d44df",
"value": "100612.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:25.209098+02:00",
"till_date": "2019-08-23T20:38:25.2091+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "9de64ca1-b4bd-4a0b-a750-1f751eb36031",
"value": "100550.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:26.169175+02:00",
"till_date": "2019-08-23T20:38:27.049148+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "8c952afc-6824-4b06-bfd0-16a0d8c5fc80",
"value": "100609.750",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:28.089115+02:00",
"till_date": "2019-08-23T20:38:28.089116+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "780c1008-fb17-494b-9c61-e0a34245d63c",
"value": "100609.250",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:28.969102+02:00",
"till_date": "2019-08-23T20:38:28.969104+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "b206b39d-9f80-4ba8-bb6b-d171abc3c458",
"value": "100146.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:30.009139+02:00",
"till_date": "2019-08-23T20:38:30.969136+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4d381d84-a56c-4bc8-89c7-ea41b2432eaf",
"value": "100149.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:31.929108+02:00",
"till_date": "2019-08-23T20:38:38.569141+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "07ce5f6c-d860-448e-98cd-b390bdcf63b3",
"value": "100114.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:39.529164+02:00",
"till_date": "2019-08-23T20:38:40.569106+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "18145034-237e-4066-a998-0dd1b4a0a3b4",
"value": "100149.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:41.529216+02:00",
"till_date": "2019-08-23T20:38:41.529217+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "56794741-0758-401b-8697-e42998a53d2d",
"value": "100166.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:42.489113+02:00",
"till_date": "2019-08-23T20:38:42.489114+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "7dbf1aa5-a122-4ba7-8444-fc7aac22246f",
"value": "100178.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:43.369131+02:00",
"till_date": "2019-08-23T20:46:04.409158+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:46:05.341739+02:00"
},
{
"id": "f94bb22a-d896-4bf7-bb48-74acd9211698",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:20.409105+02:00",
"till_date": "2019-08-23T20:38:21.369122+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4bf1f15f-2175-454d-b711-7642600437e4",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:22.249136+02:00",
"till_date": "2019-08-23T20:38:22.249137+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "8e7653a4-c9c6-418c-8acb-73e73023cad2",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:23.289123+02:00",
"till_date": "2019-08-23T20:38:23.289124+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "4dd27ac3-ec52-4453-9391-2f8483574161",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:24.16919+02:00",
"till_date": "2019-08-23T20:38:24.169192+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "0e5ccd47-3ca0-4fe1-875b-a248790d44df",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:25.209098+02:00",
"till_date": "2019-08-23T20:38:25.2091+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "9de64ca1-b4bd-4a0b-a750-1f751eb36031",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:26.169175+02:00",
"till_date": "2019-08-23T20:38:27.049148+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "8c952afc-6824-4b06-bfd0-16a0d8c5fc80",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:28.089115+02:00",
"till_date": "2019-08-23T20:38:28.089116+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "780c1008-fb17-494b-9c61-e0a34245d63c",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:28.969102+02:00",
"till_date": "2019-08-23T20:38:28.969104+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "b206b39d-9f80-4ba8-bb6b-d171abc3c458",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:30.009139+02:00",
"till_date": "2019-08-23T20:38:30.969136+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4d381d84-a56c-4bc8-89c7-ea41b2432eaf",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:31.929108+02:00",
"till_date": "2019-08-23T20:38:38.569141+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "07ce5f6c-d860-448e-98cd-b390bdcf63b3",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:39.529164+02:00",
"till_date": "2019-08-23T20:38:40.569106+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "18145034-237e-4066-a998-0dd1b4a0a3b4",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:41.529216+02:00",
"till_date": "2019-08-23T20:38:41.529217+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "56794741-0758-401b-8697-e42998a53d2d",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:42.489113+02:00",
"till_date": "2019-08-23T20:38:42.489114+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "7dbf1aa5-a122-4ba7-8444-fc7aac22246f",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:43.369131+02:00",
"till_date": "2019-08-23T20:46:04.409158+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:46:05.341739+02:00"
}
]

View File

@ -0,0 +1,142 @@
[
{
"id": "f94bb22a-d896-4bf7-bb48-74acd9211698",
"value": "100146.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:20.409105+02:00",
"till_date": "2019-08-23T20:38:21.369122+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4bf1f15f-2175-454d-b711-7642600437e4",
"value": "100147.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:22.249136+02:00",
"till_date": "2019-08-23T20:38:22.249137+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "8e7653a4-c9c6-418c-8acb-73e73023cad2",
"value": "100144.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:23.289123+02:00",
"till_date": "2019-08-23T20:38:23.289124+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "4dd27ac3-ec52-4453-9391-2f8483574161",
"value": "100666.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:24.16919+02:00",
"till_date": "2019-08-23T20:38:24.169192+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881587+02:00",
"update_date": null
},
{
"id": "0e5ccd47-3ca0-4fe1-875b-a248790d44df",
"value": "100612.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:25.209098+02:00",
"till_date": "2019-08-23T20:38:25.2091+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "9de64ca1-b4bd-4a0b-a750-1f751eb36031",
"value": "100550.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:26.169175+02:00",
"till_date": "2019-08-23T20:38:27.049148+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "8c952afc-6824-4b06-bfd0-16a0d8c5fc80",
"value": "100609.750",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:28.089115+02:00",
"till_date": "2019-08-23T20:38:28.089116+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "780c1008-fb17-494b-9c61-e0a34245d63c",
"value": "100609.250",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:28.969102+02:00",
"till_date": "2019-08-23T20:38:28.969104+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "b206b39d-9f80-4ba8-bb6b-d171abc3c458",
"value": "100146.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:30.009139+02:00",
"till_date": "2019-08-23T20:38:30.969136+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4d381d84-a56c-4bc8-89c7-ea41b2432eaf",
"value": "100149.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:31.929108+02:00",
"till_date": "2019-08-23T20:38:38.569141+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "07ce5f6c-d860-448e-98cd-b390bdcf63b3",
"value": "100114.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:39.529164+02:00",
"till_date": "2019-08-23T20:38:40.569106+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "18145034-237e-4066-a998-0dd1b4a0a3b4",
"value": "100149.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:41.529216+02:00",
"till_date": "2019-08-23T20:38:41.529217+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "56794741-0758-401b-8697-e42998a53d2d",
"value": "100166.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:42.489113+02:00",
"till_date": "2019-08-23T20:38:42.489114+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "7dbf1aa5-a122-4ba7-8444-fc7aac22246f",
"value": "100178.500",
"value_type": "pressure",
"from_date": "2019-08-23T20:38:43.369131+02:00",
"till_date": "2019-08-23T20:46:04.409158+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:46:05.341739+02:00"
}
]

View File

@ -0,0 +1,44 @@
[
{
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"sensor_name": "DS18B20-rechts",
"sensor_location": "Wohnzimmer",
"wire_id": "28-02131dbffeaa",
"i2c_bus": null,
"i2c_address": null,
"gpio_number": "GPIO14",
"sensor_model": "DS18B20",
"sensor_enabled": false,
"sensor_last_contact": null,
"device_id": "1efc3092-871e-4ac4-b0d4-ea5e5715460d",
"creation_date": "2019-03-06T20:02:48.839304+01:00"
},
{
"sensor_id": "84eac248-6927-4db6-b6f9-7891ce2d301e",
"sensor_name": "DS18B20-links",
"sensor_location": "Wohnzimmer",
"wire_id": "28-01131646f11d",
"i2c_bus": null,
"i2c_address": null,
"gpio_number": "GPIO14",
"sensor_model": "DS18B20",
"sensor_enabled": false,
"sensor_last_contact": null,
"device_id": "1efc3092-871e-4ac4-b0d4-ea5e5715460d",
"creation_date": "2019-03-06T20:03:08.215219+01:00"
},
{
"sensor_id": "4c1a4549-483f-44de-9ce0-459b577e6244",
"sensor_name": "BME280",
"sensor_location": "",
"wire_id": null,
"i2c_bus": 1,
"i2c_address": 118,
"gpio_number": null,
"sensor_model": "BME280",
"sensor_enabled": true,
"sensor_last_contact": null,
"device_id": "1efc3092-871e-4ac4-b0d4-ea5e5715460d",
"creation_date": "2019-06-30T13:42:24.089319+02:00"
}
]

View File

@ -0,0 +1,142 @@
[
{
"id": "f94bb22a-d896-4bf7-bb48-74acd9211698",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:20.409105+02:00",
"till_date": "2019-08-23T20:38:21.369122+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.839308+02:00"
},
{
"id": "4bf1f15f-2175-454d-b711-7642600437e4",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:22.249136+02:00",
"till_date": "2019-08-23T20:38:22.249137+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "8e7653a4-c9c6-418c-8acb-73e73023cad2",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:23.289123+02:00",
"till_date": "2019-08-23T20:38:23.289124+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "4dd27ac3-ec52-4453-9391-2f8483574161",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:24.16919+02:00",
"till_date": "2019-08-23T20:38:24.169192+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "0e5ccd47-3ca0-4fe1-875b-a248790d44df",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:25.209098+02:00",
"till_date": "2019-08-23T20:38:25.2091+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "9de64ca1-b4bd-4a0b-a750-1f751eb36031",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:26.169175+02:00",
"till_date": "2019-08-23T20:38:27.049148+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "8c952afc-6824-4b06-bfd0-16a0d8c5fc80",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:28.089115+02:00",
"till_date": "2019-08-23T20:38:28.089116+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "780c1008-fb17-494b-9c61-e0a34245d63c",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:28.969102+02:00",
"till_date": "2019-08-23T20:38:28.969104+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "b206b39d-9f80-4ba8-bb6b-d171abc3c458",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:30.009139+02:00",
"till_date": "2019-08-23T20:38:30.969136+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "4d381d84-a56c-4bc8-89c7-ea41b2432eaf",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:31.929108+02:00",
"till_date": "2019-08-23T20:38:38.569141+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "07ce5f6c-d860-448e-98cd-b390bdcf63b3",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:39.529164+02:00",
"till_date": "2019-08-23T20:38:40.569106+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:41:05.347223+02:00"
},
{
"id": "18145034-237e-4066-a998-0dd1b4a0a3b4",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:41.529216+02:00",
"till_date": "2019-08-23T20:38:41.529217+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "56794741-0758-401b-8697-e42998a53d2d",
"value": "25",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:42.489113+02:00",
"till_date": "2019-08-23T20:38:42.489114+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": null
},
{
"id": "7dbf1aa5-a122-4ba7-8444-fc7aac22246f",
"value": "25.5",
"value_type": "temperature",
"from_date": "2019-08-23T20:38:43.369131+02:00",
"till_date": "2019-08-23T20:46:04.409158+02:00",
"sensor_id": "efcd755e-82d1-4789-a50b-355b8735b8d8",
"creation_date": "2019-08-23T20:41:05.40881+02:00",
"update_date": "2019-08-23T20:46:05.341739+02:00"
}
]