Alternate Portal

Related to the Portal
User avatar
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX
PostPosted: Fri Jul 11, 2014 7:30 pm
binder wrote:yes we can get json data, check ra_wifi.cpp file and it will show you the data.


Sent from my iPad mini


How am i getting this via locally hosted site?
User avatar
Posts: 2708
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Jul 12, 2014 1:54 pm
i dont follow. if you look in your libraries folder for the ra_wifi.cpp file, that will tell you the command you can issue to your controller to retrieve the json data for usage.


Sent from my iPad mini
User avatar
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX
PostPosted: Sat Jul 12, 2014 4:47 pm
binder wrote:i dont follow. if you look in your libraries folder for the ra_wifi.cpp file, that will tell you the command you can issue to your controller to retrieve the json data for usage.


Sent from my iPad mini


I see it now, i had to update my libraries first ;)

Thanks
User avatar
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX
PostPosted: Sat Jul 12, 2014 8:12 pm
So i have a question. Is the goal of the local www app to get controller data from the 'users' internal network or from the reef angel db? I havent downloaded the android app yet but was just wondering what the ultimate goal was for the www app.
User avatar
Posts: 5339
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sat Jul 12, 2014 8:15 pm
either, the controller is live, the db has things like labels and port names but is 5 minute data.
User avatar
Posts: 84
Joined: Sat Aug 04, 2012 11:52 pm
Location: Pearland, TX
PostPosted: Sat Jul 12, 2014 9:00 pm
lnevo wrote:either, the controller is live, the db has things like labels and port names but is 5 minute data.


It just brings me back to the problem i stated above. There is NO WAY you can make a website perform XML cross-domain calls. JSON, yes. XML, nope

--EDIT--
OK after some code changes i DO have the 'Download Labels from Portal' function working. Now keep in mind this is using a YQL query that acts as a proxy. This is to get past the cross-domain issues that i have stated before. This will work for any scenario where the local app needs to talk to reefangel.com for downloading any type of XML data. As i have stated before the YQL calls have hourly/daily limits and COULD cause a problem if a user is over using the query via webpage updates.

If a anyone is interested to see just that part working let me know and i can upload a .zip with the few changes in it that i have made. :D
User avatar
Posts: 5339
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Jul 13, 2014 5:11 am
I'm sure roberto can dump json for the labels
User avatar
Posts: 2708
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Aug 02, 2014 6:23 pm
i've been working on this portal today and now I'm running into some issues trying to send data from my controller. I've changed the libraries to reference my submit script (/ra/submitp.php?....). I've added in the ReefAngel.Portal() command to send the data. If I connect to the serial monitor, I see the data get sent.
My problem is I don't think my wifi module is configured correctly. I've talked with Roberto and he told me what he has set to work with the standard portal. I had to set the Host and Port to be the IP address of the server in use. I tried my internal network address and also my external network address but nothing.
I used the
Code: Select all
set ip host XXX.XXX.XXX.XXX
set ip remote 80

Do I need to change anything else from the wifi module?
Here's some output of the settings:
Code: Select all
<4.00>
get w

SSID=BinderWifi
Chan=0
ExtAnt=0
Join=1
Auth=MIXED
Mask=0x1fff
Rate=12, 24 Mb
Linkmon-Infra=30
Linkmon-AP=3600
Passphrase=
EAP_Id=userid
EAP_User=peap-user

<4.00>
get i

IF=UP
DHCP=CACHE
IP=10.0.42.41:2000
NM=255.255.255.0
GW=10.0.42.1
HOST=98.253.61.42:80
PROTO=TCP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0


I was thinking that I may have to change some other settings, but I am not 100% positive. Anybody have some ideas? Or do I need to share more output from my wifi module?

Posts: 12166
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sat Aug 02, 2014 6:32 pm
send the get a dump
I think something got messed up when you did the reset.
Roberto.
User avatar
Posts: 2708
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Sat Aug 02, 2014 6:49 pm
rimai wrote:send the get a dump
I think something got messed up when you did the reset.

I think you are right. Here's the output:
Code: Select all
<4.00>
get a

Beacon=102
Reboot=0
<4.00>
get e

wifly-GSX Ver 4.00.1, Apr 19 2013 11:48:31 on 131C94
Beacon=102
Reboot=0
IF=UP
DHCP=CACHE
IP=10.0.42.41:2000
NM=255.255.255.0
GW=10.0.42.1
HOST=98.253.61.42:80
PROTO=TCP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
OPEN=
CLOSE=
REMOTE=
FlushSize=1024
MatchChar=0
FlushTimer=5
IdleTimer=3
CmdChar=$
DNS=10.0.42.1
Name=dns1
Backup=rn.microchip.com
Lease=86400
FTP=0.0.0.0:21
File=wifly-GSX.img
User=roving
Pass=Pass123
Dir=public
Timeout=200
FTP_mode=0x0
SSID=BinderWifi
Chan=0
ExtAnt=0
Join=1
Auth=MIXED
Mask=0x1fff
Rate=12, 24 Mb
Linkmon-Infra=30
Linkmon-AP=3600
Passphrase=
EAP_Id=userid
EAP_User=peap-user
SleepTmr=0
WakeTmr=0
Trigger=0x1
Autoconn=0
IoFunc=0x0
IoMask=0x20f0
IoValu=0x0
DebugReg=0x0
PrintLvl=0x0
LaunchStr=web_app
TimeEna=0
TIMEADR=64.90.182.55:123
Zone=7
Baudrate=57600
Flow=0x0
Mode=0x0
Cmd_GPIO=0
JoinTmr=1000
Replace=0x24
DeviceId=WiFly-GSX
Password=
Format=0x0
Signal=0
Average=5
BCAST=255.255.255.255:55555
Interval=0x7
Backup=0.0.0.0:0
Sensor=0x0
SensePwr=0x0
<4.00>
PreviousNext

Return to Portal

Who is online

Users browsing this forum: No registered users and 2 guests