Giter Club home page Giter Club logo

gpio's People

Contributors

joesie avatar mschlenstedt avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gpio's Issues

Bitte die LoxBerry Systemvariablen benutzen

https://github.com/joesie/io/blob/3974af74366815ffe0dd2fe18599d3353c8e5ff3/webfrontend/htmlauth/index.cgi#L53

Wenn du LoxBerry::System includest, hast du immer die Pfade zu deinem Plugin als Variablen verfügbar.

Z.B. $lbphtmlauthdir zeigt immer in dein htmlauth, oder $lbpbindir zu deinen bin's.

Alle Variablen, die's gibt, stehen hier: https://www.loxwiki.eu/display/LOXBERRY/Perl-Modul+LoxBerry%3A%3ASystem

Grundsätzlich solltest du nie absolute Pfade, sondern Variablen verwenden. Michael's System bei der Plugininstallation kann den Pfad eines Plugins ändern, wenn ein Ordner nicht unique ist. Mit den Variablen ist sichergestellt, dass du immer in "deinen" Verzeichnissen operierst.

EDIT/PS: Das sind halt so Feinheiten, aber ist erstmal nicht so gravierend, aber langfristig besser :-)

Update from 2.0.7 to current version dosen't work

When user update the plugin from a fewer version like 2.0.7, the new version doesn't work. If they reinstall the older version, the older version works again.

It looks like, that the new version can't work with the old plugin configuration.

Not Working with Raspberry 4 B+

Die Ports können mit dem Raspberry 4 B+ nicht mehr geschaltet werden. Ich vermute es liegt am verwendeten pigpiod.service. Da ich ihn auch über die Konsole nicht setzen kann.

loxberry@lob-dg1:~ $ pigs modes 17 w
loxberry@lob-dg1:~ $ pigs w 17 1
loxberry@lob-dg1:~ $ pigs r 17
0
loxberry@lob-dg1:~ $ pigs w 17 1
loxberry@lob-dg1:~ $ pigs r 17
0
loxberry@lob-dg1:~ $ pigs w 17 0
loxberry@lob-dg1:~ $ pigs r 17
0
loxberry@lob-dg1:~ $ sudo systemctl status pigpiod
● pigpiod.service - Daemon required to control GPIO pins via pigpio
   Loaded: loaded (/lib/systemd/system/pigpiod.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-05-10 20:17:02 CEST; 1 weeks 3 days ago
 Main PID: 177 (pigpiod)
    Tasks: 4 (limit: 4035)
   Memory: 964.0K
   CGroup: /system.slice/pigpiod.service
           └─177 /usr/bin/pigpiod -l -n 127.0.0.1

May 21 10:47:53 lob-dg1 pigpiod[175]: 2020-05-21 10:47:53 pthSocketThreadHandler: Socket 6 closed
May 21 10:47:56 lob-dg1 pigpiod[175]: 2020-05-21 10:47:56 pthSocketThread: Connection accepted on socket 5
May 21 10:47:56 lob-dg1 pigpiod[175]: 2020-05-21 10:47:56 pthSocketThread: SO_KEEPALIVE enabled on socket 5
May 21 10:47:56 lob-dg1 pigpiod[175]: 2020-05-21 10:47:56 pthSocketThreadHandler: Socket 5 closed
May 21 10:48:00 lob-dg1 pigpiod[175]: 2020-05-21 10:48:00 pthSocketThread: Connection accepted on socket 6
May 21 10:48:00 lob-dg1 pigpiod[175]: 2020-05-21 10:48:00 pthSocketThread: SO_KEEPALIVE enabled on socket 6
May 21 10:48:00 lob-dg1 pigpiod[175]: 2020-05-21 10:48:00 pthSocketThreadHandler: Socket 6 closed
May 21 10:48:02 lob-dg1 pigpiod[175]: 2020-05-21 10:48:02 pthSocketThread: Connection accepted on socket 5
May 21 10:48:02 lob-dg1 pigpiod[175]: 2020-05-21 10:48:02 pthSocketThread: SO_KEEPALIVE enabled on socket 5
May 21 10:48:02 lob-dg1 pigpiod[175]: 2020-05-21 10:48:02 pthSocketThreadHandler: Socket 5 close

User friendly names

The pins can be switch by using GPIO number. But its also good to have user friendly and configurable names to use PINs

UI Error when no MQTT Plugin installed

The UI perl script checked, if a mqtt plugin is installed and already configured.
The corefunction I use has a bug . When the mqtt plugin isn't installed it comes to an error and no webseide will be publish.

Error:
Can't use string ("") as a HASH ref while "strict refs" in use at /opt/loxberry/libs/perllib/LoxBerry/IO.pm line 499.
Depending of what you have done, report this error to the plugin developer or the LoxBerry-Core team.
Further information you may find in the error logs.

Switch several Outputs with one request

For example:
​​​​​​1. Bei einem allgemeinen Topic des Plugin Json-Dataset akzeptieren:
publish loxberry/gpio/set/json { "0": "on", "3": "off", "4":"off"}
Das wäre primitiv zu parsen und zu loopen.

  1. Dezimalwert und Binärstrings akzeptieren
    publish loxberry/gpio/set/dec 54
    54 = 00110110
    publish loxberry/gpio/set/bin 00110110
    bin zuerst implementieren, und Dec rechnet in bin um und ruft die Bin-Funktion auf.

After plugin update, restart daemon

After update/upgrade the daemon doesn't restart at the moment.
From istallation log:
INFO: Start MQTT GPIO client
bash: /opt/loxberry/bin/plugins//wrapper.sh: No such file or directory

Update MQTT Error state

In some cases, a main error can come up. This error would be shown in a MQTT message.
But at the moment this error state doesn't remove anymore.

Retain in all publish calls

It is not sure, that the MQTT Gateway is up and ready before this plugin starts.
So in some situation it is possible that the plugin sends messages, before the gateway is up.

External MQTT Broker

Add option to use an external MQTT Broker (e. g. MQTT Gateway Plugin running on another LoxBerry).

GPIO 27 not supported

Currently it's possible to configure GPIO27 as output(input.
But it isn't possible yet to switch it. The loop in line 259 isn't correct.

troubleshooting mit plugin "MQTT"

Hallo, bei mir ist folgender Fehler aufgetreten:
Ich übertrage 1-Wire Temperatursensoren über den Mosquitto Broker. Als ich danach dein GPIO plugin installiert habe, konnte sich der Broker nicht mehr anmelden. Möglicherweise besteht hier ein Port Problem.

lg Michael

Retry if MQTT broker not running

At the moment the plugin try to connect the broker one time. If the broker is still not running a exception comes.

A better way is, to reconnect if a exception throws.

Given loglevel not used

The MQTT doesn't use the loglevel. At the moment you can change it, but the logging is always in debug mode

Counter inputs

It would be nice to read higher frequencies from GPIO input.
For that case it's necessary to implement a special handling.

cron job dosn't work

The cron job script ends with an error when the plugin isn't running.

Message:
gpio: line 38: syntax error: unexpected end of file

Ich schreib mal hier - zu spät für WhatsApp Gebimmel :-)

Hat ein wenig gedauert - ich war die Woche im Ausland, und heute musste ich auch noch Miniserver-SD-Karte tauschen (kaputt), und trotzdem auch das Wetter ausnutzen :-)

Ich hab leider keine Relais am Pi, deswegen habe ich keinen Live-Test mit Relais machen können.
Ein paar Sachen habe ich dir eh als Issues erstellt.

Beim Einrichten hab ich nicht recht gewusst, was ich in die Felder hineinschreiben soll. Oben war mir klar, aber unten? Ich habe dann im Code nachgeschaut, und das ist somit einfach die GPIO-Nummer. Wäre es nicht logischer, wenn ich als Parameter gleich die GPIO-Nummer mitgebe, statt die Nummer vom Plugin?

Das Senden funktioniert, cool wäre noch, wenn auch bei OK ein Text als Result käme.
Ob das, was ich sende, ankommt, weiß ich nicht genau, wie ich das prüfen kann.

Beim Speichern der Ausgangsnummern bekomme ich einen Fehler 500, aber gespeichert wird trotzdem. Ich habe 0, 1, 2 probiert
image

Dann hab ich noch gesehen, dass mir das Plugin bei jedem Reboot eine Notification sendet (Siiehe Screenshot). Das kommt definitiv von dir, weil ich habe gar kein Sonos ;-)

image

Das GUI und die falschen Eingaben der Benutzer sind das Schwierigste! :-)

lg, Christian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.