Temp Graph Question


So now that I got my temperature thingy going I was looking at my keg details and noticed I now have a new temperature graph and I can tell by the wave when my kegerator kicks on and when it kicks off. Couple of questions, there seems to be roughly 70 data entry points between peak and valley, what does 70 data points mean in relation to time? Two, are there any other ways\methods to look at the temperature fluctuations and get a time line associated with those? I’m just wanting to collect data on how often my kegerator compressor is actually running to keep the temp between 33-35 degrees.



Temperature data is recorded once per minute (max, could be less if the device is reporting less frequently).

You can get raw data from the api, navigate to /api/thermo-sensors and /api/thermo-sensors/kegboard.thermo-whatever/logs for examples.


Long time but I never said Thanks!!! So… Thank you… :slight_smile:



I am trying to get the raw data from the api but I am getting a JSON serialization error.

output of “curl

  "objects": [
      "nice_name": "", 
      "sensor_name": "thermo-f2041600a18bff28", 
      "id": 1, 
      "last_log": {
        "temperature_c": 4.0625, 
        "sensor_id": 1, 
        "id": 951081, 
        "time": "2017-05-29T16:40:00+00:00"
      "nice_name": "", 
      "sensor_name": "thermo-56041590557bff28", 
      "id": 2, 
      "last_log": {
        "temperature_c": 3.4375, 
        "sensor_id": 2, 
        "id": 951082, 
        "time": "2017-05-29T16:40:00+00:00"
  "meta": {
    "result": "ok"

When I try to get more details on either sensors I get an exception.

output of “curl

TypeError at /api/v1/thermo-sensors/thermo-f2041600a18bff28
<ThermoSensor: thermo-f2041600a18bff28> is not JSON serializable

I also tried to find a way to set a nice_name for the thermo sensors (in case the issue was with the length of the sensor_name string) but I wasn’t able to.

Any help would be appreciated.


I found a temporary workaround for this.
I am not really sure what I am breaking by doing this, but if I modify the default method in /data/kb/local/lib/python2.7/site-packages/kegbot/util/kbjson.py and return right after the datetime instance check, now the api works.

 41 class JSONEncoder(json.JSONEncoder):
 42   """JSONEncoder which translate datetime instances to ISO8601 strings."""
 43   def default(self, obj):
 44     if isinstance(obj, datetime.datetime):
 45       return isodate.datetime_isoformat(obj)
 46     #return json.JSONEncoder.default(self, obj)
 47     return

line 46 is the default one that I commented out, line 47 is what I added.
I will keep playing with it to see what I am breaking with this, but so far so good.