cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

[RaspberryPi Tutorial] Unable to connect LSR to EMS

SOLVED

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

Ah I meant actually typing out PiThing on the identifier section on your Thing, saving the Thing and then trying out Manage Bindings to rule out couple issues.

View solution in original post

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

So, I have made some interesting but odd observations. Like you said, Aanjan, I created a Thing called "MyPiThing" in the Composer which is based on the RemoteThing template. In the Identifier text box I inserted 'PiThing'. Running this configuration did not provide any change with the problem.

Now comes the interesting part: In my lua config file I the extended the scripts.PiThing object with the property 'identifier = "PiThing"'. Running wsems and luaScriptResource with this configuration obviously did the thing because now the communication between Foundation server, EMS and Lua script finally seems to work.

I have attached an archive containing the trace logs of the EMS and Lua scripts as well as some screenshots from the Composer and Monitor.

Some strange things that i noticed: My PiThing is shown as a bound and an unbound thing? Is this a normal behaviour? (see screenshots).

So, can I ascertain that the Raspberry Pi tutorial is somewhat oudated? There, the creation of a new Thing inside Composer is explicitly done after the Pi sends its data to the server.

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

I got the impression that if you specify an identifier in the Lua config, the Remote Thing tries to bind to a Thing with the same identifier.  If there's no Thing with the same identifier, the Remote Thing remains unbound.  If there's no identifier specified in the Lua config, it tries to bind to a Thing with the same name as in the Lua config, and if that's not found, it remains unbound.

Does that sound correct?

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

That's what I would assume, too, but my observations were different as stated above. May I ask if you encountered the exact same problem, Richard? If so, do you succeed as well in transfering the values with the approach I described?

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

I don't know if my problem was exactly the same, but it was certainly very similar.  I saw both bound and unbound remote entities, and sometimes the bound ones weren't properly bound (they had an exclamation mark rather than a tick next to them).

What fixed it for me was to remove the identifier stuff completely and just make sure that the name of my Thing matched that in the Lua config file.

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

hello,Aanjan

When running wsems EMS can connect to the platform but appears this problem

[ERROR] 2017-02-22 03:39:20,806 emsRequestHandler: Thing not bound to EMS, or host is not set

why?

Hope you can help me

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

WangNi, do you have an auto_bind section defined in your config.json? You would get this message if you're connecting the EMS to your platform, but don't have it associated with a Thing yet.

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

hi Aanjan,

but The platform can read the properties

Can not refresh

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

I had the same problem today. My RPi complained about "GetPropertySubscriptions" as well but in my case I had set up an application key that was not associated to a user with an administrator level. So basically my edge thing was not able to run a POST to execute the GetPropertySubscriptions and that is why it failed. The solution in this case was to make sure the application key had the right authority.

Re: [RaspberryPi Tutorial] Unable to connect LSR to EMS

I was seeing the same problem and , per your note, I changed to an admin level user on the app key and it worked. Thanks!