stackmad

Joined 8 years ago

Karma
96
Submissions
29
Member since
Aug 22
An author of the Boden cross-platform framework. Find us at GitHub: https://github.com/ashampoosystems/boden
View on Hacker News

Recent submissions

Comment · 7 years ago
Author of boden here: We have since moved away from a self written smart pointer and replaced as much as possible with standard C++ classes ( shared_ptr, weak_ptr, std::string etc. )
Comment · 7 years ago
Actually its 9 plants ;)
Comment · 7 years ago
Yeah, you have to use IOKit, which hidapi wraps.
Comment · 7 years ago
LOL
Comment · 7 years ago
:) But the CO2 measurement part honestly came first.
Comment · 7 years ago
Sure, but I wanted to see the data over time. And I was bored :)
Comment · 7 years ago
Yeah, its quite ok.
Comment · 7 years ago
Totally true, but my soldering iron is in the basement, so ... ;)
Comment · 7 years ago
Yes, absolutely. I only have one device at the moment, but it sure would be interesting to see how fast the levels equalize between rooms
Comment · 7 years ago
Yes, I agree. But this was way more fun :)
Comment · 7 years ago
I guess it should match the outside air as close as possible. So around 400ppm
Comment · 7 years ago
Comment · 7 years ago
Though with your steps it at least starts, but the webserver fails, and CTRL+C doesn't work ^^

   * Serving Flask app "co2meter.server" (lazy loading)
   * Environment: production
     WARNING: Do not use the development server in a production environment.
     Use a production WSGI server instead.
   * Debug mode: off
  INFO:werkzeug: * Running on http://127.0.0.1:1201/ (Press CTRL+C to quit)
  ERROR:flask.app:Exception on / [GET]
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app
      response = self.full_dispatch_request()
    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
      rv = self.handle_user_exception(e)
    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception
      reraise(exc_type, exc_value, tb)
    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
      rv = self.dispatch_request()
    File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request
      return self.view_functions[rule.endpoint](**req.view_args)
    File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 64, in home
      data = read_logs()
    File "/usr/local/lib/python2.7/site-packages/co2meter/server.py", line 236, in read_logs
      with open(os.path.join('logs', name + '.csv'), 'r') as f:
  IOError: [Errno 2] No such file or directory: 'logs/co2.csv'
  INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET / HTTP/1.1" 500 -
  INFO:werkzeug:127.0.0.1 - - [25/Jan/2019 14:18:23] "GET /favicon.ico HTTP/1.1" 404 -
  ^C^C^C^C
  ^C^C
Comment · 7 years ago
That looks great as well! But for some reason the library they use (pyhidapi) would always crash on my Mac.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton