UDP Steuerungsprotokoll / Control protocol

dantec
Beiträge: 2
Registriert: Dienstag 19. April 2016, 10:10

Re: UDP: "SwitchAll" IO schaltet nur an, nicht aus

Beitrag von dantec » Dienstag 19. April 2016, 13:05

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

andy
Administrator
Beiträge: 486
Registriert: Dienstag 15. Januar 2008, 11:51
Wohnort: Düsseldorf
Kontaktdaten:

Re: UDP Steuerungsprotokoll

Beitrag von andy » Dienstag 19. April 2016, 13:34

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

dantec
Beiträge: 2
Registriert: Dienstag 19. April 2016, 10:10

Re: UDP Steuerungsprotokoll

Beitrag von dantec » Dienstag 19. April 2016, 13:47

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

andy
Administrator
Beiträge: 486
Registriert: Dienstag 15. Januar 2008, 11:51
Wohnort: Düsseldorf
Kontaktdaten:

Re: UDP Steuerungsprotokoll

Beitrag von andy » Dienstag 19. April 2016, 13:53

Ich schaue mal.

LG Andy

elRadish
Beiträge: 10
Registriert: Mittwoch 4. September 2019, 14:09

Re: UDP Steuerungsprotokoll

Beitrag von elRadish » Freitag 27. März 2020, 20:55

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?

combes
Beiträge: 4
Registriert: Montag 14. Dezember 2020, 13:42

Re: UDP Steuerungsprotokoll / Control protocol

Beitrag von combes » Mittwoch 16. Dezember 2020, 11:29

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

combes
Beiträge: 4
Registriert: Montag 14. Dezember 2020, 13:42

Re: UDP Steuerungsprotokoll / Control protocol

Beitrag von combes » Freitag 18. Dezember 2020, 09:41

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

andy
Administrator
Beiträge: 486
Registriert: Dienstag 15. Januar 2008, 11:51
Wohnort: Düsseldorf
Kontaktdaten:

Re: UDP Steuerungsprotokoll / Control protocol

Beitrag von andy » Freitag 18. Dezember 2020, 19:23

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

combes
Beiträge: 4
Registriert: Montag 14. Dezember 2020, 13:42

Re: UDP Steuerungsprotokoll / Control protocol

Beitrag von combes » Montag 21. Dezember 2020, 14:02

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

elRadish
Beiträge: 10
Registriert: Mittwoch 4. September 2019, 14:09

Re: UDP Steuerungsprotokoll / Control protocol

Beitrag von elRadish » Freitag 9. April 2021, 15:20

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?

Antworten