[gelöst] IPCAM Problem mit INSTAR IN-6014HD-POE

Begonnen von kroman, 23 September 2017, 20:00:00

Vorheriges Thema - Nächstes Thema

kroman

Hallo Leute,

ich habe mir die INSTAR IN-6014HD-POE geholt und mit IPCAM an fhem angebunden.
Die unterstützten CGI Befehle sind hier beschrieben:

https://wiki.instar.de/720p_Series_CGI_List

Thema hier ist Pan & Tilt (weiter bin ich noch nicht gekommen):


http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=right :: Moves continuously right
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=left :: Moves continuously left
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=up :: Moves continuously up
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=down :: Moves continuously down
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=stop :: Stops moving camera-head
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=right :: Moves one step right
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=left :: Moves one step left
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=up :: Moves one step up
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=down :: Moves one step down
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=home :: Go to Center Position
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=hscan :: Scan horizontal
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=vscan :: Scan vertical
http://IP-Address:Port/cgi-bin/hi3510/preset.cgi?-act=set&-status=1&-number=[0-7] :: set a position
http://IP-Address:Port/cgi-bin/hi3510/preset.cgi?-act=set&-status=0&-number=[0-7] :: unset a position
http://IP-Address:Port/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=[0-7] :: goto to a set position


Mit folgender config:


define krocam IPCAM krocam:80
attr krocam credentials /opt/fhem/kro/krocam.pw
attr krocam basicauth {USERNAME}:{PASSWORD}
attr krocam pathPanTilt cgi-bin/hi3510/preset.cgi?user={USERNAME}&pwd={PASSWORD}
attr krocam cmdPos01 -act=goto&-status=1&-number=0
attr krocam cmdPanLeft -step=0&-act=left


funktioniert:


set krocam pos 1


und das Ding fährt auf Position 1.

Das hier funktioniert allerdings nicht:


set krocam pan left


Im log finde ich diesen link:


GET /cgi-bin/hi3510/preset.cgi?user=xxx&pwd=xxx&-step=0&-act=left HTTP/1.0


Das passt ja damit zusammen was ich konfiguriert habe und der Stillstand der Kamera ist lt. den CGI codes von INSTAR auch ok.

So, wenn ich den pathPanTilt nun wie folgt ändere:


attr krocam pathPanTilt cgi-bin/hi3510/ptzctrl.cgi?user={USERNAME}&pwd={PASSWORD}


Funktioniert


set krocam pan left


nun auch, doch leider funktioniert das nicht mehr:


set krocam pos 1


Denn, es wird ja das zur Kamera geschickt und nicht "preset" was sie sich erwartet:


GET /cgi-bin/hi3510/ptzctrl.cgi?user=xxx&pwd=xxx&-act=goto&-status=1&-number=0 HTTP/1.0


Das attr pathCmd hilft hier übrigens nicht, das habe ich ausprobiert.
Es scheint, dass beide Kamera-Funktionen nur mit attr pathPanTilt gesteuert werden können.

Muss ich mich für eine Funktion entscheiden oder übersehe ich etwas in fhem?

Danke und Gruß,
kroman

kroman

Okay, ich habe es so gelöst:


define krocam IPCAM krocam:80
attr krocam credentials /opt/fhem/kro/krocam.pw
attr krocam basicauth {USERNAME}:{PASSWORD}
attr krocam pathPanTilt cgi-bin/hi3510/ptzctrl.cgi?user={USERNAME}&pwd={PASSWORD}
attr krocam pathCmd cgi-bin/hi3510/preset.cgi
attr krocam cmd01 -act=goto&-status=1&-number=0
attr krocam cmdPanLeft -step=1&-act=left


Damit funktioniert beides.

Kamera nach links:


set krocam pan left


Kamera auf Position 1:


set krocam cmd 1


Gruß,
kroman