XML to Glide sheet

Is it possible now after the update to get data from a XML and based on a true to generate some URL.

OK lets give a detail Example.
I have a NVR Camera system, And i want to show the user all there cams based if its online and working.
So instance 1. would be to find a the ID Number and if it has a true in it. then convert a url from http://myURL/ISAPI/ContentMgmt/StreamingProxy/channels to http://myURL//ISAPI/ContentMgmt/StreamingProxy/channels/101/picture?.jpg

These links should be either by col Image 1,2,3,4 or row 1,2,3,4

Would this be possible to do in glide?

Hola @abe.sherman

Let me understand your request… do you want to show or handle on your APP the XML data generated by your NVR?

If so, I think it’s possible. Due to XML is the JSON’s father I think what you try to do can be done by using an API.

I found this quickly that looks easy to use: GitHub - factmaven/xml-to-json: Simple API that converts dynamic XML feeds to JSON through a URL or pasting the raw XML data. Made 100% in PHP.

Its syntax is:

https://api.factmaven.com/xml-to-json?xml={Your_XML_URL}

Of course, you must use some Glide’s API plugin later to handle JSON payload received from XML API and organize that data in your tables/sheets.

I hope it helps.

Saludos

4 Likes

Thank you yes that’s what i am looking for. I am testing it first with the link you gave me. Of course will implement in in glide.

Now how do i get a value from the Query
Lets say based on the screenshot

StreamingChannelList.StreamingChannel.id

image

Hi again,

Write here your XML URL to test it and tell you the right syntax to be used in JQ Query box

Bye

I am trying the following for test

{"StreamingChannelList":

	{"version":"1.0",
	"StreamingChannel":[
		{"version":"1.0",
		"id":"101",
		"channelName":"101",
		"enabled":"true",
		"Transport":{"ControlProtocolList":{"ControlProtocol":{"streamingTransport":"RTSP"}}},
		"Video":{"enabled":"true",
		"dynVideoInputChannelID":"1",
		"videoCodecType":"H.264",
		"videoResolutionWidth":"2560",
		"videoResolutionHeight":"1440",
		"videoQualityControlType":"VBR",
		"fixedQuality":"60",
		"vbrUpperCap":"6144",
		"vbrLowerCap":"32",
		"maxFrameRate":"2500",
		"snapShotImageType":"JPEG"},
		
		"Audio":{"enabled":"true",
		"audioInputChannelID":"1",
		"audioCompressionType":"UNKOWN"}},
		{"version":"1.0","id":"102","channelName":"102","enabled":"true",
		"Transport":{"ControlProtocolList":{"ControlProtocol":{"streamingTransport":"RTSP"}}},
		"Video":{"enabled":"true",
		"dynVideoInputChannelID":"1",
		"videoCodecType":"H.264",
		"videoResolutionWidth":"720",
		"videoResolutionHeight":"576",
		"videoQualityControlType":"VBR",
		"fixedQuality":"60",
		"vbrUpperCap":"1024",
		"vbrLowerCap":"32",
		"maxFrameRate":"2500",
		"snapShotImageType":"JPEG"},
		"Audio":{"enabled":"true",
		"audioInputChannelID":"1",
		"audioCompressionType":"UNKOWN"}},
		
		{"version":"1.0",
		"id":"201","channelName":"201",
		"enabled":"true",
		"Transport":{"ControlProtocolList":{"ControlProtocol":{"streamingTransport":"RTSP"}}},
		"Video":{"enabled":"true",
		"dynVideoInputChannelID":"2",
		"videoCodecType":"H.264",
		"videoResolutionWidth":"2560",

Sorry friend but I can’t see your JSON data fine using your URL

Send me a DM to avoid security problems, I understand!

Saludos.

I couldn’t provide the URL for security reasons as it has a user name and password on it. My link looked something like this http:User@password:IP/ISAP So i uploded the XML on my website and now go ahead and try it.

https://api.factmaven.com/xml-to-json/?xml=https://visicllc.com/temptest/channels.xml

Also I cleaned up the JSON above for you so it would be easyer to read.
I wonder if this is even valid StreamingChannelList.StreamingChannel[0].id in glide.
or if the converting file is not right.

Thank you @gvalero

1 Like

Ok, I got it!

If you want all IDs, use this:

.StreamingChannelList.StreamingChannel[].id

Instead, if you want 1st ID:
.StreamingChannelList.StreamingChannel[0].id

.
.
.

The 4th ID would be::
.StreamingChannelList.StreamingChannel[3].id

BTW: What brand/model is your NVR? I like it. :sweat_smile:

Feliz dĂ­a @abe.sherman

2 Likes

I think hikvishion and similar brands allow the XML thingy but you might need to enable it.

Here is a list of some of the models i use.

image

Thanks, I got 2 new Dahua XVR DH-XVR1B16 and will check if they support this feature.

:fist_right: :fist_left:

1 Like

Btw do we have a wild card for the StreamingChanels[*] yet to be used when looking instead of doing the template?

Wow it gets heavy on the sheet. I need a better way to do the filters so i can get the results i need

This is happening to some of my links. When i added that link without the API link into the browser it works. However when i use it with the API this is what i get.

BTW have a look how it looks on the once that do work it looks awesome.

1 Like

Cool!!

Those PICs from your cams (showed in your Inline List) are old or were sent by your NVR by a request?

I have tried and looked for the way to put the cam’s streaming on the APP but I has had no luck.
There is another technology beyond MS ActiveX (what I know) which I ignore to see the cams in real-time so far.

Saludos!

Its a on load picture on every refresh. I can help you privately if after the instructions i give you don’t work. you can reach out to me on discord here. Glide Community

Now depending on your NVR as some are slightly different do the fowling.

Configurations > Security > Authentication Change to digest/basic (that should let you use the API)
Configurations > Security > Security Service > Tick the enable picture URL (This is in some NVR)

also another note i want to mention that sometimes the link is different on some NVR and it wont be. /ISAPI/ContentMgmt/StreamingProxy/channels this also depends on the channels being used.

imageimage

1 Like

Uffff … double cool! :rofl:

Let me finish some pending jobs and I will try your tip.

We keep in touch.

Gracias Abe!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.