NEWS
Ethernet Relais mit ioBroker lesen und schalten
-
Hey SBorg,
hey Wendy2702,danke für Eure Hinweise.
Das mit red-Note und snmp habe ich gesehen.
red-note = steige ich überhaupt nicht durch...snmp = ich habe einfach mal versucht einen OID in einem blocky script auszuführen. es tut sich nix. das mit dem OID wäre der einfachste weg. Im Grunde muss nur jeder Port ein und ausschalten... (Bewässerung).
Habt ihr eine Idee?
Nochmals danke für die Hilfe, das ist alles nicht selbstverständig. Und Leute wie ich sind auf Euch angewiesen. Bin für jede Erkärung (wenn möglich für doofe wie mich) dankbar.Gruß, Jörg

-
Bevor wir mit iobroker weitermachen würde ich mal sicherstellen das du das Teil ansprechen kannst.
Hast ein Linux System?
Dann mal das aus der Docu testen:
11.4.2. Linux Usually most of Linux OS come with snmp tool installed. To check out if snmp is installed, just open one terminal and type: snmpget -v1 -c 000000000000 192.168.1.11 .1.3.6.1.4.1.19865.1.1.1.0 (Of course with your network settings) If you get some message like this: "snmp is not function" or "snmp not found", it seems that snmp is not installed and you have to follow the hints that the command line gives you. After that repeat step 1. Create bash file for example ON.vim and enter the following commands in it: #!/bin/bash snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 i 0 sleep 5s snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 i 1 Save the file Run it. In this way you will be able to set Relay 1 ON for 5 seconds and the Turn it OFF 11.4.3. Example commands o SNMPGET examples Get DAEnetIP2 IP address snmpget -v1 -c 000000000000 172.16.100.2 Denkovi.DAEnetIP2.Configuration.cfgIP.0 snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.1.1.0 Get the MAC Address snmpget -v1 -c 000000000000 172.16.100.2 Denkovi.DAEnetIP2.Configuration.cfgMAC.0 snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.1.2.0 Get P6.1 - This will read analog input 1 level. The rsult is from 0 up to 1023. snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.3.1.0 Get P6.8 This will read analog input 8 level. The rsult is from 0 up to 1023. snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.3.8.0 Get the whole P6 (This will return a byte number. Each bit is converted analog input value. This can be used for digital inputs reading of P6) snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.3.33.0 Get P3.1 - This will read digital output P3.1 level snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.1.1.0 DAEnetIP2 Eight Relay Module LM35DZ User Manual 13 Aug 2018 -36- DAEnetIP2 Eight Relay Module LM35DZ User Manual 13 Aug 2018 Get P3.8 - This will read digital output P3.8 level snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.1.8.0 Get the whole P3 snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.1.33.0 Get P5.1 - This will read digital output P5.1 level snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 Get P5.8 - This will read digital output P5.8 level snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.8.0 Get the whole P5 snmpget -v1 -c 000000000000 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.33.0 o SNMPSET examples Set DAEnetIP2 IP address snmpset -v1 -c private 172.16.100.2 Denkovi.DAEnetIP2.Configuration.cfgIP.0 a 172.16.100.3 snmpget -v1 -c private 172.16.100.3 .1.3.6.1.4.1.19865.1.1.1.0 a 172.16.100.3 Set P3.1 - This will set pin 1 from digital output port P3 in '0' (Low level) snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.1.1.0 i 0 Set P3.8 - This will set pin 1 from digital output port P3 in '1' (High level) snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.1.8.0 i 1 Set the whole P3 - This will set all the 8 pins from digital output port P3 in '1' snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.1.33.0 i 255 Set P5.1 - This will set pin 1 from digital output port P5 in '0' (Low level) snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 i 0 Set P5.8 - This will set pin 1 from digital output port P5 in '1' (High level) snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.8.0 i 1 Set the whole P5 - This will set all the 8 pins from digital output port P5 in '1' snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.33.0 i 255
-
wendy2702...
leider nicht... .
aber ich habe die DAE-iModules App runtergeladen.
von da kann ich die einzelnen channels ansteuern.
ich vermute, dass die app auch über smnp läuft (vermutung).....heul...
gruß, jörg
-
Also läuft dein Iobroker auf Windows?
Und auf demselben Rechner hast du auch die App installiert?
In der Docu steht auch ein Test auf Commandline für Windows.
-
auch so. nee hab iobroker auf raspberry, das ist ja linux...
so, ziehe mir mal schnell net-snmp... und versuche mal einen zugriff.
melde mich gleich... nicht weglaufen -
-
hey wendy,
ich teste gerade noch mit einem tool ob ich zugriff bekomme.
ich melde mich vermutlich erst morgen.
danke für die Zeit !!!
bis ggf. morgen... (sofern einer von euch zeit hat). -
sooooo !
da bin ich wieder.
ja, habe zugriff; habe das über ein snmp tool getestet:----------------------- New Test -----------------------
Paessler SNMP Tester 5.2.3 Computername: PC-BUERO Interface: 192.168.178.24
19.03.2019 22:10:37 (17 ms) : Device: 192.168.178.45
19.03.2019 22:10:37 (25 ms) : SNMP V1
19.03.2019 22:10:37 (34 ms) : Custom OID .1.3.6.1.4.1.19865.1.2.2.1.0
19.03.2019 22:10:40 (3005 ms) : SNMP Datatype: ASN_INTEGER
19.03.2019 22:10:40 (3015 ms) : -------
19.03.2019 22:10:40 (3025 ms) : Value: 0
19.03.2019 22:10:40 (3034 ms) : Doneich kann also eine OID erfassen.
Frage:
wie stellt man denn jetzt wohl den channel auf ein oder aus.
Sorry, aber die Anleitung auf Seite 28 verstehe ich nicht....http://denkovi.com/Documents/DAEnetIP2-and-peripheral-with-LM35/Current-Version/UserManual.pdf
dankeschön und irgendwann einen gute nacht !
jörg
-
@alf4711 sagte in Ethernet Relais mit ioBroker lesen und schalten:
ja, habe zugriff; habe das über ein snmp tool getestet:
Jetzt auf Windows oder vom PI aus?
-
habe ein tool auf windows genutzt.
mit ip adresse dann auf das ethernet board.
nicht über die raspberry -
ich habe auch den snmp adapter geladen.
jetzt muss ich doch über blockly den exce oid befehl geben können.
merkt man eigentlich, dass ich keine ahnung habe -
Probier doch erstmal per commandline auf dem Pi ein Relais zu schalten.
Seite 36 aus der Anleitung.
Musst natürlich die IP Adresse anpassen.
Z.B.:
snmpset -v1 -c private 172.16.100.2 .1.3.6.1.4.1.19865.1.2.2.1.0 i 0
Um das über Blockly zu testen den Befehl wenn er den funktioniert mal in einen exec block packen und auslösen.
-
ok, versucht. was mache ich falsch?
-
der rasp kennt den befehl nicht... oder muss ich irgendwie in einen anderen ordner wechseln?
-bash: snmpset: Kommando nicht gefunden.
-
Was kommt denn hier:
snmpget -v1 -c 000000000000 192.168.178.45 .1.3.6.1.4.1.19865.1.1.1.0
-
pi@ioBroker-RasPi:~ $ snmpget -v1 -c 000000000000 192.168.178.45 .1.3.6.1.4.1.19865.1.1.1.0 -bash: snmpget: Kommando nicht gefunden.
pi@ioBroker-RasPi:~ $ -
muss der port 161 noch dahinter???
-
sudo apt install snmp
Nach der Installation nochmal testen mit beiden Befehlen
-
Möchten Sie fortfahren? [J/n] j
Fehl:1 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libsnmp-base all 5.7.3+dfsg-1.7
404 Not Found [IP: 93.93.128.193 80]
Fehl:2 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libsnmp30 armhf 5.7.3+dfsg-1.7
404 Not Found [IP: 93.93.128.193 80]
Fehl:3 http://raspbian.raspberrypi.org/raspbian stretch/main armhf snmp armhf 5.7.3+dfsg-1.7
404 Not Found [IP: 93.93.128.193 80]
E: Fehlschlag beim Holen von http://raspbian.raspberrypi.org/raspbian/pool/main/n/net-snmp/libsnmp-base_5.7.3+dfsg-1.7_all.deb 404 Not Found [IP: 93.93.128.193 80]
E: Fehlschlag beim Holen von http://raspbian.raspberrypi.org/raspbian/pool/main/n/net-snmp/libsnmp30_5.7.3+dfsg-1.7_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Fehlschlag beim Holen von http://raspbian.raspberrypi.org/raspbian/pool/main/n/net-snmp/snmp_5.7.3+dfsg-1.7_armhf.deb 404 Not Found [IP: 93.93.128.193 80]
E: Einige Archive konnten nicht heruntergeladen werden; vielleicht »apt-get update« ausführen oder mit »--fix-missing« probieren?
pi@ioBroker-RasPi:~ $ -
hast du jemals ein „apt update“ gemacht?
Wenn nicht bitte mal ausführen.
Dann aber
sudo apt update sudo apt upgrade
Und dann nochmal
sudo apt install snmp