Closed Paku- closed 9 years ago
Are you working on the clean ajax branch or something else?
just clean ajax ...
have just pulled your last commit, the same .... I think something is wrong with conditions checks, never saw a messages like that ....
tested again on: GPIOServer cleanup #34
Please be sure to unexport all pins prior to running the script. If your pins were exported by the previous version of the script using the gpio utility then it will break in this version.
It can not work like this .. service HAS to set all pins as db states .dot. All raws in the db init query is set as default Rpi setup
It will work fine when it is done being developed. For now you should try unexporting all pins and then run the script.
If you look below you can see why I had to stop using the gpio utility to export, it doesn't create a file that can be used to check direction and status etc.
pi@server /sys/class/gpio $ ls
pi@server /sys/class/gpio $ gpio export 4 out
pi@server /sys/class/gpio $ ls
pi@server /sys/class/gpio $ gpio unexport 4
pi@server /sys/class/gpio $ echo 4 > /sys/class/gpio/export
pi@server /sys/class/gpio $ ls lrwxrwxrwx 1 root gpio 0 Jan 13 18:25 gpio4 -> ../../devices/virtual/gpio/gpio4
Have you change the name of the 'time' column into 'date' ??? (log table)
yes you did :(
can not test as log scripts are dead now...
yeah I did by accident in commit cf8a5a8e0872ac0575507441e5694a5d9df8e922 so I made more commits to correct it in commits 3daf102aa6e59c5b2ed44962dfe81c0d2ce79c7a and 5c44996af930972febe9f4eebbc5918568b778e7
They should be working fine, they are working for me on the ajax branch
this column represent time not date .... got last commit
and next .. put images into folder ..
The column actually represents a timestamp, or datetime, so i should have named it differently.
Also mobile icons are usually found in the root of the site, as is the favicon
the same ... ID Time Entry 65 2015-01-14 00:55:43 Pin 22 direction to: out (in) 64 2015-01-14 00:55:43 Pin 27 direction to: out 63 2015-01-14 00:55:43 Pin 27 direction to: out (in) 62 2015-01-14 00:55:43 Pin 18 direction to: out 61 2015-01-14 00:55:43 Pin 18 direction to: out (in) 60 2015-01-14 00:55:42 Pin 17 direction to: out 59 2015-01-14 00:55:42 Pin 17 direction to: out (in) 58 2015-01-14 00:55:42 Pin 4 changed to: 0 57 2015-01-14 00:55:40 Pin 4 direction to: out 56 2015-01-14 00:55:39 Pin 4 direction to: out (in) 55 2015-01-14 00:55:37 Pin 21 direction to: out 54 2015-01-14 00:55:37 Pin 21 direction to: out (in) 53 2015-01-14 00:55:37 Enabled Pin 21 52 2015-01-14 00:55:37 Pin 20 direction to: out 51 2015-01-14 00:55:37 Pin 20 direction to: out (in) 47 2015-01-14 00:55:36 Enabled Pin 26 48 2015-01-14 00:55:36 Pin 26 direction to: out (in) 49 2015-01-14 00:55:36 Pin 26 direction to: out 50 2015-01-14 00:55:36 Enabled Pin 20 41 2015-01-14 00:55:35 Enabled Pin 19 42 2015-01-14 00:55:35 Pin 19 direction to: out (in) 43 2015-01-14 00:55:35 Pin 19 direction to: out 44 2015-01-14 00:55:35 Enabled Pin 16 45 2015-01-14 00:55:35 Pin 16 direction to: out (in) 46 2015-01-14 00:55:35 Pin 16 direction to: out 35 2015-01-14 00:55:34 Enabled Pin 12 36 2015-01-14 00:55:34 Pin 12 direction to: out (in) 37 2015-01-14 00:55:34 Pin 12 direction to: out 38 2015-01-14 00:55:34 Enabled Pin 13 39 2015-01-14 00:55:34 Pin 13 direction to: out (in) 40 2015-01-14 00:55:34 Pin 13 direction to: out 34 2015-01-14 00:55:34 Pin 6 changed to: 0 33 2015-01-14 00:55:33 Pin 6 direction to: out 32 2015-01-14 00:55:33 Pin 6 direction to: out (in) 31 2015-01-14 00:55:33 Enabled Pin 6 30 2015-01-14 00:55:33 Pin 5 changed to: 0 29 2015-01-14 00:55:33 Pin 5 direction to: out 28 2015-01-14 00:55:33 Pin 5 direction to: out (in) 27 2015-01-14 00:55:33 Enabled Pin 5 24 2015-01-14 00:55:32 Enabled Pin 25 25 2015-01-14 00:55:32 Pin 25 direction to: out (in) 26 2015-01-14 00:55:32 Pin 25 direction to: out 18 2015-01-14 00:55:31 Enabled Pin 23 19 2015-01-14 00:55:31 Pin 23 direction to: out (in) 20 2015-01-14 00:55:31 Pin 23 direction to: out 21 2015-01-14 00:55:31 Enabled Pin 24 22 2015-01-14 00:55:31 Pin 24 direction to: out (in) 23 2015-01-14 00:55:31 Pin 24 direction to: out 12 2015-01-14 00:55:30 Enabled Pin 27 13 2015-01-14 00:55:30 Pin 27 direction to: out (in) 14 2015-01-14 00:55:30 Pin 27 direction to: out 15 2015-01-14 00:55:30 Enabled Pin 22 17 2015-01-14 00:55:30 Pin 22 direction to: out 16 2015-01-14 00:55:30 Pin 22 direction to: out (in) 7 2015-01-14 00:55:29 Pin 17 direction to: out (in) 6 2015-01-14 00:55:29 Enabled Pin 17 8 2015-01-14 00:55:29 Pin 17 direction to: out 9 2015-01-14 00:55:29 Enabled Pin 18 10 2015-01-14 00:55:29 Pin 18 direction to: out (in) 11 2015-01-14 00:55:29 Pin 18 direction to: out 5 2015-01-14 00:55:28 Pin 4 changed to: 0 4 2015-01-14 00:55:28 Pin 4 direction to: out 3 2015-01-14 00:55:28 Pin 4 direction to: out (in) 2 2015-01-14 00:55:28 Enabled Pin 4 1 2015-01-14 00:55:27 Starting GPIO Server
while db is like that
pinID Direction BCM# WPi# Description Status Enabled 1 out X X 3.3V [] [] 17 out X X 3.3V [] [] 27 in 0 30 SDA.0 [] [] 14 out X X GND [] [] 30 out X X GND [] [] 20 out X X GND [] [] 34 out X X GND [] [] 9 out X X GND [] [] 39 out X X GND [] [] 2 out X X 5V [] [] 4 out X X 5V [] [] 6 out X X GND [] [] 25 out X X GND [] [] 28 in 1 31 SCL.0 [] [] 3 out 2 8 SDA.1 [] [] 5 out 3 9 SCL.1 [] [] 7 out 4 7 GPIO 4/7 [] [X] 29 out 5 21 GPIO 5/21 [] [X] 31 out 6 22 GPIO 6/22 [] [X] 26 out 7 11 CE1 [] [] 24 out 8 10 CE0 [] [] 21 out 9 13 MISO [] [] 19 out 10 12 MOSI [] [] 23 out 11 14 SCLK [] [] 32 out 12 26 GPIO 12/26 [] [X] 33 out 13 23 GPIO 13/23 [] [X] 8 out 14 15 TxD [] [] 10 out 15 16 RxD [] [] 36 out 16 27 GPIO 16/27 [] [X] 11 out 17 0 GPIO 17/0 [] [X] 12 out 18 1 GPIO 18/1 [] [X] 35 out 19 24 GPIO 19/24 [] [X] 38 out 20 28 GPIO 20/28 [] [X] 40 out 21 29 GPIO 21/29 [] [X] 15 out 22 3 GPIO 22/3 [] [X] 16 out 23 4 GPIO 23/4 [] [X] 18 out 24 5 GPIO 24/5 [] [X] 22 out 25 6 GPIO 25/6 [] [X] 37 out 26 25 GPIO 26/25 [] [X] 13 out 27 2 GPIO 27/2 [_] [X]
I wonder if the difference is because of the new pinRevision3 table? everything is working great for me on pinRevision2.
exports cleared few times:
root@xx:/etc/init.d# gpio unexportall root@xx:/etc/init.d# gpio exports root@xx:/etc/init.d#
gpio readall returns all pins are set to in
+-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | | | 3.3v | | | 1 || 2 | | | 5v | | | | 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5V | | | | 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | | | 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | ALT0 | TxD | 15 | 14 | | | | 0v | | | 9 || 10 | 1 | ALT0 | RxD | 16 | 15 | | 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 | | 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | | | 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 | | | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 | | 10 | 12 | MOSI | IN | 0 | 19 || 20 | | | 0v | | | | 9 | 13 | MISO | IN | 0 | 21 || 22 | 0 | IN | GPIO. 6 | 6 | 25 | | 11 | 14 | SCLK | IN | 0 | 23 || 24 | 1 | IN | CE0 | 10 | 8 | | | | 0v | | | 25 || 26 | 1 | IN | CE1 | 11 | 7 | | 0 | 30 | SDA.0 | IN | 1 | 27 || 28 | 1 | IN | SCL.0 | 31 | 1 | | 5 | 21 | GPIO.21 | IN | 1 | 29 || 30 | | | 0v | | | | 6 | 22 | GPIO.22 | IN | 1 | 31 || 32 | 0 | IN | GPIO.26 | 26 | 12 | | 13 | 23 | GPIO.23 | IN | 0 | 33 || 34 | | | 0v | | | | 19 | 24 | GPIO.24 | IN | 0 | 35 || 36 | 0 | IN | GPIO.27 | 27 | 16 | | 26 | 25 | GPIO.25 | IN | 0 | 37 || 38 | 0 | IN | GPIO.28 | 28 | 20 | | | | 0v | | | 39 || 40 | 0 | IN | GPIO.29 | 29 | 21 | +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+ | BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM | +-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+
going sleep will look later, bye
Thats is the problem, they have to be set to out.
service HAS to set them OUT as DB is !!!
but the raspberry pi says they are not set to out. thats what matters here
Dig deeper and find the solution ... I will tomorrow .. good night.
You did it man :)
Have a look here.
very strange ....
63 2015-01-13 22:34:23 Pin 6 direction to: out (in) 64 2015-01-13 22:34:23 Pin 6 direction to: out 65 2015-01-13 22:34:23 Pin 6 changed to: 0 66 2015-01-13 22:34:23 Enabled Pin 12 67 2015-01-13 22:34:23 Pin 12 direction to: out (in) 68 2015-01-13 22:34:23 Pin 12 direction to: out 58 2015-01-13 22:34:22 Enabled Pin 5 59 2015-01-13 22:34:22 Pin 5 direction to: out (in) 60 2015-01-13 22:34:22 Pin 5 direction to: out 61 2015-01-13 22:34:22 Pin 5 changed to: 0 62 2015-01-13 22:34:22 Enabled Pin 6 57 2015-01-13 22:34:20 Pin 25 direction to: out 56 2015-01-13 22:34:20 Pin 25 direction to: out (in) 55 2015-01-13 22:34:20 Enabled Pin 25 54 2015-01-13 22:34:20 Pin 24 direction to: out 49 2015-01-13 22:34:19 Enabled Pin 23 50 2015-01-13 22:34:19 Pin 23 direction to: out (in) 51 2015-01-13 22:34:19 Pin 23 direction to: out 52 2015-01-13 22:34:19 Enabled Pin 24 53 2015-01-13 22:34:19 Pin 24 direction to: out (in) 43 2015-01-13 22:34:18 Enabled Pin 27 44 2015-01-13 22:34:18 Pin 27 direction to: out (in) 45 2015-01-13 22:34:18 Pin 27 direction to: out 46 2015-01-13 22:34:18 Enabled Pin 22 47 2015-01-13 22:34:18 Pin 22 direction to: out (in) 48 2015-01-13 22:34:18 Pin 22 direction to: out 42 2015-01-13 22:34:17 Pin 18 direction to: out 41 2015-01-13 22:34:17 Pin 18 direction to: out (in) 40 2015-01-13 22:34:17 Enabled Pin 18 39 2015-01-13 22:34:17 Pin 17 direction to: out 38 2015-01-13 22:34:17 Pin 17 direction to: out (in) 36 2015-01-13 22:34:16 Pin 4 direction to: out 37 2015-01-13 22:34:16 Enabled Pin 17 35 2015-01-13 22:34:16 Pin 4 direction to: out (in) 34 2015-01-13 22:34:15 Enabled Pin 4 33 2015-01-13 22:34:14 Starting GPIO Server 32 2015-01-13 22:34:10 Stopping GPIO Server 31 2015-01-13 22:17:14 Stopping GPIO Server