Seite 4 von 5
Re: UDP: "SwitchAll" IO schaltet nur an, nicht aus
Verfasst: Dienstag 19. April 2016, 13:05
von dantec
Hallo Andy,
ich hab ein Problem mit dem Befehl "IO(state_byte)...": ich kann die IOs nur an-, aber nicht mehr ausschalten.
Hast du eine Idee was ich falsch mache?
Einzeln mit IO_on/IO_off funktionierts. Sw(state_byte) für die Relais funktioniert mit demselben code (nur "IO" gege "Sw" getauscht). Über HTTP geht es auch. Im Web-Interface sind alle IOs als Ausgänge konfiguriert, eingeschaltet, nicht invertiert, ansonsten keine Häkchen.
Testfunktion fürs C# "Multi NET-PwrCtrl"-Projekt [Form1.cs]:
Code: Alles auswählen
private void switchGPIO(IPAddress ip, int id, bool on_off)
{
byte state = 0;
if(on_off) state |= (byte)(1 << id);
udp.Switch_all(ip, "IO", state, User, Password);
}
Hardware: NET-PwrCtrl-HUT
Firmware: NET-PWRCTRL_06.0
Re: UDP Steuerungsprotokoll
Verfasst: Dienstag 19. April 2016, 13:34
von andy
Hi dantec,
if(on_off) state |= (byte)(1 << id);
funktioniert nur wenn on_off==true sonst state = 0 also alle abgeschaltet;
IO === Sw in der Syntax.
Musste gehen.
LG Andy
Re: UDP Steuerungsprotokoll
Verfasst: Dienstag 19. April 2016, 13:47
von dantec
Hallo Andy,
falls du Zeit hast, probier das doch bitte mal aus.
Mit dem Code kann ich alle IOs anschalten. Ausschalten, also auch state==0, funktioniert aber nicht. Die IOs bleiben an.
Gibt es da vieleicht noch versteckte Einstellmöglichkeit oder Benutzerrechte im Webinterface (ich verwende admin/anel)?
LG Daniel
Re: UDP Steuerungsprotokoll
Verfasst: Dienstag 19. April 2016, 13:53
von andy
Ich schaue mal.
LG Andy
Re: UDP Steuerungsprotokoll
Verfasst: Freitag 27. März 2020, 20:55
von elRadish
Hallo.
ich bekomme von einer Net-PwrCtrl PRO folgende Statusmeldung:
Code: Alles auswählen
172.25.3.147776172NET-PwrCtrl:DT-BT14-IPL-1 :172.25.3.14:255.255.0.0:172.25.1.1:0.4.163.19.3.129:Nr. 1,0:Nr. 2,0:Nr. 3,0:Nr. 4,0:Nr. 5,0:Nr. 6,0:Nr. 7,0:Nr. 8,0:0:80:NET-PWRCTRL_04.5:xor:
Wenn ich die Protokollbeschreibung richtig verstehe, sollte doch erst ab Version 6.1 ein "xor" auftauchen. Warum sehe ich das hier, bei einer 4.5?
Re: UDP Steuerungsprotokoll / Control protocol
Verfasst: Mittwoch 16. Dezember 2020, 11:29
von combes
Hello,
I try to use the "St_off" function.
I send the UDP command : St_off22adminanel
The Net-PwrCtrl IO reply : NET-PwrCtrl:NET-CONTROL :NoPass:Err
If i send another command like : Sw_on2adminanel It's ok.
The Net-PwrCtrl IO reply : NET-PwrCtrl:NET-CONTROL :192.168.0.244:255.255.255.0:192.168.0.1:0.4.163.20.7.65:Nr.1,0:Nr.2,1:Nr.3,0:Nr.4,0:Nr.5,0:Nr.6,0:Nr.7,0:Nr.8,0:0:80:IO-1,0,1:IO-2,0,0:IO-3,0,0:IO-4,0,0:IO-5,0,0:IO-6,0,0:IO-7,0,0:IO-8,0,0:23.1°C:NET-PWRCTRL_06.5:i:n:xor:
What happens with the "St_off" command ?
Hardware : NET-PwrCtrl IO Power 19
Firmware : NET-PWRCTRL_06.5
Re: UDP Steuerungsprotokoll / Control protocol
Verfasst: Freitag 18. Dezember 2020, 09:41
von combes
Hello,
I write on english because i don't speak german.
I need to switch off I/O after a time delay. For example, from a pc i want to switch off de IO-2 after 1 minute and the IO-3 after 2 minutes.
"St_off" is the right command ? From what I understand this is the case.
What the right command syntax for this command ?
I tried the "st_off22adminanel" syntax but it doesn't work. The Net-PwrCtrl reply "NET-PwrCtrl: NET-CONTROL: NoPass: Err"
I did not find the correct syntax in the forum or in the documentation. Maybe I missed it.
Hardware : NET-PwrCtrl IO Power 19
Firmware : NET-PWRCTRL_06.5
Re: UDP Steuerungsprotokoll / Control protocol
Verfasst: Freitag 18. Dezember 2020, 19:23
von andy
Hi Combes,
“St_off” + Segment + Time[Sek] + User + Passwort
Time as 16 Bit (unsigned integer) in seconds = max. 65535 Sek.
but St_off can only switch relays not IO. There is no St_off for IO's. Sorry.
Andy
Re: UDP Steuerungsprotokoll / Control protocol
Verfasst: Montag 21. Dezember 2020, 14:02
von combes
Thank Andy.
It's work fine when i use the right syntax...
Example : For switch off the third relay after 2 seconds : "St_off3�adminanel"
Converted on hex "53745f6f666633000261646d696e616e656c" with 53=>"S" 74=>"t" ... 0002="2" seconds
Re: UDP Steuerungsprotokoll / Control protocol
Verfasst: Freitag 9. April 2021, 15:20
von elRadish
Hallo,
ich bekomme von einer NetPwrCtrl HOME 4.6 diese Antwort:
Code: Alles auswählen
NET-PwrCtrl:NET-CONTROL :192.168.178.55:255.255.255.0:192.168.178.1:0.4.163.10.5.75:Nr. 1,0:Dose 2,0:Dose 3,0:Nr. 4,0:Nr. 5,0:Nr. 6,0:Nr. 7,0:Nr. 8, 0:248:80:NET-PWRCTRL_04.6:H:xor:\r\n
Was bedeutet das :H: vor dem xor? Markiert das eine Home?