Author Topic: Cant get SimbleeCloud Service to work  (Read 426 times)

AKotowski

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Cant get SimbleeCloud Service to work
« on: September 18, 2017, 09:09:44 AM »
I have the Simblee example ButtonFlashModule working and can see the results on the ButtonFlash html page.  But when I try to route through a Simbleeservice their is no connection.  I have tried using the simblee service page  https://service.simbleecloud.com/, a server on my lan (192.1168.0.08) as well as trying to route this through the internet.  Are there any requirements or secrets for using a service?

A Kotowski

tolson

  • Global Moderator
  • *****
  • Posts: 880
  • Karma: +21/-0
    • View Profile
    • Thomas Olson Consulting
Re: Cant get SimbleeCloud Service to work
« Reply #1 on: September 18, 2017, 11:45:57 AM »
Yes, Inquiring minds would like to know !! I would like to see complete written theory API instructions on this subject. Step by step instructions to follow don't sink in for me either. I need the layout.

Michael Anderson

  • RFduino Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Cant get SimbleeCloud Service to work
« Reply #2 on: September 19, 2017, 07:39:06 AM »
I added the cloud sketch into a custom sketch and it worked great between device<->mobile<->cloud<->custom HTML page
however this was running off library 1.0.3 and had some stability bugs.

I updated to 1.1.4 and noticed some improvements on stability bugs but realized the custom HTML page no longer is connected to the device, until the device pushes a button state change to the cloud (which in turn updates HTML page and briefly displays connected before disconnecting again).

Sounds like you are also having a similar connection issues for your service as I am.

I am curious if your service connection might start working if you copy and run your sketch on library 1.0.3?

RFD_Nelson

  • RFduino Team
  • *****
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: Cant get SimbleeCloud Service to work
« Reply #3 on: September 19, 2017, 07:41:32 AM »
Hi AKotowski/tolson,

How can I help with the issues you're having? To use a service, create a PHP page including the SimbleeCloud.php script accessible from the Cloud demos. You can find that example .zip file at: https://service.simbleecloud.com/demo.zip.

Then, create a service in your cloud dashboard and assign it an ESN. Once you have that ESN, send data to your service using cloud.send(destESN, data, len);. You should see the data arrive at your service and be accessible through the SimbleeCloud instance in your PHP script.

Can I answer any questions on this process?

Thanks,

Nelson

AKotowski

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Cant get SimbleeCloud Service to work
« Reply #4 on: September 19, 2017, 09:18:39 AM »
Thanks for your reply. 

1.) Can I use the service routine provided by simblee at https://service.simbleecloud.com, or do I have to provide my own?
2.) If I provide my own can it be on a LAN address: 192.168.0.8 if my phone is connected to my LAN?
3.) Or do I need to provide the service routine on a public website?
4.) I assume I cant run it on my desktop.  I can run the php file using a file on my desktop, but nothing happens.  I assume this is because  the service is connected to my desktop, not simblee cloud.

Thanks.

A Kotowski

AKotowski

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Cant get SimbleeCloud Service to work
« Reply #5 on: September 19, 2017, 09:23:32 AM »
Michael:

I can run as you do.  My problem is when I try to insert a service in the loop:  device<->mobile<->cloud<->service<->custom HTML page.
Then it stops working, either because the servie routine does not work(but I used the routine in the example) or because the communications chain is broken(I suspect this is the problem).

Andy Kotowski

AKotowski

  • RFduino Jr. Member
  • **
  • Posts: 23
  • Karma: +0/-0
    • View Profile
Re: Cant get SimbleeCloud Service to work
« Reply #6 on: October 16, 2017, 07:54:34 AM »
I figured it out.
For the cognoscenti this is probably obvious, but for a noob like me I would have liked to have this information:

1.) The easiest way to start is with an HTML page using the POOL function in the simblee cloud.  I made both ButtonFlash and ButtonFlashfromWeb work.  You need to modify the files to include your own userID.  THe html files can stay on your computer, you just open them with a web browser.  You need to include the file SimbleeCloud.js in the same directory. The html page will communicate with the simblee cloud and identify itself via the esn you program (eg 2).  You can program the interaction with your simblee using javascript.  The only problem is you cant create a data file such as a .csv file to record your data.  You can create a cookie to record data.

2.) To create data files you need to do server side programming, with php for example.  This is where the services option of the simblee cloud comes in.  You need to use a public server with https capability.  For example: https://myserver.com/service/ButtonFlashService.php.  Using the simblee service routine at https://service.simbleecloud.com/  did not work for me.  You need to create the /service and the /service/out directories. Put the ButtonFlashService.php into the /service directory and allow the /service directory to be served by your web server. You also need to put the file SimbleeCloud.php into the same directory.  ButtonFlashService.php creates  an out.txt file.  ButtonFlashService.php basically passes the data back and forth between the simblee and the html page and records the transactions in the out.txt file.  You can modify this to create a data.csv file.  You can then use ftp to download the data.  The .php file does not necessarily need to pass the data on to an html page.  Debugging is tricky because you cant open the page on a browser and see what is happening.  You need to also create a log file and write debug info from your php script.

A Kotowski
« Last Edit: October 19, 2017, 03:34:36 PM by AKotowski »

 

anything