Maxim Devaev
977c8a1ade
refactoring
2021-09-24 09:33:15 +03:00
Maxim Devaev
b6a59941c8
kvmd/kvmd#62 : alternative implementation
2021-09-16 09:45:10 +03:00
Maxim Devaev
8f11fa3b91
small rebranding
2021-09-08 06:47:54 +03:00
Maxim Devaev
ca812117e4
improved pins validation
2021-09-08 06:08:11 +03:00
Maxim Devaev
5d1228eb9e
fix
2021-09-08 06:04:52 +03:00
Maxim Devaev
98ad1145a8
string pins
2021-09-08 05:43:36 +03:00
Maxim Devaev
cc5b2a42b8
refactoring
2021-09-07 10:31:28 +03:00
Maxim Devaev
2db0656df3
unified udc code and automatic driver detection
2021-08-28 19:01:13 +03:00
Maxim Devaev
a340fc6053
minor servo fixes
2021-08-15 10:26:13 +03:00
Shantur Rathore
c644a9f6e1
Implement servo angles ( #58 )
...
/etc/kvmd/override.yaml
```
kvmd:
gpio:
drivers:
servo1:
type: servo
chip: 0 # PWM Chip Number
period: 20000000 # Servo Motor SG90 Period in nano-seconds
duty_cycle_min: 350000 # Servo Motor SG90 duty_cycle for -90 degrees
duty_cycle_max: 2350000 # Servo Motor SG90 duty_cycle for +90 degrees
angle_max: 90 # Servo Motor SG90 angle at duty_cycle_max
angle_min: -90 # Servo Motor SG90 angle at duty_cycle_min
angle_push: 45 # Servo Motor SG90 angle to push button
angle_release: 20 # Servo Motor SG90 angle to release button
scheme:
short_press:
driver: servo1
pin: 0 # Pin number is the PWM channel number on the PWM Chip
mode: output
switch: false
pulse:
delay: 0.5
max_delay: 2
long_press:
driver: servo1
pin: 0 # Pin number is the PWM channel number on the PWM Chip
mode: output
switch: false
pulse:
delay: 2
max_delay: 2
extra_long_press:
driver: servo1
pin: 0 # Pin number is the PWM channel number on the PWM Chip
mode: output
switch: false
pulse:
delay: 10
max_delay: 20
view:
header:
title: Controls
table:
- ["#Servo - Short Press", "short_press|Press"]
- ["#Servo - Long Press", "long_press|Press"]
- ["#Servo - Extra Long Press", "extra_long_press|Press"]
```
2021-08-15 10:15:53 +03:00
Maxim Devaev
c6c4592dfb
servo template
2021-08-14 03:08:28 +03:00
Maxim Devaev
7d89a54572
refactoring
2021-08-14 02:01:37 +03:00
Shantur Rathore
e4903c5184
Implement button push using servo motors controlled via pwm ( #55 )
...
1. Add to /boot/config.txt
```
dtoverlay=pwm
```
2. Create /etc/udev/rules.d/99-kvmd-pwm.rules
```
SUBSYSTEM=="pwm*", ACTION=="add", RUN+="/bin/chgrp -R kvmd /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
SUBSYSTEM=="pwm*", ACTION=="change", ENV{TRIGGER}!="none", RUN+="/bin/chgrp -R kvmd /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
```
3. Connect Servo motor like SG90 PWM connection to RPi GPIO18, +5V and GND to a 5V and GND pin on header
4. Add to /etc/kvmd/override.yaml
```
kvmd:
gpio:
drivers:
servo1:
type: pwm
pwm_chip: 0 # PWM Chip Number
pwm_period: 20000000 # Servo Motor SG90 Period in nano-seconds
duty_cycle_push: 1500000 # Servo Motor SG90 duty_cycle for pushing button
duty_cycle_release: 1000000 # Servo Motor SG90 duty_cycle for releasing button
scheme:
short_press:
driver: servo1
pin: 0 # Pin number is the PWM channel number on the PWM Chip
mode: output
switch: false
pulse:
delay: 0.5
max_delay: 2
long_press:
driver: servo1
pin: 0 # Pin number is the PWM channel number on the PWM Chip
mode: output
switch: false
pulse:
delay: 2
max_delay: 2
extra_long_press:
driver: servo1
pin: 0 # Pin number is the PWM channel number on the PWM Chip
mode: output
switch: false
pulse:
delay: 10
max_delay: 20
view:
header:
title: Controls
table:
- ["#Servo - Short Press", "short_press|Press"]
- ["#Servo - Long Press", "long_press|Press"]
- ["#Servo - Extra Long Press", "extra_long_press|Press"]
```
2021-08-14 01:14:22 +03:00
Maxim Devaev
189ff59379
refactoring
2021-07-23 20:52:47 +03:00
Maxim Devaev
bc73e74161
fixed process waiting
2021-07-23 04:33:13 +03:00
Devaev Maxim
0c500aa0c9
moved wol to gpio
2021-07-17 01:57:01 +03:00
Devaev Maxim
416e093967
tesmart state_poll=10
2021-05-19 01:05:13 +03:00
Devaev Maxim
9f1182dd1b
async timeouts
2021-05-18 13:27:15 +03:00
David Shay
20c88b2170
fix socket timeout/zero based issues in tesmart ( #49 )
2021-05-18 13:11:05 +03:00
Devaev Maxim
61acd1c5e4
tesmart: check channel after switching
2021-05-16 06:16:14 +03:00
Devaev Maxim
8db0ab20e0
tesmart rewrite
2021-05-16 05:57:08 +03:00
David Shay
1fc8434f0a
Plugin support for TESMART switch - tesmart.py ( #47 )
2021-05-14 20:17:46 +03:00
Devaev Maxim
3566fbf37c
new protocol for ezcoo usb3
2021-05-09 21:56:38 +03:00
Devaev Maxim
e39f3d46d8
refactoring
2021-04-09 06:28:58 +03:00
Devaev Maxim
1ca341069d
ipmi gpio driver uses ipmitool
2021-04-09 06:20:51 +03:00
Devaev Maxim
6f60118320
async gpio plugins
2021-04-09 05:57:04 +03:00
Devaev Maxim
6cc161427a
ipmi pseudo-gpio driver
2021-04-09 02:53:26 +03:00
Devaev Maxim
4d4fb69d2e
refactoring
2021-01-23 07:00:49 +03:00
Devaev Maxim
c169f55204
update copy
2021-01-07 10:33:02 +03:00
Devaev Maxim
570dd04e29
otgbind pseudo-gpio plugin
2020-12-26 04:55:40 +03:00
Devaev Maxim
0adfe17f70
configurable gpio devices
2020-12-25 11:08:56 +03:00
Devaev Maxim
7debaa6776
refactoring
2020-12-02 15:35:11 +03:00
Devaev Maxim
5bc868662a
stop signals propagation in 3.9
2020-12-02 15:07:08 +03:00
Devaev Maxim
180251ec59
refactoring
2020-11-12 22:36:22 +03:00
Devaev Maxim
ad943811f9
ezcoo sw41ha as gpio
2020-10-25 02:44:43 +03:00
Devaev Maxim
cccf44655a
common env variables
2020-10-03 05:02:14 +03:00
Devaev Maxim
16946d1e0f
refactoring
2020-09-30 14:12:09 +03:00
Oleg Girko
a8589e48ab
Make kvmd compatible with libgpiod 1.2.
...
The singular default_val argument of gpiod.Line.request() method
was introduced in libgpiod 1.3.
For older versions of libgpiod, defailt_vals argument with list value
should be used.
This argument is available in newer versions of libgpiod as well
for compatibility.
This change is needed for Debian / Raspbian 10 that have libgpiod 1.2.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
2020-09-20 14:59:33 +01:00
Devaev Maxim
5c05276d46
fixed consumer names for libgpiod
2020-09-18 01:46:28 +03:00
Devaev Maxim
00069931c1
debounce for gpiod AioReader
2020-09-16 00:03:44 +03:00
Devaev Maxim
ee10435b81
common gpio path variable
2020-09-14 01:34:23 +03:00
Devaev Maxim
0ad0d17528
using libgpiod for the ugpio driver
2020-09-13 20:04:17 +03:00
Devaev Maxim
44c50aa4de
removed edge detection
2020-09-10 13:40:56 +03:00
Devaev Maxim
ff36ff203e
edge detection not available for pin r/w
2020-09-10 13:17:09 +03:00
Devaev Maxim
1d98f5ed04
experimental edge mode
2020-09-10 12:33:26 +03:00
Devaev Maxim
9cb5582565
only available gpio modes
2020-09-10 09:31:05 +03:00
Devaev Maxim
1901af17c3
hide device path
2020-09-09 14:30:17 +03:00
Devaev Maxim
170ed92bd4
cleanup on driver side
2020-09-09 12:52:45 +03:00
Devaev Maxim
b377123e48
hid relay driver
2020-09-09 10:00:08 +03:00
Devaev Maxim
4767a44af8
improved ugpio scheme api
2020-09-08 06:30:13 +03:00