ef-gy / rpi-ups-pico

Raspberry Pi UPS PIco control daemons.
https://ef.gy/documentation/rpi-ups-pico
MIT License
9 stars 2 forks source link

KEYA and KEYB? #1

Closed ScrumpyJack closed 8 years ago

ScrumpyJack commented 8 years ago

This is very cool. I don't like the python dependancy either. How do you feel about adding the ability to listen to changes in the 0x69 0x09 and 0x0A registars (KEYA and KEYB) and take action (void)system("whatever"); on keypress?

Like the tor gateway btw :+1:

EffinMaggie commented 8 years ago

Heya,

That sounds like a great idea, but I think that'd be better suited for a separate daemon. If for no other reason than that that doesn't really need root access to run - the i2c control interfaces work perfectly fine as unprivileged users with the right group set :).

So I'd think it'd make the most sense to create a userspace-controlled HID device for this. It should be possible to bind that to arbitrary actions pretty easily... I'll look into that over the weekend.

And cheers about the tor gateway - seemed like the perfect use for the little bugger ;).

EffinMaggie commented 8 years ago

I think I got the code for this sorted, but I left my Pi out of reach for the weekend. Gonna take it for a spin tomorrow, see what happens :).

EffinMaggie commented 8 years ago

... and it works like a charm. Added documentation and everything.

Enjoy and let me know if you need anything else :).

ScrumpyJack commented 8 years ago

I'll give it a shot one evening this week. Hopefully tonight