Small bug with OUTPUT-GPIO-1-Dimmer

Posted on
Mon Jul 18, 2016 4:47 am
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Small bug with OUTPUT-GPIO-1-Dimmer

When I create a new OUTPUT-GPIO-1-Dimmer device and select the option: (2) select gpio# for this OUTPUT channel: I notice that pin 12 reads GPIO16 and not GPIO18. GPIO16 is also listed further down (twice) pointing to pin 36 which is correct.

Posted on
Mon Jul 18, 2016 6:25 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

Will fix tomorrow.


Sent from my iPhone using Tapatalk

Posted on
Fri Jul 22, 2016 11:21 am
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Re: Small bug with OUTPUT-GPIO-1-Dimmer

Have you had a chance to look at this?

I've found another small bug...

I have an INPUT-GPIO-max-1-PINs set up on GPIO24 Pin 18 with INPUT Type: Pulldown ResistorON

This works great until I reboot the rPi where the input floats up to 3.3v if I measure it with nothing connected instead of being at about 0v

The Indigo piBeacon settings remain correct as expected, but I have to go through the process again of setting and confirming and waiting for the input device settings to load into the rPi again before it will work once more until the next reboot.

Posted on
Fri Jul 22, 2016 11:48 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

could you check the file "parameters" on the api?
and the source file /Users/yourID/Documents/piBeacon/interfaceFiles/parameters.0 <-- use the rpi# for the file name
look for:
Code: Select all
 
...
"sensors": {
    "INPUTgpio-1": {
      "332019181": [
        {
          "count": "off",
          "gpio": "24",
          "inpType": "low"  <-- this for pull down config
        }
      ],
      "573070377": [
        {
          "count": "off",
          "gpio": "21",
          "inpType": "high" <-- this is for pull up config
        }
      ]
    },
  },
...



I tried pull_up and pull_down on. mine seem to work.

Posted on
Fri Jul 22, 2016 12:16 pm
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Re: Small bug with OUTPUT-GPIO-1-Dimmer

Here is my device shown from my Mac parameters.1 file:
Code: Select all
"INPUTgpio-1": {
      "1527957909": [
        {
          "count": "off",
          "gpio": "24",
          "inpType": "low"
        }
      ],

Looks correct

Posted on
Fri Jul 22, 2016 12:18 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

is it the same on the rPI?

Posted on
Fri Jul 22, 2016 12:19 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

and could you try a different pin? Not all pins on the api behave the same way.

Posted on
Fri Jul 22, 2016 12:29 pm
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Re: Small bug with OUTPUT-GPIO-1-Dimmer

Sorry I can't try a different pin just yet but I will do.

OK, yes I've just checked the parameters file on the rPi 2 and it looks the same for this device showing low. Presumably when the rPi comes back up after a reboot, something needs to run to set this input back from default to having a pull-down resistor, or doesn't it work that way?

Posted on
Fri Jul 22, 2016 2:05 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

could you post the whole parameters file w/o the userid/passwords

Posted on
Fri Jul 22, 2016 2:10 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

it checks every time it reads the parameters file
if "INPUTgpio" in sensorList:
startGPIO() #<-- this will initiate the GPIO settings
Only if you have an old INPUTgpio device ( no -1 -2 -..) then it does not do it.
It does it at boot and every 30 seconds .


Karl

check :

[EDIT]
"enabled sensor INPUTgpio-1"
is in the log file every time it reads the parameters file at boot and every 30 seconds IF THERE IS ANY CHANGE

Posted on
Sat Jul 23, 2016 9:50 am
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Re: Small bug with OUTPUT-GPIO-1-Dimmer

OK, I've posted the entire parameters file as seen on the rPi. I'm using GPIO24 (pin 18) as your diagram shows this as i1 and I take that to mean the second input (i0 meaning the first). See: viewtopic.php?f=187&t=15563

I took the liberty of installing wiringPi to work out what's going on and I was wrong - it hasn't changed the pull-down resistor to a pull-up, it's changed from an input to an output pin and set the output to be a 1.

Code: Select all
{
  "BLEserial": "sequential",
  "acceptNewiBeacons": "1",
  "collectMsgs": "20",
  "debug": 0,
  "deleteHistoryAfterSeconds": 86400,
  "enableRebootCheck": "reboot",
  "enableSPIpinsAsGpio": "0",
  "enableTXpinsAsGpio": "0",
  "enabledRebootSwitch": false,
  "enableiBeacons": "1",
  "ipOfServer": "192.168.1.103",
  "loopMaxCallBLE": "900",
  "maxParseSec": "1.0",
  "myPiNumber": "1",
  "passwordOfServer": "",
  "portOfServer": "8176",
  "rPiCommandPORT": "9999",
  "rPiRestartCommand": "",
  "rebootHour": "2",
  "rebootSeconds": 43200,
  "rebootWatchDogTime": "-1",
  "restartBLEifNoConnect": true,
  "sendAfterSeconds": "60",
  "sensorList": "INPUTgpio-1*1590875007,INPUTgpio-1*1527957909,Wire18B20*1592397868,BLEconnect*530206011,BLEconnect*314921500,BLEconnect*1429868393,",
  "sensorRefreshSecs": 90,
  "sensors": {
    "BLEconnect": {
      "1429868393": {
        "BLEtimeout": "0.8",
        "iPhoneRefreshDownSecs": 0.0,
        "iPhoneRefreshUpSecs": 720.0,
        "mac": "DC:2B:2A:04:E7:A3",
        "retryIfUP": false
      },
      "314921500": {
        "BLEtimeout": "0.5",
        "iPhoneRefreshDownSecs": 0.0,
        "iPhoneRefreshUpSecs": 720.0,
        "mac": "7C:01:91:BB:E1:13",
        "retryIfUP": false
      },
      "530206011": {
        "BLEtimeout": "0.5",
        "iPhoneRefreshDownSecs": 0.0,
        "iPhoneRefreshUpSecs": 720.0,
        "mac": "E0:DB:10:60:72:3A",
        "retryIfUP": false
      }
    },
    "INPUTgpio-1": {
      "1527957909": [
        {
          "count": "off",
          "gpio": "24",
          "inpType": "low"
        }
      ],
      "1590875007": [
        {
          "count": "off",
          "gpio": "23",
          "inpType": "open"
        }
      ]
    },
    "Wire18B20": {
      "1592397868": {}
    }
  },
  "userIdOfServer": ""

Code: Select all
pi@bluepi:~/wiringPi $ gpio -g readall
 +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+
 | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
 +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
 |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
 |   2 |   8 |   SDA.1 | ALT0 | 1 |  3 || 4  |   |      | 5V      |     |     |
 |   3 |   9 |   SCL.1 | ALT0 | 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 | 1 | OUT  | GPIO. 1 | 1   | 18  |
 |  27 |   2 | GPIO. 2 |  OUT | 1 | 13 || 14 |   |      | 0v      |     |     |
 |  22 |   3 | GPIO. 3 |   IN | 0 | 15 || 16 | 0 | IN   | GPIO. 4 | 4   | 23  |
 |     |     |    3.3v |      |   | 17 || 18 | 1 | OUT  | GPIO. 5 | 5   | 24  |
 |  10 |  12 |    MOSI | ALT0 | 0 | 19 || 20 |   |      | 0v      |     |     |
 |   9 |  13 |    MISO | ALT0 | 0 | 21 || 22 | 0 | IN   | GPIO. 6 | 6   | 25  |
 |  11 |  14 |    SCLK | ALT0 | 0 | 23 || 24 | 1 | OUT  | CE0     | 10  | 8   |
 |     |     |      0v |      |   | 25 || 26 | 1 | OUT  | CE1     | 11  | 7   |
 |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
 |   5 |  21 | GPIO.21 |  OUT | 0 | 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 |
 +-----+-----+---------+------+---+---Pi 2---+---+------+---------+-----+-----+

Posted on
Sat Jul 23, 2016 10:09 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

do you have an output device defined? that can overwrite it

Posted on
Sat Jul 23, 2016 10:21 am
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Re: Small bug with OUTPUT-GPIO-1-Dimmer

I do have an OUTPUT-GPIO-max-4-PINs defined, but I'm not using GPIO24

0:18,1|1:27,1|2:22,1|3:5,1|

Posted on
Sat Jul 23, 2016 10:37 am
Hackencrash offline
User avatar
Posts: 251
Joined: Dec 16, 2015
Location: UK

Re: Small bug with OUTPUT-GPIO-1-Dimmer

The line: 0:18,1|1:27,1|2:22,1|3:5,1| is a cut and paste from the device settings window when I go to edit. I notice that the second parameter in each section (18 27 22 5) appears to correspond to the GPIO number in each case except the first. I have selected INPUT state#0 to be OUTPUT channel: GPIO16 = pin # 12. Notice this is GPIO16 and not GPIO18 as suggested by the number 18 in the above line. Could this be yet another bugette perhaps?

Posted on
Sat Jul 23, 2016 10:53 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: Small bug with OUTPUT-GPIO-1-Dimmer

yes this was a bug in the table, should be correct now:
Code: Select all
allGPIOlist = [
      ["0",  "do not use"]
    , ["2",  "GPIO02 = pin  # 3 -- I2C"]
    , ["3",  "GPIO03 = pin  # 5 -- I2C"]
    , ["4",  "GPIO04 = pin  # 7 -- ONE WIRE"]
    , ["17", "GPIO17 = pin  # 11 -- DHT"]
    , ["27", "GPIO27 = pin  # 13"]
    , ["22", "GPIO22 = pin  # 15"]
    , ["10", "GPIO10 = pin  # 19 -- SPS"]
    , ["9",  "GPIO09 = pin  # 21 -- SPS"]
    , ["11", "GPIO11 = pin  # 23 -- SPS"]
    , ["5",  "GPIO05 = pin  # 29"]
    , ["6",  "GPIO06 = pin  # 31"]
    , ["13", "GPIO13 = pin  # 33"]
    , ["19", "GPIO19 = pin  # 35"]
    , ["26", "GPIO26 = pin  # 37"]
    , ["14", "GPIO14 = pin  # 8  -- TX - REBOOT PIN OUT"]
    , ["15", "GPIO15 = pin  # 10 -- RX - REBOOT PIN IN"]
    , ["18", "GPIO18 = pin  # 12"]
    , ["23", "GPIO23 = pin  # 16"]
    , ["24", "GPIO24 = pin  # 18"]
    , ["25", "GPIO25 = pin  # 22"]
    , ["8",  "GPIO08 = pin  # 24 -- SPS"]
    , ["7",  "GPIO07 = pin  # 26 -- SPS"]
    , ["12", "GPIO12 = pin  # 32"]
    , ["16", "GPIO16 = pin  # 36"]
    , ["20", "GPIO20 = pin  # 38"]
    , ["21", "GPIO21 = pin  # 40"]]


posted 1.22.6 in the download
and the description is state#:GPIO#,config|state#:GPIO#,config...


Karl

Who is online

Users browsing this forum: No registered users and 6 guests