Seite 1 von 1

Automation/Jenkins controlling NET PwrCtrl HOME

Verfasst: Montag 22. September 2014, 13:50
von pducai
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.

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Verfasst: Montag 22. September 2014, 17:26
von andy
Hi,
| Temp: H | Type: Nr. | 1 | Nr. | 2
Home have no temperature. Type=H (Home) Nr. 1 = name of first socket etc.

Regards Andy

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Verfasst: Mittwoch 24. September 2014, 08:17
von pducai
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?

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Verfasst: Mittwoch 24. September 2014, 09:22
von andy

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Verfasst: Donnerstag 25. September 2014, 14:55
von pducai
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.

Re: Automation/Jenkins controlling NET PwrCtrl HOME

Verfasst: Donnerstag 25. September 2014, 16:13
von andy
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