The Teensy 3.0 and RPi both have initialization routines that they have to go through. In the RPi's case it's a complete boot of a full LAMP stack in a Linux OS. It takes a finite amount of time to get that all up and running. Once the RPi is up and running, the cron program can take up to a full minute to start the teensypi_daemon program that initializes the serial socket between the Teensy 3.0 and RPi.
The Apache webserver comes online before the MySQL database is initialized and started. Any attempts to access the Teensy 3.0 board at that point will probably result in a "Database not found" error.
Attempts to access Teensy 3.0 prior to the teensypi_daemon starting will probably result in "socket error" or "file or directory not found" errors.
These items can be addressed, but to me they are currently lower priority since the system does work if given the opportunity to get it's house in order. This is also why I've left the error messages on the webpage instead of using "die" or logging the errors straight to a file.
If I'm starting up from a dead start, I normally power everything up, and then open an ssh connection to the teensypi.local address. Since openssl starts after both Apache and MySQL when I am successfully logged in, I am reasonably assured that the teensypi_daemon will start in a minute or less.
You could also use the ssh terminal to view the apache error log to see exactly when the teensypi_daemon comes on line. On the command line enter
tail -f /var/www/log/error.log
and press enter. Now open a web page to teensypi.local. If the teensypi_daemon isn't yet running, you'll see a running error trail that will show the time. When the time crosses the :59 second mark, the cron program should fire, the daemon should start, and the page should refresh with the chip data.
I realize that I'm more familiar with the process and perhaps accept some of its quirks more easily that the rest of you :cross: , but rest assured that I am more than willing to work with anyone that is trying to get their system fully operational.
The Apache webserver comes online before the MySQL database is initialized and started. Any attempts to access the Teensy 3.0 board at that point will probably result in a "Database not found" error.
Attempts to access Teensy 3.0 prior to the teensypi_daemon starting will probably result in "socket error" or "file or directory not found" errors.
These items can be addressed, but to me they are currently lower priority since the system does work if given the opportunity to get it's house in order. This is also why I've left the error messages on the webpage instead of using "die" or logging the errors straight to a file.
If I'm starting up from a dead start, I normally power everything up, and then open an ssh connection to the teensypi.local address. Since openssl starts after both Apache and MySQL when I am successfully logged in, I am reasonably assured that the teensypi_daemon will start in a minute or less.
You could also use the ssh terminal to view the apache error log to see exactly when the teensypi_daemon comes on line. On the command line enter
tail -f /var/www/log/error.log
and press enter. Now open a web page to teensypi.local. If the teensypi_daemon isn't yet running, you'll see a running error trail that will show the time. When the time crosses the :59 second mark, the cron program should fire, the daemon should start, and the page should refresh with the chip data.
I realize that I'm more familiar with the process and perhaps accept some of its quirks more easily that the rest of you :cross: , but rest assured that I am more than willing to work with anyone that is trying to get their system fully operational.