RadioDJ - Free Radio Automation Software Forum

Plugin REST Server for RDJ 1.7.5+

Offline Marius

  • *****
  • 5572
    • Radio DJ
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #15 on: November 07, 2014, 02:34:05 PM »
Thanks for the feedback! Enjoy it! :)
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Offline starm

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #16 on: November 07, 2014, 02:57:52 PM »
hello
me again, here is the small idea:  :P

-hidden the password
-RADIODJ software clock (time server on the RadioDJ)
-Colour of Time intro and song length
-An emergency button that starts a sound software RadioDj
-a drop-down menu to select multiple radioDJ machine (in the case of Internet radio remote)
-a witness in connection RadioDj software (a test every 5 seconds)

« Last Edit: November 07, 2014, 03:08:28 PM by starm »
https://j2sd.fr

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #17 on: November 07, 2014, 09:31:01 PM »
I put a little web interface together and it works with the REST plugin. It's not the best because I needed to get something together quickly for our radio program, but I'll keep updating it and post the updates for others to use.

Just change your information in the config.php file.

[attachment deleted by admin]
« Last Edit: November 07, 2014, 09:48:18 PM by aus10hollis »
Austin Hollis
Victory 91.5fm
https://victory.radio

AndyDeGroo

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #18 on: November 07, 2014, 11:20:32 PM »
I'm also hitting the same security error when trying to start the server.
That is the exact limitation of HttpListener I mentioned when Marius and I discussed development of RESTful server plugin. And that is also the main reason I was looking for TcpListener based web server to use in my HTTP server plugin.



Running RadioDJ as admin in not a solution and should not be required. This is the main reason I tried to avoid HttpListener in when I started to develop the HTTP server plugin.

However, HttpListener ACLs can be controlled using netsh http command group. For default setting with port 7000 the following command should be run in elevated command console (as Administrator):
Code: [Select]
netsh http add urlacl url=http://+:7000/ user=YourUserName listen=yes

Just replace YourUserName with your actual username and the plugin should work.

@Marius I'm a little bit disappointed that your plugin does not provide JSON data. I had already added JSON.Net to my solution for this purpose but it look like I'm not going to develop my plugin as it seems pointless now.

Offline Hansen

  • ***
  • 233
    • dinFM
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #19 on: November 07, 2014, 11:36:48 PM »
I get that message when i start up RadioDJ AndyDeGroo
Best Regards
Lars Hansen

AndyDeGroo

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #20 on: November 07, 2014, 11:46:43 PM »
I get that message when i start up RadioDJ AndyDeGroo
You should have stated that when you posted the first time. The error message is related to how latest Windows versions handle HTTP endpoint security.
To get rid of the message you should open command prompt as Administrator and run the netsh command line that I provided in my previous post. Just remember to use your actual username. To get your Windows username, just run whoami command in command prompt.

Offline Hansen

  • ***
  • 233
    • dinFM
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #21 on: November 08, 2014, 12:22:42 AM »
done now i get another error #001 

losely translated....

"server error #001 an attempt was made to access a socket in a way that is prohibited by the sockets of access"
Best Regards
Lars Hansen

AndyDeGroo

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #22 on: November 08, 2014, 12:31:46 AM »
"server error #001 an attempt was made to access a socket in a way that is prohibited by the sockets of access"
That must be error form the old TCP server plugin, not the REST server plugin. You should remove the old one if you're using REST plugin.

Offline Marius

  • *****
  • 5572
    • Radio DJ
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #23 on: November 08, 2014, 10:13:10 AM »
@Marius I'm a little bit disappointed that your plugin does not provide JSON data. I had already added JSON.Net to my solution for this purpose but it look like I'm not going to develop my plugin as it seems pointless now.

I needed a solution to retrieve the now playing and the playlist without allowing another connection to the database, that's the reason i wrote this plugin. For the output i just return an existing class from rdj which works well for xml, but when i set it to json it returns nothing. I didn't had the time to see why json didn't worked and for my particular case xml was perfect since i find it's structure more easy to read and why not, more logical (yeah, i'm old school :) ). I also used WCF  because it requires minimum coding.

Running the program as administrator or not, is the decision which every user of this plugin will decide for itself. For now, this is the limitation of this approach. If the user consider that giving remote access to it's database to retrieve the information provided by this plugin is better (or safer?), they are free to do so. I just tried to offer an easy alternative.

About writing you own plugin, in no case i would consider it useless, because as you said, you want to use a different approach which may be more flexible. If we would never try to improve something that already exist, we would not evolve, right? You proved this also with the wp plugin which is great.  ;)
« Last Edit: November 08, 2014, 10:31:52 AM by Marius »
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Offline starm

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #24 on: November 08, 2014, 11:33:05 AM »
This message is for aus10 hollis  :P
you're doing a great job, I saw a small bug  :'(, time music shifts in time, the web page is delayed ...
https://j2sd.fr

Offline Marius

  • *****
  • 5572
    • Radio DJ
Re: Plugin REST Server for RDJ 1.7.5+
« Reply #25 on: November 08, 2014, 01:45:57 PM »
It is normal to have a delay because it takes a certain amount of time to send the request, receive the answer and display the result. But it shouldn't be very noticeable.
DOWNLOADS PAGE

HOW TO FIX RADIODJ DATABASE
----------------
Please don't PM me for support requests. Use the forums instead.

Offline starm

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #26 on: November 08, 2014, 02:19:18 PM »
Marius thank you for your answer  :)

My mysql should not be fast, I'll ask him to make a little effort  :hihi:
https://j2sd.fr

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #27 on: November 08, 2014, 05:27:55 PM »
Hello everyone,
I'm trying the plugin RestServer on radiodj 1.7.5.
I get this error when I open radiodj as in the image.
can you tell me what causes this error?

the operating system is XP

Thanks.

Mauro

[attachment deleted by admin]

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #28 on: November 09, 2014, 12:15:26 PM »
Hello everyone,
I'm trying the plugin RestServer on radiodj 1.7.5.
I get this error when I open radiodj as in the image.
can you tell me what causes this error?

the operating system is XP

Thanks.

Mauro

Do you have any idea what may 'be my problem?

AndyDeGroo

Re: Plugin REST Server for RDJ 1.7.5+
« Reply #29 on: November 09, 2014, 03:08:25 PM »
Do you have any idea what may 'be my problem?
You biggest problem is that you're using Windows XP, which has reached its end of support in April. The error message seems to indicate that the plugin relies on features no available in .Net framework on XP and it might not work on XP at all.