Jump to content

BamBamF16

Members
  • Posts

    350
  • Joined

  • Last visited

Posts posted by BamBamF16

  1. @garybixler,

    I have found that, after the reboot, most of the time it does not run installconsole.sh.  I usually have to manually run that the same way I did the pisetup.sh.  It will ask some of the same questions, but then I am able to start the service using sudo systemctl start softconsole.  If installconsole.sh is still in /boot (or maybe pi home directory) then it didn't run.  If it isn't there but rather ~/consoleinstallleftovers then it did run and something else is probably wrong.

    Jeff

  2. Kevin,

    Ok, you broached it.  Here are 3 use cases I wonder if are currently possible:

    1.  A Keypad that opens a screen. that isn't in a chain.  Button turns on/off Fan-Medium scene.  Doube tap = go to fan speed selection screen

    2.  A burron that increments a variable +1 each press.  That variable tells the therrmostats to temporaily drop the ac by 2 degrees.  vaiable decrements each hour (in ISY). and the button on SC reflects the current hours left

    3.  Seasonal screens / buttons.  I have 2 keypad buttons that turn on holiday lights.  Only needed 1 Dec - 1 Jan.

    What do you think?

    Also, can you use the same ISY device in multiple places?  I tried and it erred out but my formatting was probably off.  Also, during the console load it report it fails loading some scene components, namely Hue bridge items.  What is the implication to the console?  WIll i be able use these scenes?

    One more thing since we took out dimming, the screen never goes blank (powersave, or whatever).  Should it still go blank at some point?

    Jeff

    PS - Setting the dimming mode to PWM doesn't err out but it also doesn't dim the screen. 

  3. Applying the scaling seems to have nailed it.  It's close enough for governement work.

    I'll give you a break but then I have many more ?'s about configurations and possibilities.


    Oh and it auto starts now.

    Thanks again!  If I ever overnight in PDX I'll buy you a beer. or 12, whatever.

    Jeff

  4. @kck

    Attached is the /boot/config.txt.  This file is modified during driver install.  The drivers are from: https://github.com/pimoroni/hyperpixel4

    In the vertical I am concerned because the top of the button appears to be correct.  But the Time/Date navigation buttons work about 1/2 way down the screen.  So it is scrunched moreso than offset.  Does that make sense?

    Jeff

    config.txt

  5. 7 minutes ago, kck said:

    You need to fix the typo in touchdefinitions - the capital is missing there and that is what is being looked at.

    Also, capacitive was misspelled.  However, the console runs and makes the test button.  And it turns stuff off.  But the touch is off by quite a bit now.  Worse than prior.  The bottom 1/3 is shifted up.  And everything is shifted right a little bit.

    But progress!  Thank you so much. 

    Jeff

    Actually it appears the vertical is squished into the top 1/2 maybe

     

  6. Just now, kck said:

    Darn capitals.  The error is in the touchdefinitions file.  The instance in touchhandler isn't used any more - I should delete that but hadn't spent much time cleaning up old stuff.

    When I fixed the location in touchhandler.py I got the error in the spot is posted above.

  7. @kck,

    FYI there are spelling errors in line 124 of touchhandler.py.  Should read 'Goodix Capacitive TouchScreen'

    It erred again, looks like the spelling in the touchhandler.py is used elsewhere and is incorrect.  I'm not sure where that spelling error is, but here is the log:

    pi@SoftConsoleTest:~/consolebeta $ sudo python -u console.py
    06-28-19 21:56:30 Console ( 1866) starting in /home/pi/consolebeta
    {'28r': ['/dev/fb1', 'fbcon', 'PWM'], '35r': ['/dev/fb1', 'fbcon', 'PWM'], 'pi7': ['/dev/fb0', 'fbcon', 'Pi7'], 'Name ': [' Device Path ', ' Driver ', ' DimType'], 'pimoroni4': ['/dev/fb0', 'fbcon', 'None'], '28c': ['/dev/fb1', 'fbcon', 'PWM']}
    Screen: pimoroni4  Device: /dev/fb0 Driver: fbcon Dim: None
    {'generic ft5x06 (11)': ['True', '0', '0', '0', '0', '1.0', '1.0'], 'FT5406 memory based driver': ['True', '0', '0', '0', '0', '1.0', '1.0'], 'stmpe-ts': ['False', '0', '0', '0', '0', '1.0', '1.0'], 'Goodix Capactivie Touchscreen': ['True', '-324', '303', '0', '0', '1.0', '1.0'], 'ControllerName': ['cap(True/False)', 'shiftx', 'shifty', 'flipx', 'flipy', 'scalex', 'scaley'], 'EP0110M09': ['True', '0', '0', '0', '0', '1.0', '1.0']}
    Traceback (most recent call last):
      File "console.py", line 148, in <module>
        utilities.InitializeEnvironment()
      File "/home/pi/consolebeta/utilities.py", line 107, in InitializeEnvironment
        ts = Touchscreen()
      File "/home/pi/consolebeta/touchhandler.py", line 151, in __init__
        self._f_device = io.open(self._touch_device(), 'rb', self.EVENT_SIZE)
      File "/home/pi/consolebeta/touchhandler.py", line 305, in _touch_device
        raise RuntimeError('Unable to locate touchscreen device')
    RuntimeError: Unable to locate touchscreen device
    06-28-19 21:56:30 Exiting with history trace (0)
    1879(1561776991.5578496): Logger loop ended

  8. @kck,

    So, completed all of the directions.  Using the systemctl it shows as started but nothing happens.  Here is the log:

    pi@SoftConsoleTest:~ $ systemctl status softconsole
    ● softconsole.service - SoftConsole
       Loaded: loaded (/usr/lib/systemd/system/softconsole.service; disabled; vendor preset: enabled)
       Active: active (running) since Fri 2019-06-28 21:36:40 CDT; 10s ago
      Process: 1277 ExecStart=/home/pi/consolestable/runconsole.py (code=exited, status=0/SUCCESS)
      Process: 1274 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
     Main PID: 1278 (python3)
       CGroup: /system.slice/softconsole.service
               └─1278 python3 console.py

    Jun 28 21:36:34 SoftConsoleTest systemd[1]: Starting SoftConsole...
    Jun 28 21:36:40 SoftConsoleTest softconsole[1277]: Starting using directory: consolebeta
    Jun 28 21:36:40 SoftConsoleTest systemd[1]: Started SoftConsole.

    This is the error when I sudo python -u console.py in the beta directory:

    06-28-19 21:31:44 Console ( 1093) starting in /home/pi/consolebeta
    {'28c': ['/dev/fb1', 'fbcon', 'PWM'], 'pimoroni4': ['/dev/fb0/fbcon/None'], '35r': ['/dev/fb1', 'fbcon', 'PWM'], 'Name ': [' Device Path ', ' Driver ', ' DimType'], '28r': ['/dev/fb1', 'fbcon', 'PWM'], 'pi7': ['/dev/fb0', 'fbcon', 'Pi7']}
    Traceback (most recent call last):
      File "console.py", line 148, in <module>
        utilities.InitializeEnvironment()
      File "/home/pi/consolebeta/utilities.py", line 100, in InitializeEnvironment
        hw.initOS(scrntyp)
      File "/home/pi/consolebeta/hw.py", line 104, in initOS
        if screendefs[screentype][1] != 'XWin':
    IndexError: list index out of range
    06-28-19 21:31:44 Exiting with history trace (0)
    1108(1561775505.9202983): Logger loop ended

  9. @kck

    I don't think I did anything to runconsole.py.  I just did a git pull.

    I got the console to run via SSH and via VNC to the running desktop (5900).  If I execute via VNC (5901) then it doesn't start reliably.

    However, now nothing happens no matter what.  When I run "sudo python -u console.py" nothing happens at all from anywhere.  One of the changes we made borked something.

    Jeff

     

  10. @kck

    I am running it in landscape. 
     

    Here is the systemctl status after eliminating one of the execstarts:

    softconsole.service - SoftConsole
       Loaded: loaded (/usr/lib/systemd/system/softconsole.service; enabled; vendor preset: enabled)
       Active: activating (start-pre) since Thu 2019-06-27 22:56:51 CDT; 1s ago
      Process: 528 ExecStart=/usr/bin/python3 /home/pi/consolestable/runconsole.py (code=exited, status=0/SUCCESS)
    Cntrl PID: 560 (sleep)
       CGroup: /system.slice/softconsole.service
               └─control
                 └─560 /bin/sleep 5

    Jun 27 22:56:51 SoftConsoleTest systemd[1]: Starting SoftConsole...
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~
    ~


    Jeff

  11. @kck

    I am attaching a text file with the results of my touch test.  I did several runs.  The final run is labeled with each corner (UL, UR, LL, LR).  Thanks again.  I think you are close!

    Here is the latest systemctl status softconsole:

    ● softconsole.service - SoftConsole
       Loaded: loaded (/usr/lib/systemd/system/softconsole.service; enabled; vendor preset: enabled)
       Active: activating (start-pre) since Thu 2019-06-27 19:52:58 CDT; 4s ago
      Process: 895 ExecStart=/usr/bin/python3 ExecStart=/home/pi/consolestable/runconsole.py (code=exited, status=2)
    Cntrl PID: 899 (sleep)
       CGroup: /system.slice/softconsole.service
               └─control
                 └─899 /bin/sleep 5

    Jun 27 19:52:58 SoftConsoleTest systemd[1]: Starting SoftConsole...

     

    Jeff

    Hyperpixel 4.0 Touch Window Values.rtf

  12. @kck

    This is the systemctl status info for softconsole:

    ● softconsole.service - SoftConsole
       Loaded: loaded (/usr/lib/systemd/system/softconsole.service; enabled; vendor preset: enabled)
       Active: activating (auto-restart) (Result: exit-code) since Thu 2019-06-27 16:19:28 CDT; 2s ago
      Process: 1328 ExecStart=/home/pi/consolestable/runconsole.py (code=exited, status=203/EXEC)
      Process: 1327 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)

    Jun 27 16:19:28 SoftConsoleTest systemd[1]: softconsole.service: Unit entered failed state.
    Jun 27 16:19:28 SoftConsoleTest systemd[1]: softconsole.service: Failed with result 'exit-code'.

    I get the following error with the testtouchhandler.py:

    pi@SoftConsoleTest:~/consolestable $ sudo python -u testtouchhandler.py
    open /dev/fb1: No such file or directory
    Starting touch hw search
    /sys/class/input/event0
    Touch device: Goodix Capacitive TouchScreen
    Traceback (most recent call last):
      File "testtouchhandler.py", line 293, in <module>
        ts = Touchscreen()
      File "testtouchhandler.py", line 138, in __init__
        self._f_device = io.open(self._touch_device(), 'rb', self.EVENT_SIZE)
      File "testtouchhandler.py", line 273, in _touch_device
        raise RuntimeError('Unable to locate touchscreen device')
    RuntimeError: Unable to locate touchscreen device

    Thanks you for taking the time to help me.  While I am proficient in old, crappy programming languages (VisualBasic) I am not learned on anything newer.  Where would be a good place to start learning python, javascript, or anything new?

    Jeff

  13. @kck

    As a bit more data, there were errors with the latest stretch on X.  The calibration was way off.  I solved the issue by adding the following to /etc/X11/xorg.conf.d/99-calibration.conf:

    Section "InputClass"
            Identifier      "calibration"
            MatchProduct    "Goodix Capacitive TouchScreen"
            Option  "TransformationMatrix"  "1.69 0 -0.68 0 0.63 0.38 0 0 1"
    EndSection

    Don't know if that means anything to you or could help.

  14. @kck

    Ok, I'm an idiot.  Stupid capitalization error.  On line 122 I didn't capitalize the S in TouchScreen.  Now I have a functioning console.  However, the right call it 1/4 to 1/5 of the screen isn't responsive to touch.  Looks like the calibration is a slightly off.  Also, left of the test button still activates the button, even though it shouldn't.  Possibly the touchscreen is "shifted" left relative to the image by actually about 1/8 of the width of the screen.

    Jeff

  15. @kck

    Made the change to 'pass'. This led to the following error:

    06-26-19 21:36:18 Console ( 2130) starting in /home/pi/consolestable
    Traceback (most recent call last):
      File "console.py", line 143, in <module>
        utilities.InitializeEnvironment()
      File "/home/pi/consolestable/utilities.py", line 105, in InitializeEnvironment
        ts = Touchscreen()
      File "/home/pi/consolestable/touchhandler.py", line 137, in __init__
        self._f_device = io.open(self._touch_device(), 'rb', self.EVENT_SIZE)
      File "/home/pi/consolestable/touchhandler.py", line 270, in _touch_device
        raise RuntimeError('Unable to locate touchscreen device')
    RuntimeError: Unable to locate touchscreen device
    06-26-19 21:36:18 Exiting with history trace (0)
    mvtops exception: [Errno 2] No such file or directory: '/Current/'
    2192(1561602979.6633866): Logger loop ended

     

    I am attaching one of the log files.  looks a lot like the "Exiting with history trace" line.

    0-06-25-19 22:38:02

  16. 4 hours ago, kck said:

    OK - Custom definitely won't work.  I think pi7 should - you can check by editing the file in your home directory ".Screentype" to be "pi7" instead of custom.  That should solve the output side of things (i.e., the can't find fb1 stuff).  Editing that will avoid rerunning the install script.  (By the way, the installconsole.sh is left in a directory of your home directory called consoleinstallleftovers).  The issue wilh touch is that outside of the console you are running via an Xserver.  The console does direct control of the screen and touch and so isn't using the correct driver info given the different name.  If you are willing to try editing one source file we can see if the simple fix will sort this out.  If not, I'll generate a beta release for you - just slower and you need to download a bunch to go that route.  You will want to go into the consolestable directory and find the file touchhandler.py.  Line 122 of that file defines TOUCHSCREEN_EVDEV_NAME.  You want to edit this so that the string is 'Goodix Capactivie Touchscreen' instead of the 'FT5406 memory based driver'.  I hope that this will let the console fine the touch events for your screen.  If it does, then the only other issue may be the relative orientation of the touch event coordinates versus the actual screen.  I.e., does where you touch correspond to the button drawn under the touch.  It is possible that it might be flipped horizontally or vertically and I'd need to account for that.  If you can try this and let me know what you see that would be easiest.  If you're uncomfortable with editing that py file I can generate a full beta with that change instead.  Once I know what works I can incorporate a permanent change in a next release.

    Kevin

    Kevin,

    I edited the files as directed above (I think I got them correct).  I added them below for review.  However, I get a catastrophic failure and console doesn't launch.  See error:

    06-26-19 20:07:00 Console ( 16716) starting in /home/pi/consolestable
    OSError: [Errno 22] Invalid argument

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "console.py", line 143, in <module>
        utilities.InitializeEnvironment()
      File "/home/pi/consolestable/utilities.py", line 98, in InitializeEnvironment
        hw.initOS(scrntyp)
      File "/home/pi/consolestable/hw.py", line 139, in initOS
        GoBright(100)
      File "/home/pi/consolestable/hw.py", line 56, in GoBright
        GoDimPi7(level)
      File "/home/pi/consolestable/hw.py", line 148, in GoDimPi7
        f.write(str(level * 255 // 100))
    OSError: [Errno 22] Invalid argument
    06-26-19 20:07:00 Exiting with history trace (0)
    mvtops exception: [Errno 2] No such file or directory: '/Current/'

    16756(1561597621.5156422): Logger loop ended

     

    Also, what are all of the files in consolestable labeled with date/time.  There are about a thousand of them now and it is making it difficult to "ls" in that directory.

     

    Thanks for all your help!

    Jeff

    touchhandler.py .Screentype

×
×
  • Create New...