AXIS P7304 Custom Controls not working #970
-
|
On the AXIS P7304 we want to be able to stream our IPTV Set Top Box video via the IN Port 1, and control the Set Top Box via -> On Screen Controls / Custom Controls / Add Custom Controls / CGI Path (ie. axis-cgi). Using axis-cgi we want to be able to use custom scripts that send IR commands to the IPTV Set Top Box to control its guide and channels. We tried both Python and CGI scripts from our Windows and Linux Machines and both can send commands via IP to our iTACH IR Device, but haven’t been able to get the axis-cgi to work. Haven’t tried any other solutions, yet. We already bought eight AXIS P7304 to build out our SuperSling Setup and would prefer to not have to return them to find a different solution. Our current setup: When selecting on new custom button it says “OOPs! Something went wrong.” |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
This automatically generated reply acts as a friendly reminder. Answers to your questions will most often come from the community, from developers like yourself. You will, from time to time, find that Axis employees answers some of the questions, but this is not a guarantee. Think of the discussion forum as a complement to other support channels, not a replacement to any of them. If your question remains unanswered for a period of time, please revisit it to see whether it can be improved by following the guidelines listed in Axis support guidelines. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, there appears to be no logging, that I can find on the AXIS that would provide more information, unless I am missing something. And the only error that appears when i select on a custom button, is the one shown above. Do you know if the AXIS-CGI only works on approved AXIS API's? Meaning can I create a custom CGI or Python script that can run from the Custom controls? The reason I ask is that I found this -> https://developer.axis.com/vapix/network-video/on-screen-controls/#onscreencontrols-cgi and if I am reading this correctly, it sounds like I may be limited to what the on screen controls API allows? Honestly, I am not sure of how the GUI's custom controls relate to that API or whether I can create my own custom solution to call my own CGI or Python script. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @xperi-ryanstone , Found this Node.js module to send commands to GlobalCache iTach devices. : This code defines a Node.js module for managing a TCP connection to an iTach device (commonly used for home automation and infrared control). It provides a queue-based command system to handle message transmission and reconnection logic. Are you trying to send TCP messages from Axis Encoder? Something like this? Regarding OnscreenControls CGI:Tested OnscreenControls CGI with AXIS Q1715 Block Camera (AXIS OS version 12.3.56): https://{{device}}/local/axis-onscreencontrols/onscreencontrols.cgi{
"apiVersion": "1.1",
"context": "",
"method": "getAllFeatures",
"params": {}
}{
"apiVersion": "1.7",
"context": "",
"method": "getAllFeatures",
"data": {
"en-us": {
"name": "root",
"niceName": "",
"featureGroups": [
{
"name": "VideoStreamingIndicator",
"niceName": "Video streaming indicator",
"featureGroups": [],
"features": [
{
"user": [
"operator"
],
"name": "show",
"niceName": "Show video streaming indicator",
"info": "The camera adds an animation to the video to verify that the stream is working.",
"requestType": "POST",
"requestPayload": "JSON",
"requestURL": "/axis-cgi/videostreamingindicator.cgi",
"response": false,
"jsonTemplate": "{ 1, 2, 3}",
"parameters": {
"1": {
"key": "apiVersion",
"type": "fixed",
"jsonVariableFormat": "string",
"value": "1.0"
},
"2": {
"key": "context",
"type": "context"
},
"3": {
"key": "method",
"type": "fixed",
"jsonVariableFormat": "string",
"value": "show"
}
}
}
],
"status": "enabled"
},
{
"name": "Day-night shift",
"niceName": "Day-night shift",
"featureGroups": [],
"features": [
{
"user": [
"operator"
],
"name": "activateAutoDayNightShift",
"niceName": "Automatic day-night shift",
"info": "The camera switches between day mode and night mode when the light level changes",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.DayNight.IrCutFilter=auto"
},
{
"user": [
"operator"
],
"name": "activateDayNightShift",
"niceName": "Turn on day mode",
"info": "The camera is always in day mode. The image will be in color, but with reduced light sensitivity.",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.DayNight.IrCutFilter=yes"
},
{
"user": [
"operator"
],
"name": "deactivateDayNightShift",
"niceName": "Turn on night mode",
"info": "The camera is always in night mode. The image will be in black and white for increased light sensitivity.",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.DayNight.IrCutFilter=no"
}
],
"status": "enabled"
},
{
"name": "electronicImageStabilization",
"niceName": "Electronic image stabilization",
"featureGroups": [],
"features": [
{
"user": [
"operator"
],
"name": "activateImageStabilization",
"niceName": "Turn on electronic image stabilization",
"info": "Use electronic image stabilization to minimize the effect of vibrations in windy or vibrating conditions",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.Stabilizer=on"
},
{
"user": [
"operator"
],
"name": "deactivateImageStabilization",
"niceName": "Turn off electronic image stabilization",
"info": "Turn off electronic image stabilization",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.Stabilizer=off"
}
],
"status": "enabled"
},
{
"name": "Defog",
"niceName": "Defog",
"featureGroups": [],
"features": [
{
"user": [
"operator"
],
"name": "activateDefog",
"niceName": "Turn on defog",
"info": "Defog is used to help improve the visibility of the camera's image in poor weather conditions such as smog, fog or smoke",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.Defog=on"
},
{
"user": [
"operator"
],
"name": "deactivateDefog",
"niceName": "Turn off defog",
"info": "Turn off defog",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.Defog=off"
}
],
"status": "enabled"
},
{
"name": "Autofocus",
"niceName": "Autofocus",
"featureGroups": [],
"features": [
{
"user": [
"ptz"
],
"name": "activateAutofocus",
"niceName": "Turn on autofocus",
"info": "Allow the camera to adjust focus when the scene changes",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/com/ptz.cgi?camera=1&autofocus=on"
},
{
"user": [
"ptz"
],
"name": "deactivateAutofocus",
"niceName": "Turn off autofocus",
"info": "Lock the current focus setting",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/com/ptz.cgi?camera=1&autofocus=off"
}
],
"status": "enabled"
},
{
"name": "WDR",
"niceName": "WDR",
"featureGroups": [],
"features": [
{
"user": [
"operator"
],
"name": "activateWDR",
"niceName": "Turn on WDR",
"info": "Turn on WDR to make both dark and bright areas of the image visible",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.WDR=on"
},
{
"user": [
"operator"
],
"name": "deactivateWDR",
"niceName": "Turn off WDR",
"info": "Turn off WDR",
"requestType": "GET",
"requestPayload": "JSON",
"response": false,
"requestURL": "/axis-cgi/param.cgi?action=update&ImageSource.I0.Sensor.WDR=off"
}
],
"status": "enabled"
},
{
"name": "postinst",
"niceName": "User installed features",
"featureGroups": [
{
"name": "playClip",
"niceName": "Play media clip",
"featureGroups": [],
"features": [
{
"user": [
"operator"
],
"info": "Play clip",
"name": "mediaclip",
"niceName": "Play clip",
"requestType": "GET",
"requestURL": "/axis-cgi/mediaclip.cgi?action=play&clip={clip}",
"parameters": {
"clip": {
"niceName": "Clip",
"type": "multiOptions",
"values": []
}
}
},
{
"user": [
"operator"
],
"info": "Stop clip",
"name": "stopclip",
"niceName": "Stop clip",
"requestType": "GET",
"requestURL": "/axis-cgi/mediaclip.cgi?action=stop"
}
]
}
],
"features": []
}
],
"features": []
}
}
}Conclusion:You can use postinst feature in OnscreenControls CGI to trigger Virtual input API and this will control sending TCP messages to iTach API Specification Version 1.5. I hope this helps with your use case! 😊 |
Beta Was this translation helpful? Give feedback.
-
|
Feel free to re-open it OR share the solution/alternative/comment if already resolved👁️🗨️ |
Beta Was this translation helpful? Give feedback.





Hi @xperi-ryanstone ,
Following the iTach API Specification Version 1.5 looks like they support Ethernet (IP) to infrared (IR). Maybe you can provide more details on how these APIs (URL, body, response) fit into your use case.
Found this Node.js module to send commands to GlobalCache iTach devices. : This code defines a Node.js module for managing a TCP connection to an iTach device (commonly used for home automation and infrared control). It provides a queue-based command system to handle message transmission and reconnection logic.
Are you trying to send TCP messages from Axis Encoder? Something like this?
Regarding OnscreenControls CGI:
Tested OnscreenControls CGI with AXIS Q1715 B…