Read manufacturer and model information

Hello all,

I´m trying to read manufacturer and model information from a camera with a luup.variable_get, but without any luck. How can it be done?

Thanks in advance,

Paulo

First, Vera has to have captured the data for your specific device (in this case a Camera) before you can read it. Then, if it’s been captured, you need to know both the ServiceID name, and Variable name, that it’s been captured under before you invoke something akin to :

[tt] luup.variable_get(serviceID-name, variable-name, deviceId)[/tt]

to get it’s value.

eg. [tt] luup.variable_get(“urn:micasaverde-com:serviceId:ZWaveNetwork1”, “LastUpdate”, 15)[/tt]

If you want to see what serviceId/variable values have been captured for your Devices, you can run a URL like:

http://192.168.x.y:49451/data_request?id=user_data2&output_format=xml

after substituting in your IP address, and it’ll return a complete [XML format] listing. You can also get it in JSON if you prefer reading it in that format …

Thank you, guessed, very much for the information, it was very helpful!
But sorry to bother again, how to read the IP address? It is not a variable that is shown on serviceID.

Again, thanks in advance

It’s a reference to the IP Address, or Hostname, of your Vera/MiOS unit. This is the same address you use to access your Vera on the local network (only, the Port# is changed to 49451 to use the MiOS Control port, instead of the UI Port (80, or 443-SSL)

Sorry, I was not very clear. The IP addres I was referring to is the camera IP address configured on the device properties. How can I read it with a luup.variable_get command or any luup command?

Regards,

scan the XML. You’ll probably see the IP in there hanging off the [camera] Device, in an attribute called “ip”.

If you see it there, you can get hold of it in code using:

[tt] luup.devices[deviceId].ip[/tt]

or something like that. The rest you’re going to have to work out :wink:

Ok guessed, thak you very much for your help. This is a good starting point for me!