httpFirebase
httpFirebase copied to clipboard
how to send data to arduino from firebase to php
need help here I already used your code examples but this time I want to send data to firebase then the data will be used by the arduino to be more specific I want to changed the arduino wifi by sending data to firebase
specifically the SSID and password of the wifi
I think you should probably base64 encode the wifi and password for security. Possibly create a function on the Arduino side that makes a secure call to a new script that retrieves the Wifi and Password, updates the Arduino and restarts it? Just a thought...
On Sat, Jun 15, 2019 at 1:15 AM xiaomy12 [email protected] wrote:
specifically the SSID and password of the wifi
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/robertcedwards/httpFirebase/issues/4?email_source=notifications&email_token=AABCD77UFQJXAKN3OPLDG2TP2SCH7A5CNFSM4HYOLOD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYRL4A#issuecomment-502339056, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCD77JH54ZU4THSAQDFKTP2SCH7ANCNFSM4HYOLODQ .
yes sir thank you sir can I send my codes here? should I add a function on the php code? that receives data for Wifi SSID and Password
PHP code
`<?php
require 'firebaseLib.php'; $Trash = $_GET["trash"];
$Distance = $_GET["distance"]; $Temperature = $_GET["temp_f"]; $Humidity= $_GET["humidity"];
// --- This is your Firebase URL $baseURI = 'https://thesis1-69.firebaseio.com'; // --- Use your token from Firebase here $token = 'xxxxx'; // --- Here is your parameter from the http GET
$devicestatus= array('Distance' => $Distance,'Temperature' => $Temperature,'Humidity' => $Humidity);
$firebasePath = '/thesis1-69/';
$full= array($Trash => $devicestatus);
/// --- Making calls $fb = new Firebase($baseURI, $token); $fb -> update($firebasePath, $full);
?> `
sir I hope you can help me with this
I already searched so much articles but yet get none of it related to the topic of mine
sir good morning
by putting " echo " on the PHP code the data will be sent to arduino
the problem is the firebase how I can retrieve data from firebase using the PHP
Hello, ah I see. There should be some documentation and code examples for pulling from Firebase here maybe this would help: https://stackoverflow.com/questions/48924175/can-we-use-firebase-realtime-database-with-core-php The harder part, at the time, was communicating with the Arduino. -Rob
On Mon, Jul 1, 2019 at 8:39 PM xiaomy12 [email protected] wrote:
sir good morning
by putting " echo " on the PHP code the data will be sent to arduino
the problem is the firebase how I can retrieve data from firebase using the PHP
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/robertcedwards/httpFirebase/issues/4?email_source=notifications&email_token=AABCD765UYIG4XSE3VYLONDP5KWTHA5CNFSM4HYOLOD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY7ZP7Y#issuecomment-507484159, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCD77MANIJKRTOGGDMG3TP5KWTHANCNFSM4HYOLODQ .
hello sir the code or library and documentation used on that forum wasn't the same with the PHP code I used
I don't know how to use it too
I can't use your PHP code here? can you produce a code that is aligned on your code here ? to enable http or PHP to retrieve data from firebase thank you sir
sir
sir I still don't know how to solve this I hope you can help me
This code was written a while ago and Firebase has changed much of how it operates. I suggest reading up on php examples for Firebase from tutorials or youtube videos.
I think I will get it now, first I need to work with the PHP