I am attaching the kegboard to a kegberry running on a rasberrry pi. Everything works great except I can’t get the device to show up. Clearly it’s on /dev/ttyACM0, and
usb 1-1.3: USB disconnect, device number 6
Jan 26 21:13:01 raspberrypi kernel: [ 3916.322310] usb 1-1.3: new full-speed USB device number 7 using dwc_otg
Jan 26 21:13:01 raspberrypi kernel: [ 3916.437177] usb 1-1.3: New USB device found, idVendor=03eb, idProduct=0436
Jan 26 21:13:01 raspberrypi kernel: [ 3916.437213] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 26 21:13:01 raspberrypi kernel: [ 3916.437229] usb 1-1.3: Product: KegboardProMini
Jan 26 21:13:01 raspberrypi kernel: [ 3916.437243] usb 1-1.3: Manufacturer: Unknown
Jan 26 21:13:01 raspberrypi kernel: [ 3916.444489] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
But the server doesn’t pick it up when I plug it in. So I edited supervisord’s config and added --kegboard_device=/dev/ttyACM0 but this doesn’t seem to help either.
The kegboard appears to be working nicely (lights blinking properly, etc).
Jan 26 22:24:57 raspberrypi kernel: [ 633.903819] usb 1-1.3: USB disconnect, device number 4
Jan 26 22:25:02 raspberrypi kernel: [ 638.495326] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
Jan 26 22:25:02 raspberrypi kernel: [ 638.611084] usb 1-1.3: New USB device found, idVendor=03eb, idProduct=0436
Jan 26 22:25:02 raspberrypi kernel: [ 638.611121] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 26 22:25:02 raspberrypi kernel: [ 638.611137] usb 1-1.3: Product: KegboardProMini
Jan 26 22:25:02 raspberrypi kernel: [ 638.611150] usb 1-1.3: Manufacturer: Unknown
Jan 26 22:25:02 raspberrypi kernel: [ 638.618332] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
root@raspberrypi:~# lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 006: ID 03eb:0436 Atmel Corp.
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Works perfect. Could the problem be that I installed everything without the flow meter connected? I installed/setup the rasberry pi on my desk, then plugged in the flow meter at the keg later…
Alright! So the good news is the hardware is working; I’m guessing this is some sort of issue auto-detecting the meter.
While I try to reproduce it, are there any other USB-Serial devices connected to the RPi? The “auto detection” is a little primitive, and might be confused by similar-looking devices appearing on the bus. (And yes, it should be fine to plug it in later…)
Try running kegbot_core.py in one shell, and kegboard-daemon.py in another. The logs output from kegbot_core.py should show us whether the two programs are talking. (once a board is detected, core should report it back to the web server)
2015-01-27 01:24:49,607 INFO (kegnet) Listening on redis channel “kegnet”
2015-01-27 01:24:49,854 WARNING (sync-thread) API exception during sync: Invalid JSON response from server: No JSON object could be decoded
2015-01-27 01:25:37,089 WARNING (sync-thread) API exception during sync: Invalid JSON response from server: No JSON object could be decoded
2015-01-27 01:25:49,992 WARNING (sync-thread) API exception during sync: Invalid JSON response from server: No JSON object could be decoded
2015-01-27 01:26:19,398 INFO (TapManager) Not creating controller: Invalid JSON response from server: No JSON object could be decoded
2015-01-27 01:26:19,409 INFO (TapManager) Not creating controller: Invalid JSON response from server: No JSON object could be decoded
2015-01-27 01:26:37,226 WARNING (sync-thread) API exception during sync: Invalid JSON response from server: No JSON object could be decoded
2015-01-27 01:26:50,132 WARNING (sync-thread) API exception during sync: Invalid JSON response from server: No JSON object could be decoded
Traceback (most recent call last):
File “/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/pykeg/web/api/middleware.py”, line 72, in process_view
util.check_api_key(request)
File “/home/kegberry/kegbot-server.venv/local/lib/python2.7/site-packages/pykeg/web/api/util.py”, line 64, in check_api_key
raise kbapi.NoAuthTokenError(‘The parameter “api_key” is required’)
NoAuthTokenError: The parameter “api_key” is required
I verified everything else works fine, sans API key being presented to the API for a pour from the kegboard. I went ahead and added the data for the flowmeter directly to the DB, and called the API with my API key and the proper parameters. It indeed did record the pour and everything is dandy.
So that leaves this problem squarely with the API requiring a API key and the kegboard not sending one. I am not sure what the intended behavior is, perhaps the API is upgraded to require the API key and the kegboard needs new firmware to send it? (totally guessing here).
Mikey, what is your advise here? I will start poking at the code a bit and get myself oriented…
I am having very similar issues. I would REALLY like a new image of Kegberry. I tried a manual upgrade and it went… ok.
I will trying wiping and re-installing as well.