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.
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.
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.