SlabPi: Difference between revisions

From NURDspace
No edit summary
Line 34: Line 34:
USB HID v1.10 Device [One small click One big change One small click One big change]  
USB HID v1.10 Device [One small click One big change One small click One big change]  
on usb-0000:00:1d.1-2/input0</pre>
on usb-0000:00:1d.1-2/input0</pre>
After reading [http://www.greygreen.org/blog/code/python/ecobutton-linux] I was hoping this would be easy, but it seems this particular button does not generate keypresses in X. So over to [https://github.com/s-leroux/hid_mapper]. Got an error similar to [https://github.com/Claudio-Sjo/HID_linux_xbmc_driver/issues/1]. After editing hid.c it compiles,
After reading [http://www.greygreen.org/blog/code/python/ecobutton-linux] I was hoping this would be easy, but it seems this particular button does not generate keypresses in X. So over to [https://github.com/s-leroux/hid_mapper]. Got an error similar to [https://github.com/Claudio-Sjo/HID_linux_xbmc_driver/issues/1]. After editing hid.c it compiles.


And it does stuff too \o/:
<pre>
dell@zeekoe:~/nizzle/hid_mapper$ sudo ./hid_mapper --learn --manufacturer 'One small click One big change' --product 'One small click One big change' --map
Found HID device
Opened HID interface on /dev/hidraw0
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
02 80 24 08 36 20 08 88
02 19 01 8f 92 11 00 a8
</pre>
So it seems that after the button is pressed, a sequence of two events is repeated X times (seems to depend on how long button is pressed).


==WiP==
==WiP==

Revision as of 23:23, 26 June 2017

SlabPi
Slabpi.jpg
Owner Invict
Status Infrastructure
Location Behind the printer
Tool No
Tool category

SlabPi

Slabpi.jpg {{{InventoryOwner}}}Property "Tool Owner" (as page type) with input value "{{{InventoryOwner}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. Behind the printer

SlabPi is the replacement for Slab on a Raspberry Pi 3. It has been moved, because of downscaling.

It runs the MPD Server and it has a SenseHAT for measuring temperature, humidity and atmospheric pressure on Raspbian.

MPD

Fixed an issue where MPD hangs on song change. Fix it by uncommenting "device" option in the "audio_output" block (in my case ALSA) in mpd.conf. This is a common error.


Connection through client.


Host: slabpi.dhcp.nurd.space

Port: 6600

SenseHAT

The measurements are locally readable on a Node-RED dashboard here. http://slabpi.dhcp.nurd.space:1880/ui/#/0 and public on https://metrics.nurd.space/dashboard/db/space-dash?refresh=1m&orgId=1

Eco button as mpd skip button

We have this cute usb Eco Button lying around, which is meant to put your computer in sleep mode in order to save energy. It would be nice if we could use it as an mpd next button.

Button gets recognized as shown in dmesg:

[ 1856.485618] hid-generic 0003:0C50:1010.0003: hiddev0,hidraw0: 
USB HID v1.10 Device [One small click One big change One small click One big change] 
on usb-0000:00:1d.1-2/input0

After reading [1] I was hoping this would be easy, but it seems this particular button does not generate keypresses in X. So over to [2]. Got an error similar to [3]. After editing hid.c it compiles.

And it does stuff too \o/:

dell@zeekoe:~/nizzle/hid_mapper$ sudo ./hid_mapper --learn --manufacturer 'One small click One big change' --product 'One small click One big change' --map
Found HID device
Opened HID interface on /dev/hidraw0
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8 
02 80 24 08 36 20 08 88 
02 19 01 8f 92 11 00 a8

So it seems that after the button is pressed, a sequence of two events is repeated X times (seems to depend on how long button is pressed).

WiP

To do:

  • Sensor measurement implementation on Nurdbot
  • SenseHAT died. Check on what's up.
  • SenseHAT is now directly above the Raspberry Pi 3 board, need to connect a 40 pin cable for better temperature measurement