jackstone Posted October 15, 2016 Share Posted October 15, 2016 Is someone know how to code a camera driver to use a locally stored image as the only static image to display as the camera? The local image could come packed in the c4z file just like we do for custom icons... Someone know how to acheive that? Link to comment Share on other sites More sharing options...
msgreenf Posted October 16, 2016 Share Posted October 16, 2016 Explain better. The camera part w static image yes. Sent from my Nexus 5X using Tapatalk Link to comment Share on other sites More sharing options...
jackstone Posted October 16, 2016 Author Share Posted October 16, 2016 We do not want to connect to an url, just display locally stored picture as the "fake" camera image. Link to comment Share on other sites More sharing options...
msgreenf Posted October 16, 2016 Share Posted October 16, 2016 I think you can do that by making it a c4z and putting your images in a www directory, and then loading that director:// location instead of a web URL Link to comment Share on other sites More sharing options...
jackstone Posted October 16, 2016 Author Share Posted October 16, 2016 11 hours ago, msgreenf said: I think you can do that by making it a c4z and putting your images in a www directory, and then loading that director:// location instead of a web URL Thanks for the information, that make sense, but it seems the camera proxy force us to use a complete URL starting by HTTP:// or HTTPS://, not sure about that, but the Lua function UI_REQ.GET_SNAPSHOT_QUERY_STRING seems to generate an XLM string to be returned, and the first part is atomically populated by the camera properties set from the Camera proxy in composer... Link to comment Share on other sites More sharing options...
jackstone Posted October 16, 2016 Author Share Posted October 16, 2016 Ok I go it. the built-in Web Server of Control4 point to a root folder where we can access the C4z folder, so all images packed into the C4z can be used from here, right into the web server. Link to comment Share on other sites More sharing options...
msgreenf Posted October 16, 2016 Share Posted October 16, 2016 You can use 127.0.0.1 as the IP Sent from my Nexus 5X using Tapatalk Link to comment Share on other sites More sharing options...
jackstone Posted October 16, 2016 Author Share Posted October 16, 2016 This does not work, but it worked if I use the real IP address of the C4 controller. Thus leading to another question, is there a C4 API command to get the IP address of the controller? Seems this will be the only way to have this working with zero configuration needed from the user... Link to comment Share on other sites More sharing options...
jackstone Posted October 16, 2016 Author Share Posted October 16, 2016 Found: C4:GetControllerNetworkAddress() Link to comment Share on other sites More sharing options...
msgreenf Posted October 16, 2016 Share Posted October 16, 2016 Found: C4:GetControllerNetworkAddress() That works too! Sent from my Nexus 5X using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.