I haven't found anything either yet. Was it forgotten by the Onion team maybe?? Last post that said it was ready to be posted, it was a year ago.....
Posts made by Manuel Godinez
-
RE: NAS with Omega Onion
-
RE: Access php from outside the local network?
@Victor-Tagayun
I have tried it and it works, but not extensively. You have to install python though. -
RE: omega2+ flash omega2p-v0.1.10-b162.bin - break
Thanks!!! Working again. Will wait until they fix the latest firmware now.
-
RE: omega2+ flash omega2p-v0.1.10-b162.bin - break
I can verify that b162 is not working. I had a good booting process with b160 and have been installing the updates manually ever since I got the Omega2 (Not the +) and this b162 is broken. get the same Fatal exception: panic in 5 seconds too. In keeps rebooting over and over....
How can I restore the b160 back ?
Never got to a bad firmware before.
-
RE: 1-Wire Temperature Sensor - DS18B20 - on Omega2
@VIKAS-MALIK Have you followed the steps mentioned here : ??
https://wiki.onion.io/Tutorials/PHP-DHT11-DHT22-Sensor-Examples
It uses PHP for this tutorial.
-
Python library
I am starting to play around with Python and I saw that the python Twisted library was added with the b158 update but there is no info about how to use it or install it in the online docs. Omega: Can you point me in the right direction please?
Thanks
-
RE: Cron job
Thank you Costas!! That was it. That should be it now. And thanks everyone else too for their help.
-
RE: Cron job
Ok. I am now trying Python to run the cron script. I have done the following steps:
1 - Upgraded to latest firmware b157
2 - opkg update
3 - opkg install python
4 - opkg install python-light pyOnionGpio
5 - did a reboot
6 - got the following code into a filename called test2.py in the root folder :import time
import onionGpiogpioNum = 18
gpioObj = onionGpio.OnionGpio(gpioNum)set to output
status = gpioObj.setOutputDirection(0)
alternate the value
loop = 1
value = 0
while loop == 1:
# reverse the value
if value == 0:
value = 1
else:
value = 0# set the new value status = gpioObj.setValue(value) print 'GPIO%d set to: %d'%(gpioNum, value) time.sleep(5)
7 - chmod the test2.py to make it executable. 0744
8 - Now I go to the crontab -e and inserted the following line:12 6 * * * /test2.py > /tmp/test.log 2>&1
9 - restarted cron
10- waiting to execute
11 - got this at test.log :/test2.py: line 1: import: not found
/test2.py: line 2: import: not found
/test2.py: line 4: gpioNum: not found
/test2.py: line 5: syntax error: unexpected "("So I am guessing for some reason, it didn't find the import file onionGpio.py but I checked already and it is in the location it is suppose to be which is /usr/lib/python2.7/
I am wondering if I missed a step?
Thanks again for all your help
-
RE: Cron job
It does return the exact cron job:
5 13 * * * /www/php/test.php > /tmp/test.log
-
RE: Cron job
I was looking at the docs and they do mention the php-cli to be able to run from the command line but it works when I doit manually, but again, when using the cron it doesn't. So you think SH or Python would be easier for a PHP guy to grasp the basics?
-
RE: Cron job
Thanks Brad and Luciano and Don,
Guess going to have to learn another language
-
RE: Cron job
tried running from the command line and got the following:
root@Omega-AA00:/# /www/php/test.php
/www/php/test.php: line 1: can't open ?php: no such file
/www/php/test.php: line 3: include: not found
/www/php/test.php: line 5: syntax error: unexpected "("Thanks again
-
Cron job
I am starting to do some testing with Omega2 using php, I have installed PHP7 and PHP7-cgi and using the browser, I can go to the PHP file at /192.168.1.190/php/test.php and run it and it does work (Turns a led on) once it is executed. BUT when trying to use a cron job, it does nothing.
I am using the following :
5 13 * * * /www/php/test.php > /tmp/test.log
to run it at 1:05pm and send the output to test.log
and also making sure the test.php is chmod 755
then do a restart of the cron:
/etc/init.d/cron restart
and wait, nothing, not even the log file, it was created but 0 bytes.
Maybe I am missing a step?
Anyone has an idea of why is not runing the php file?
Thanks in advance
-
RE: Cloud API documentation?
@Costas-Costas Sorry for my ignrance but what do you mean that I need an Omega2+ or Omega2 with a USB flash drive???
-
RE: Cloud API documentation?
@Costas-Costas Yes, after much trial and error I got the PHP code to work now
Thanks though for the online converter, it might come handy in the future.I had use Blynk with Arduino but not that much, only a few tests and did something else. Will take a look at it again.
Thanks! -
RE: Cloud API documentation?
After much testing, I found the answer So now I can use the Device Explorer App from the cloud, but as Costas said, it is always better to control from our own web interface. Thing is, I can't seem to find and PHP examples on using the gpio pins. The code that produces the Device Explorer also, relies on the onion server. Would there be a way to directly connect to the Onion2 instead of going from our own web server to the onion server and then to the Omega2????
-
RE: Cloud API documentation?
@Costas-Costas said in Cloud API documentation?:
{"gpio":"1","value":"1"}
Great, I am just wondering, what option do you choose first, onion, uci or service?
See the following screenshot and it these are the steps to follow?
https://www.screencast.com/t/rS4t3tNDErThanks
-
RE: Cloud API documentation?
Have a question to you guys regarding Device Explorer App in the cloud:
How does one actually make it work? Can someone tell me the steps to do, let's say, set the onborard led to heartbeat mode...
Do I need to copy the commands and paste it somewhere? I have no clue on how it actually works the Device Explorer App and any help would be appreciate it.
-
RE: Documentation is incomplete
Just to clarify, it was a command but I never mention that it was fast-gpio, but the docs said one way and it was actually different. I will look around and see which one is the one I got the error. I just thought it might help Costas from something that happened to me too.