Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data in remote-config.json not posting #7

Open
jaredloman opened this issue Sep 13, 2015 · 0 comments
Open

Data in remote-config.json not posting #7

jaredloman opened this issue Sep 13, 2015 · 0 comments

Comments

@jaredloman
Copy link

I'm not sure if this is an issue with the script or perhaps an issue with the "scripter" (me) ... but no data seems to be posted from remote-config.json on pico button press.

When SSH'd into the hub I press a button on the pico remote and can see it output the Serial Number, Button Number, Nickname & Data (whether json or plain text) and then it just hangs there until I press "Return" or "Ctrl+C".

The API that I'm posting to is functioning correctly as I also built a web interface to control devices and I can also use curl or just a standard GET request in browser to trigger lights but for some reason, it does not work on button press.

For testing, I wrote a quick php script that would write out a file to the hub with all the data in the $_REQUEST variable but although the file gets written (showing me that something is working) no data is ever available in the post.... UNLESS I add it directly to the URL (i.e. http://127.0.0.1/test.php?id=1)

I've tried simplifying the data to plain text and just sending a simple string "test" and I've tried sending json as well.

So, my question... Should I actually able to send the data I've put in the remote-config.json file or do I need to include any data in the actual URL?

Edit: I should also note that although GET works in browser... it doesn't work on pico button press (except in the case of my test script which simply writes the parameters to a txt file). I'm baffled...

Edit #2: I can successfully send attributes to my API through the URL as GET params (i.e. ?&id=1&test=abc) as long as the method is set to "POST". Weird eh?

P.S. - A little bug on the main page example of remote-config.json - It's missing the opening "{" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant