Close

maybe last log before I join the Hackaday Price 2017...

A project log for CM3 Board + Backend-Library + Bee Hive Monitor

An open solution enabling everone to build and maintain a IoT enabled sensor network. BeeStalker is the reference for you project!

johannwilhelmjohann.wilhelm 03/29/2017 at 20:140 Comments

I think I'll join the Hackaday Price 2017 once again.. actually there are only very few similarities between my last entry and this one... but this means I will need to make a new project :(

One is the use of JSON for the data handling. This is due to the fact that I'm a pretty lazy guy :)

Down below is the lastest commit to the local cache database... as you see I have my USB sensors well working :)

The web-part will come next... I do not really expect too much troubles there because I now (in contrast to the last beestalker revision) have an RTC, and possibly GPS available. That means I can do a "getLatestDataSampleTime" request on the client and after that just a "pushSample" for all new items.

Btw, time-values are valid below as well as temperatures. The HX711 has floating inputs... Latitude, Longitude and Altitude are maked :)

If you have comments to this structure - drop me a comment ...

[
  {
    "Id": "{d098fa5e-ebc0-4d56-b19e-d5417343c8e3}",
    "Provider": "LocalRtcTimeSource",
    "Time": {
      "Time": 1490817657817,
      "TimeUtc": 1490817657817
    }
  },
  {
    "Id": "{f484c1db-ad1c-4d1a-94c5-730176eff2ff}",
    "Measurement": {
      "Altitude": 1234.56789,
      "GpsTime": 1490817658000,
      "Latitude": 1234.56789,
      "LocalTimeOffset": -222,
      "Longitude": 1234.56789
    },
    "Provider": "Gpsd"
  },
  {
    "BeeStalkerUsb": {
      "DeviceId": "222100",
      "HardwareVersion": 1,
      "MaxProtocolVersion": 0,
      "MinProtocolVersion": 0,
      "ProductId": "bee",
      "SerialNumber": " 0 0 0 0 0 1 ce1",
      "SoftwareVersion": 1,
      "USBPath": 1.8375812379578e+19
    },
    "Id": "{40d8b8cc-ddb2-4277-b4c7-7088904a5270}",
    "Measurement": {
      "Humidity": 26.9462890625,
      "Pressure": 985.750625,
      "Temperature": 29.840000152588
    },
    "Provider": "Usb2221-Bme280"
  },
  {
    "BeeStalkerUsb": {
      "DeviceId": "71100",
      "HardwareVersion": 1,
      "MaxProtocolVersion": 0,
      "MinProtocolVersion": 0,
      "ProductId": "bee",
      "SerialNumber": " 0 0 0 0 0 0 0 1",
      "SoftwareVersion": 2,
      "USBPath": 1.8378345654369e+19
    },
    "Id": "{94f87402-121e-4d16-9ef6-b33feab73eff}",
    "Measurement": {
      "Calibration": {
        "CalibrationScale1": {
          "Alpha1": 1,
          "Alpha2": 1.1000000238419,
          "Offset": 1.2999999523163,
          "Tref": 1.3999999761581,
          "k": 1.2000000476837,
          "useScaleTempSensor": 15
        },
        "CalibrationScale2": {
          "Alpha1": 2,
          "Alpha2": 2.0999999046326,
          "Offset": 2.2999999523163,
          "Tref": 2.4000000953674,
          "k": 2.2000000476837,
          "useScaleTempSensor": 25
        },
        "Hx711Averaging": 16,
        "Hx711isGain128": 0,
        "OneWire18s20ParasiticPower": 0
      },
      "Results": {
        "TempInternal": 24.5,
        "TempInternalValid": 1,
        "TempScale1": 26.125,
        "TempScale2": 26.0625,
        "TempScalesValid": 1,
        "WeightScale1": -40483472,
        "WeightScale1Raw": -1311419,
        "WeightScale2": -5976594.5,
        "WeightScale2Raw": -56217,
        "WeightValid": 1
      },
      "Status": {
        "Checkpoint": 6,
        "Function": 0,
        "Lm75Timeout": 0,
        "Value": 0
      }
    },
    "Provider": "UsbHx711"
  }
]

Discussions