Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPIO Tastatur #133

Open
majorkalina opened this issue Oct 4, 2015 · 3 comments
Open

GPIO Tastatur #133

majorkalina opened this issue Oct 4, 2015 · 3 comments

Comments

@majorkalina
Copy link

Hallo Freunde,
ich versuchte in BananaPi DoorPi installieren! Alles geht gut, alles funktioniert fabelhaft ausser GPIO tastatur. Ich habe for, PiFace zu kaufen, aber bis dahin Ich moechte aus Neugier kennen, wo den Fehler steckt. Wenn Ich starte DoorPi mit diese tastatur konfiguriert, DorPi faelt nieder und in log ist geschrieben:

Fehler [ERROR] [doorpi.main] Exception NameError: an integer is required

Ich denke, dass

[TRACE] [doorpi.conf.config_object] get_integer for key bouncetime in section onboardpins_keyboard (default: 2000) returns 2000.0

ist die Ursache.

Bitte um hilfe und Danke im voraus.

Log:

2015-10-04 14:38:18,409 [TRACE]         [doorpi.conf.config_object] get_integer for key bouncetime in section onboardpins_keyboard (default: 2000) returns 2000.0
2015-10-04 14:38:18,410 [TRACE]         [doorpi.conf.config_object] get_integer for key polarity in section onboardpins_keyboard (default: 0) returns 0
2015-10-04 14:38:18,412 [DEBUG]         [doorpi.keyboard.from_gpio] doorpi.keyboard.from_gpio loaded
BAPI: revision(1)
2015-10-04 14:38:18,417 [DEBUG]         [doorpi.keyboard.from_gpio] __init__(input_pins = ['11', '7'], output_pins = ['18', '7', '16'], bouncetime = 2000.0, polarity = 0)
2015-10-04 14:38:18,419 [ERROR]         [doorpi.main] Exception NameError: an integer is required
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/doorpi/main.py", line 153, in main_as_application
    try:                        doorpi.DoorPi(parsed_arguments).run()
  File "/usr/local/lib/python2.7/dist-packages/doorpi/doorpi.py", line 234, in run
    if not self.__prepared: self.prepare(self.__parsed_arguments)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/doorpi.py", line 149, in prepare
    self.__keyboard     = load_keyboard()
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/KeyboardInterface.py", line 20, in load_keyboard
    return KeyboardHandler(config_keyboards)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/KeyboardInterface.py", line 98, in __init__
    self.__keyboards[keyboard_name] = load_single_keyboard(keyboard_name)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/KeyboardInterface.py", line 46, in load_single_keyboard
    conf_post = conf_post
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/from_gpio.py", line 13, in get
    def get(**kwargs): return GPIO(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/from_gpio.py", line 28, in __init__
    RPiGPIO.setup(self._InputPins, RPiGPIO.IN, pull_up_down = RPiGPIO.PUD_DOWN)
TypeError: an integer is required
2015-10-04 14:38:18,424 [DEBUG]         [doorpi.doorpi] destroy doorpi

2015-10-04 14:38:18,409 [TRACE]         [doorpi.conf.config_object] get_integer for key bouncetime in section onboardpins_keyboard (default: 2000) returns 2000.0
2015-10-04 14:38:18,410 [TRACE]         [doorpi.conf.config_object] get_integer for key polarity in section onboardpins_keyboard (default: 0) returns 0
2015-10-04 14:38:18,412 [DEBUG]         [doorpi.keyboard.from_gpio] doorpi.keyboard.from_gpio loaded
BAPI: revision(1)
2015-10-04 14:38:18,417 [DEBUG]         [doorpi.keyboard.from_gpio] __init__(input_pins = ['11', '7'], output_pins = ['18', '7', '16'], bouncetime = 2000.0, polarity = 0)
2015-10-04 14:38:18,419 [ERROR]         [doorpi.main] Exception NameError: an integer is required
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/doorpi/main.py", line 153, in main_as_application
    try:                        doorpi.DoorPi(parsed_arguments).run()
  File "/usr/local/lib/python2.7/dist-packages/doorpi/doorpi.py", line 234, in run
    if not self.__prepared: self.prepare(self.__parsed_arguments)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/doorpi.py", line 149, in prepare
    self.__keyboard     = load_keyboard()
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/KeyboardInterface.py", line 20, in load_keyboard
    return KeyboardHandler(config_keyboards)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/KeyboardInterface.py", line 98, in __init__
    self.__keyboards[keyboard_name] = load_single_keyboard(keyboard_name)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/KeyboardInterface.py", line 46, in load_single_keyboard
    conf_post = conf_post
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/from_gpio.py", line 13, in get
    def get(**kwargs): return GPIO(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/doorpi/keyboard/from_gpio.py", line 28, in __init__
    RPiGPIO.setup(self._InputPins, RPiGPIO.IN, pull_up_down = RPiGPIO.PUD_DOWN)
TypeError: an integer is required
2015-10-04 14:38:18,424 [DEBUG]         [doorpi.doorpi] destroy doorpi

doorpi.ini:

[keyboards]
onboardpins = gpio
virtuell = filesystem

[virtuell_keyboard]
base_path_output = /var/DoorPI/keyboard/outputs/
base_path_input = /var/DoorPI/keyboard/inputs/

[virtuell_OutputPins]
16 = open_door 0
7 = power supply
18 = is_alive_led

[virtuell_InputPins]
11 = call:1002
;13 = call:1002
;15 = call:**613
7 = mailto:[email protected],DoorPi:OnOpenDoor,The door was opened

[onboardpins_keyboard]
polarity = 0
bouncetime = 2000

[onboardpins_OutputPins]
16 = open_door 0
7 = power supply
18 = is_alive_led

[onboardpins_InputPins]
11 = call:1002
;13 = call:1002
;15 = call:**613
7 = mailto:[email protected],DoorPi:OnOpenDoor,The door was opened

[AdminNumbers]
1002 = active
@motom001
Copy link
Owner

motom001 commented Oct 4, 2015

Ähnliches Problem gab es schon einmal. Die BananaPi Version von GPIO basiert auf einer alten Version von RPi.GPIO und kann keine list of integers verarbeiten. Ich bau nen workaround oder Suche die Lösung vom letzten mal im Laufe dieser Woche

@majorkalina
Copy link
Author

Danke schön,
ich dachte so etwas.

motom001 added a commit that referenced this issue Oct 5, 2015
@norbi-bpi
Copy link

Hi,
bei mir besteht ein ähnliches Problem. Habe auch die GPIO BananaPi Version. Gibt es da schon Abhilfe?

log:
2015-12-06 16:53:25,546 [TRACE] [doorpi.conf.config_object] get_string for key haustueroeffner in section virtuell_OutputPins (default: ) returns tueroeffner
2015-12-06 16:53:25,547 [INFO] [doorpi.keyboard.KeyboardInterface] trying to add keyboard 'testsystem' to handler
2015-12-06 16:53:25,548 [TRACE] [doorpi.conf.config_object] get_string for key testsystem in section keyboards (default: dummy) returns gpio
2015-12-06 16:53:25,549 [TRACE] [doorpi.conf.config_object] get_keys for section testsystem_InputPins returns ['18', '27', '22']
2015-12-06 16:53:25,551 [TRACE] [doorpi.conf.config_object] get_keys for section testsystem_OutputPins returns ['18', '17']
2015-12-06 16:53:25,552 [TRACE] [doorpi.conf.config_object] get_integer for key bouncetime in section testsystem_keyboard (default: 2000) returns 2000.0
2015-12-06 16:53:25,554 [TRACE] [doorpi.conf.config_object] get_integer for key polarity in section testsystem_keyboard (default: 0) returns 0
2015-12-06 16:53:25,558 [DEBUG] [doorpi.keyboard.from_gpio] doorpi.keyboard.from_gpio loaded
2015-12-06 16:53:25,573 [DEBUG] [doorpi.keyboard.from_gpio] init(input_pins = ['18', '27', '22'], output_pins = ['18', '17'], bouncetime = 2000.0, polarity = 0)
2015-12-06 16:53:25,575 [DEBUG] [doorpi.doorpi] destroy doorpi
2015-12-06 16:53:25,577 [DEBUG] [doorpi.doorpi] Threads before starting shutdown: [<_MainThread(MainThread, started -1225322496)>, <Thread(OnWebServerStart from doorpi.status.webserver, started -1236343712)>, <InotifyBuffer(Thread-3, started daemon -1246759840)>, <InotifyObserver(Thread-1, started daemon -1265634208)>, <InotifyEmitter(Thread-2, started daemon -1257245600)>]

[testsystem_InputPins]
18 = call:**4000
27 = call:**613
22 = call:**613

[testsystem_OutputPins]
17 = Tueroeffner
18 = Stromversorgung

[testsystem_keyboard]
bouncetime = 2000
mode = BCM
polarity = 0
#pressed_on_keydown = True
#pull_up_down = PUD_DOWN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants