December 01, 2023, 09:47:36 PM
Welcome, Guest. Please login or register
News: Stay up to date with everything that's happening at http://plus.digitalsignage.com

MediaSignage support forum



Author Topic: Problem with sending events  (Read 9107 times)

mati 6

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
Problem with sending events
« on: September 21, 2015, 06:29:23 AM »
Hello.
I've got problems with sending events from outside the signage studio.
My goal is to send events from my own application ( c++).

When I try to sendLocalEvent via CURL:
curl + http+://+192.168.1.3:9999+sendLocalEvent?eventName=ev_t2

This is what console says:
curl: (7) Failed to connect to 192.168.1.3 port 9999: Connection refused

Obviously application, console and signage player ("MyPC") run on the same Computer
« Last Edit: September 21, 2015, 09:17:33 AM by mati 6 »

admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 5185
  • Karma: +36/-8
Re: Problem with sending events
« Reply #1 on: September 21, 2015, 10:49:48 AM »
There 2 ways to send an event.

1. via our web services, station id and credentials needed.
Here is an example, but you can do same thing from Curl or C++ http://signage.me/demo/testsendcommand.html

2. option two is to run a local server like it shows in the video tutorial (enable the local socket server on SignagePlayer)

Did you try both? Event names match?
Firewall disabled on Player PC and or network if doing #1?

regards


mati 6

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
Re: Problem with sending events
« Reply #2 on: September 21, 2015, 11:23:39 AM »
Thx for your reply.
I tested it again aaaand
(this time player asked me for some additional windows permissions)
it worked with curl commands :)
Maybe just a restart of a player was the key.
Now I just have to send the same request from my c++ app.
By the way... are there any C++ examples of cooperation with SignageStudio ?
I can post my own solution when I'm done.

mati 6

  • Jr. Member
  • **
  • Posts: 31
  • Karma: +1/-0
Re: Problem with sending events
« Reply #3 on: September 21, 2015, 04:02:18 PM »
Ok. Everything works fine.
That would be great if signagePlayer could react to events sent on localhost (127.0.0.1), not only normal IP.
Is it possible to fix it ?

ps. I can't post my C++ function here (because i've got a warning that I can't post any URL here). If anybody wants to see it, just send me a message.


admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 5185
  • Karma: +36/-8
Re: Problem with sending events
« Reply #4 on: September 23, 2015, 07:04:13 AM »
yes our socket server option will allow you to run commands to local address (socket server is part of SignagePlayer).
Enable it through StudioPro > Stations > server props

jmmoreno

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Problem with sending events
« Reply #5 on: March 16, 2016, 05:58:25 PM »
Hi There,

Can anyone confirm if either localhost or 127.0.0.1 works for sending local events when message sender app runs in the same machine (Tested. It doesn't work for me. Socket server is enabed; if only work when I use the IP from the station as displayed in the stations view)

Thanks.

 

Carbonate design by Bloc
variant: carbon
SMF 2.0.12 | SMF © 2016, Simple Machines