Kodi Community Forum

Full Version: Amiko A3 powered by Spark 2 - PVR Client request
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello all,

I don’t know where to slot this request in but I hope I’m in the right place.

Most of you must have heard about this box. It works well for me and many others. Though the community is not very large, if I’m not mistaken, but it seems to be growing.

I would like to request for a PVR-Client plug-in for Kodi that streams Live-TV from the Amiko A3 box. Currently an app is being used on android systems and web browser on PC. The PC part is great but the android part is troublesome. Generally, it would be more comfortable to stream using PVR-Client in Kodi.

The web browser uses JASON to interact with A3 so it is easy to parse channels and EPG, send few commands and receive selected stream from it. If you require some output I will be glad to provide some. Just streaming and Showing EPG will do for now, and maybe later, send recording commands, time shifting and scheduling as it grows. One could eventually modify an existing PVR add-on to achieve this.

I'm asking because I lack the knowledge to create plugis.

I would appreciate a favourable response.

Thanks.
I doubt someone will be willing to do the coding required unless they have one of these boxes themselves. If you can get a list of URLs to your channels you can use the pvr.iptvsimple addon to watch live TV from it though.
(2015-07-25, 23:55)negge Wrote: [ -> ]I doubt someone will be willing to do the coding required unless they have one of these boxes themselves. If you can get a list of URLs to your channels you can use the pvr.iptvsimple addon to watch live TV from it though.

I have tried using the web and succeeded. To stream a channel, some commands have to be initially sent to the box to switch to the channel and after that a request is made to get the stream. I don't know or think that is possible with the .m3u text file of simple iptv. I will try see if something works. But still a real RVR client would be nice am nore convinient.

I don't think it will be much of work because one can simply, maybe reengineer the next pvr client. Its a matter of commands and parsing of request which in most cases are JSON or XML.
Implementing any kind of PVR addon includes a fair amount of work.
I'm still hoping.
I have decided to create a PVR-Addon for the Amiko A3 myself since no sign of help. The quick solution I have for now is to modify the PVR-Demo that came with Kodi 15. The reason I did that is that, the add-on is easy to modify since it is built for that purpose.

I have created a windows application (maybe it would be better to run it as a service) that connects to the A3 to get channel information and then creates a PVRDemoClient.xml(or something like that) file and saves to a configured destination - the destination is supposed to be the pvr.demo (or pvr.aa3; the name it will be called when finished) . As a service, it will update the xml file in a configurable interval. This is required to copy the epg to the xml file.

When the pvr starts, it will load the channels their corresponding EPGs. At the moment only the following channel groups are supported; Fav, All and Mostly viewed.

After spending one day developing the pvr manager, I was able to load the channels with their corresponding icons and view just one channel which I had to swich manually.

The problem I am having right now is the channel switching. Amiko has to switch to this channel to be able to stream it. Since I have little knowledge of C++, I had to convert the C# code that does the switching to C++ using a special program. Nevertheless, the code should work, but I cannot get it compiled because of errors that resulted from references.

I need help here. Can someone with the knowledge lead me in the right path or can someone help me insert this code, compile it and make it available on the github? I believe that Android compilation and windows are different or can I use same compilation on any platform?

I have also tried to configure github myself but I have very little knowledge how - it might take a while.

Help needed to insert the code and create pvr.aa3 add-on from it so that we do not have to touch the existing pvr.demo. I am still working and optimizing the manager/service. If there is anyone who have the time to help, I might convert the code to C++ and this will then be integrated to the pvr.aa3 so we wouldn't require the manager/service.

Since the Amiko A3 is a great box, I would like everyone that have it to enjoy it using Kodi on any supporting platform.

Thanks for your interest and I hope help will be here soon.
I would post some pictures when I have figured out how to do it here.
Though I have been making progress, but the fact still remain that I need help and no one is willing to help. I thought the pvr developers are active on this support area, but I think I am wrong. Don't know why they are not willing, maybe time factor or something.

Somebody gave me an idea in another forum which I think is plausible. He suggested a more elegant way of achieving this - through a server that immitates E2 so that all E2 requests are handled by the server. This way, the VU PVR can be used to stream. This is great because then not only VU, but other apps and addons that support E2 can be used. Already started working on it. If I don't get help with the current solution, I will utilize the time for the new idea instead.

Here is how far I have gone:

PVR Channel manager:
https://dl.dropboxusercontent.com/u/1425...200500.jpg

Kodi:
https://dl.dropboxusercontent.com/u/1425...r_test.jpg
Hi- I'm interested in this and am willing to help, but I have little experience with XBMC but i do have exp in windows c++

I'm not sure how much time i will have to invest but i'm certainly interested...
(2015-08-12, 11:49)twelfd Wrote: [ -> ]Hi- I'm interested in this and am willing to help, but I have little experience with XBMC but i do have exp in windows c++

I'm not sure how much time i will have to invest but i'm certainly interested...


Thanks for your willingness to help; that makes two of us.

Option 1:
This is a quick and dirty solution I came up with and the current implementation is based on it.

I created a manager (shown in the image above) which connects to the A3 PVR to get the channel information. The result set are then used to create a PVRDemoAddonSettings.xml file and saved to the location configured - this can be directly saved or copied to “kodi/addons/pvr.aa3/” after a channel scan. When A3 is stated and Kodi is loaded, the new pvr.aa3 then reads the file and load all the channels, favorites and epg information.

The pvr channel manager can be run as a service to update this xml file once a day, that way we are sure to always have the current epg and the new channels in kodi.

It’s a bit more work with this idea. This would mean creating this manager/service for other systems such as linux or android. But if we go that far to create one for android, we could as well just go with option 3, and that is where this question would arise; can you program android? If you do and have the time then we may have to consider it.

Option 2:
Since you are already conversant with C++, we can create a new pvr.aa3 addon by copying the pvr.demo and modifying it. I have already created a manager and the code I intended to insert in the new addon is already in place – maybe need some optimization. So, instead of running the pvr channel manager from pc, we could just move that code to the pvr.aa3 itself, so that when kodi is started and the pvr.aa3 is being initialized, it would just run the manager code and update the xml file. After that it will load the channels and epg from the file. Everything is working in the pvr.demo because it was developed for situations like this and the modification is simple but in C++ (I haven’t done that in a decade).

This solution is actually the quickest solution, since most of the codes are available in C#, we could just convert the code to C++ and insert them in the “PVRDemoData.cpp” file, build it and we are ready for testing.

I have no idea if we have to build the pvr for different platforms and I am not familiar with how kodi addons are built.

Option 3:
This idea came from someone in one of the forums I asked for help.

We have to create an android Server that can handle E2 queries that may come from different sources like the VU PVR addon for kodi. The queries will then be translated and passed on to A3. The response from A3 will then be converted to E2 format and sent back to client. This way, we do not have to write any pvr addon - the E2 compatible addons that already exist will do just fine.

I took a look at the E2 API, it seems doable – we may need sockets or something, if you have any idea and enough time, this might be the best way to go.

I would suggest we go with option 2 and later analyse option 3 and then go for it when you have spare time in the future.

We have to start with loading channels and epg, then later extend it to load tmers and recordings.

Thanks again for your interest.
Creating an Android service shouldn't be that difficult- I was having a play with the Android Studio (SDK) a couple of weeks ago- it's moved on a lot from the old Android SDK.

AFAIK Kodi addons should be fairly cross compatible across different hardware, so it should only be binaries that need compiling platform specific- but I gues we'll find out.

I have to admit to liking option 1, but I won't make a decision until I've investigated a little further- but it'san interesting little project.
@twelfd
I have sent you a private message. Its a piece of C# code I need to convert to C++. The code will be added to pvr.demo.

Just send me the converted c++ code using PM when you are done. Thanks!

BTW I got kodi compiled on my system today. Still hoping It will compile when we add the code.
(2015-08-17, 22:08)Adoga Wrote: [ -> ]@twelfd
I have sent you a private message. Its a piece of C# code I need to convert to C++. The code will be added to pvr.demo.

Just send me the converted c++ code using PM when you are done. Thanks!

BTW I got kodi compiled on my system today. Still hoping It will compile when we add the code.

I've got the code- only got it today. I can't reply to or send pm's- not sure why but i'll get that sorted.

I'll take a look over the weekend- mainly string manipulation and using streamwriter to output, so it shouldn't be too difficult to convert or re-write if necassary.
Hi,

I've been googling a PVR backend and client for the Amiko A3 and came across this thread and am pleased to see others are also interested in it. I'd also like to help with this project. I don't have much experience with C or C++ but can definitely help on the testing side of things. So if there is anything you need testing do let me know by PM'ing me or via other means. I'm definitely down for this and am glad Adoga and twelfd have taken the initiative to take on this project.

The Spark 2 Player app isn't that great and has audio issues as well as only mouse/touchscreen support - not ideal when you're running the app on the Fire TV with only navigation buttons so a Kodi PVR would be the perfect solution to integrate with.

Would also be great if you can update us on the current progress so that we can get an idea of where you are and what we can help you with. Smile Look forward to hear from you.

Thanks! Wink
You guys can find a somewhat relevant discussion with a few hints on where to start and links to reference code in the SageTV thread here:

http://forum.kodi.tv/showthread.php?tid=220873

Best otherwise to start a new thread about this in the PVR development subforum, and be sure to checkout the stickies there:

http://forum.kodi.tv/forumdisplay.php?fid=136
Pages: 1 2