Been struggling to get my raspberrypi to populate the data it is receiving from my emontx. Using minicom I can confirm that the raspberrypi is receiving the power data from emontx.
10 76 0 80 0 81 0 0 95 100 206 100 206 100 206 100 206 10 73 0 80 0 79 0 235 94 100 206 100 206 100 206 100 206 10 69 0 94 0 72 0 22 95 100 206 100 206 100 206 100 206 10 69 0 92 0 68 0 255 94 100 206 100 206 100 206 100 206
The raspberrypi_run.php scripts halts with no error and never exits as I presume it is supposed to. Here is an example if i run this from command line (note crontab is not running):
pi@pieater /var/www/emoncms/Modules/raspberrypi $ php raspberrypi_run.php Remote upload enabled - details correct
Any ideas?
Re: emoncms - php raspberrypi_run.php halts with no error
Just did some troubleshooting and seems the script is getting stuck whilst trying open the stream to the serial port:
Re: emoncms - php raspberrypi_run.php halts with no error
Hi Tim,
I have a similar problem with mine. Everything is working except for the PHP script that interfaces with the R-Pi receiver. This is entirely of a problem of my own making as I have installed it on Arch Linux ARM instead of Raspian as recommended. I'll let you know if I make any progress.
Barry
Re: emoncms - php raspberrypi_run.php halts with no error
Okay, I got emonCMS with the Raspberry Pi extension running on Arch Linux. I didn't have Python installed or the required modules including Serial and GPIO. This fixed it for me.
Re: emoncms - php raspberrypi_run.php halts with no error
@tdereus : Could it be that the COM port is already open (by minicom for instance) ? Or the path is wrong (I don't see any reason why) ?
if (PATH_SEPARATOR != ";") {
$filename = "dio.serial:///dev/ttyAMA0";
} else {
$filename = "dio.serial://dev/ttyAMA0";
}
// Open the stream for read and write and use it.
$f = fopen($filename, "r+", false, $c);
if ($f)
@Barry : Unless you're using the (still work-in-progress) python script, I don't think you need those python dependencies. Which gateway script (php or python ?) and which version (master, dev ?) are you using ?