Automation/Jenkins controlling NET PwrCtrl HOME

3 unabhängig über Internet / Ethernet mit dem Browser oder aus dem Desktop gesteuerte Steckdosen. Ein Webserver in der Steckdosenleiste kommuniziert mit dem Netzwerk.
Forumsregeln
Bei Problemen bitte immer:

1. Steckdosenleistentyp: (HOME, PRO) wenn möglich Seriennummer.
2. Windows-(Betriebsystem) und Browserversion.
3. Netzwerktyp: (DSL-Router, Firmennetzwerk, Crosskabel).

angeben. Danke
pducai
Beiträge: 3
Registriert: Montag 22. September 2014, 13:19

Automation/Jenkins controlling NET PwrCtrl HOME

Beitrag von pducai » Montag 22. September 2014, 13:50

hi all,
i'm trying to work out Jenkins controlling PwrCtrl HOME. Because documentation is not the best I have following problem:

1. explanation of data

when running

Code: Alles auswählen

curl  http://172.16.82.2/strg.cfg?Auth:user7anel | awk 'BEGIN { FS=",?[ ;]*"; } { print "name: ",$1,"|","hostname: ",$2,"|","IP: ",$3,"|","Mask: ",$4,"|","Gate: ",$5,"|","MAC: ",$6,"|","Port: ",$7,"|","Temp: ",$8,"|","Type: ",$9,"|",$10,"|",$11,"|",$12; }'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   331    0   331    0     0   6566      0 --:--:-- --:--:-- --:--:--  7355

name:  NET-PWRCTRL_04.0 | hostname:  NET-CONTROL | IP:  172.16.82.2 | Mask:  255.255.255.0 | Gate:  172.16.82.1 | MAC:  00:04:A3:0E:02:4E | Port:  80 | Temp:  H | Type:  Nr. | 1 | Nr. | 2
which as you can see is OK in first row, but second doesn't give a sense (Nr.1, Nr.2.. etc).

I don't see any proper explanation anywhere (how to get info automatically thru REST/http) so it would be good if anyone can point me to any.

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

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Beitrag von andy » Montag 22. September 2014, 17:26

Hi,
| Temp: H | Type: Nr. | 1 | Nr. | 2
Home have no temperature. Type=H (Home) Nr. 1 = name of first socket etc.

Regards Andy

pducai
Beiträge: 3
Registriert: Montag 22. September 2014, 13:19

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Beitrag von pducai » Mittwoch 24. September 2014, 08:17

thanks, but what i need is documentation for http/REST calls and how to list devices and turn them on/off devices. Is there anything more than just installation documents?

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

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Beitrag von andy » Mittwoch 24. September 2014, 09:22


pducai
Beiträge: 3
Registriert: Montag 22. September 2014, 13:19

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Beitrag von pducai » Donnerstag 25. September 2014, 14:55

i've seen this one (german is no problem) but it lacks lot of info how exactly do it and what data exactly means.

for example you don't know how to get

Beispiel:
NET-PwrCtrl:NET-CONTROL :192.168.178.148:255.255.255.0:192.168.178.1:0.4.163.10.9.107:Nr. 1,1:Nr. 2,1:Nr. 3,1:Nr. 4,0:Nr. 5,0:Nr. 6,0:Nr. 7,1:Nr. 8,1:0:80:IO-1,0,0: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:27.7°C:NET-PWRCTRL_04.0

and I had to dig through source code of web page to find out it's

curl http://x.x.x.x/strg.cfg?Auth:user7anel

but I still don't know how to get other output. Also there is no explanation of 'beispil' data, what is structure of data and how should i read it on commandline. Some real world examples would be great.

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

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Beitrag von andy » Donnerstag 25. September 2014, 16:13

Hi,

There are two possibilities to control NET-PwrCtrl:

UDP with answer: NET-PwrCtrl:NET-CONTROL :192.168.178.148:255.255.255.0:192.168.178.1:0.4.163.10.9.107:Nr. 1,1:Nr. 2,1:Nr. 3,1:Nr. 4,0:Nr. 5,0:Nr. 6,0:Nr. 7,1:Nr. 8,1:0:80:IO-1,0,0: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:27.7°C:NET-PWRCTRL_04.0
Please look in the Forum for description. Above "Beispiel:" you will find description of data.

Ajax: this strg.cfg
you find a sample html and description in the Firmware: directory - Ajax Schnittstelle

You need some programmer knowledge.

Regards Andy

Antworten