• Welcome to RadioDJ - Free Radio Automation Software Forum. Please log in or sign up.

Plugin REST Server for RDJ 1.7.5+

Started by Marius, November 04, 2014, 02:10:52 PM

Marius

DOWNLOADS PAGE

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

ChristophePE22

#16
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)


aus10hollis

#17
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]

AndyDeGroo

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):

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.

Hansen

I get that message when i start up RadioDJ AndyDeGroo
Best Regards
Lars Hansen

AndyDeGroo

Quote from: Hansen on November 07, 2014, 11:36:48 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.

Hansen

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

Quote from: Hansen on November 08, 2014, 12:22:42 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.

Marius

#23
Quote from: AndyDeGroo on November 07, 2014, 11:20:32 PM
@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.  ;)
DOWNLOADS PAGE

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

ChristophePE22

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 ...

Marius

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.

ChristophePE22

Marius thank you for your answer  :)

My mysql should not be fast, I'll ask him to make a little effort  :hihi:

maurocal

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]

maurocal

Quote from: maurocal 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

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

AndyDeGroo

Quote from: maurocal on November 09, 2014, 12:15:26 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.