Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » SSE(Server Sent Events) not working through domain name URL(ESH Server Sent Events working fine with IP address but not able to receive Events through Domain Name URL)
SSE(Server Sent Events) not working through domain name URL [message #1798739] Fri, 23 November 2018 12:50 Go to next message
Paramesh  Surakod is currently offline Paramesh SurakodFriend
Messages: 15
Registered: January 2018
Junior Member
Hello

I have created my own instance in openhab cloud. I am using this URL from Ajax "https://username:password@home.myopenhab.org/rest/events?topics=smarthome/" to get SSE(Server Sent Events) in client side application from server using Cordova.

Its working fine on IOS but its not working on android
(I am using android 7.0, latest chrome version and also enabled the webview implementation in developer options).
for same URL if I give IP like "http://192.168.0.1/rest/events?topics=smarthome/" its working fine on both IOS and android.

Note:Both URL("https://username:password@home.myopenhab.org/rest/events?topics=smarthome/" AND "http://192.168.0.1/rest/events?topics=smarthome/"), working fine with the "cordova-crosswalk-plugin" but i dont want to use crosswalk plugin beacuse asking for download some dependency application from google play.

Here is Server Sent Event code i am using in javascript.

var eventSource = new EventSource(" +"url"+ /rest/events?topics=smarthome/*");

eventSource.addEventListener('message', function (eventPayload){

//not entering here.

}

please help me out to resolve this issue.

Re: SSE(Server Sent Events) not working through domain name URL [message #1798757 is a reply to message #1798739] Fri, 23 November 2018 15:50 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 673
Registered: December 2011
Senior Member
If it is working with the local url, I'd claim that it is no issue with ESH itself, but rather some network/security issue on the way between your app, the could proxy and the local instance. Not sure we can help on this here...
Previous Topic:Compilation failure
Next Topic:Need help on networkAddressService
Goto Forum:
  


Current Time: Sun Feb 23 02:45:26 GMT 2020

Powered by FUDForum. Page generated in 0.01322 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top