Announcement

Collapse
No announcement yet.

HS3Touch on Raspberry Pi 3 and Linux...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HS3Touch on Raspberry Pi 3 and Linux...

    For the life of me I can not figure out how to get HS3Touch to run on a Raspberry Pi 3B+ that currently has RaspBain installed on it.

    I looked inside the HSTouch Designer and there I see Two folders for the Client, Windows (which has a file called HS3Touch.exe) and a Linux/Mac folder which also has a file called HS3Touch.exe.

    How do I get the HS3Touch running on my Raspberry Pi.

    I have tried Android on the Raspberry and this will not work with my 22" Touch screen. And I do not want to use Windows 10 IoT because its too slow. So my only options are Linux of some sort.

    This Raspberry Pi 3B+ will "Only" be used for an In Wall Touchpad and nothing more running but the HS3Touch Client.

    Any ideas/Suggestions?

    #2
    I did a full write up on this before the forum blew up/changed a couple of years back and I can no longer find it. So I'll try again now from some old notes I have. This is what I have running today on 4 PI's around the house.

    Installed raspbian image to SD from https://www.raspberrypi.org/downloads/raspbian/

    Booted into Raspbian desktop, enabled WIFi and joined WiFi network, enabled VNC/SSH via Pi/Preferences/Raspberry Pi Configuration 0 then the Interfaces tab (I prefer VNC)

    Before connecting your Pi to the screen, you should first ensure you have updated it to the latest version of Raspbian. In Raspbian, open a terminal window (if you are in Desktop mode) and issue the following commands, one after the other, waiting for the previous one to complete before going onto the next. The first two are really the only ones required, but the other three ensure that your Pi has the latest and greatest version of Raspbian. Answer ‘Y’ to any prompts:

    Code:
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    sudo apt-get install raspberrypi-ui-mods
    sudo apt-get install raspberrypi-net-mods
    From <https://thepihut.com/blogs/raspberry...assembly-guide>

    Now to install mono, open Terminal and run

    Code:
    sudo apt-get install mono-complete
    sudo apt-get install mono-vbnc
    From <https://forums.homeseer.com/showthre...=171511&page=3>

    Add Windows NTFS read/write support to allow Pi to read NTFS drives

    Code:
    sudo apt-get install ntfs-3g
    Copy HSTouch.exe from machine with designer installed to a USB Drive (From C:\Program Files (x86)\HomeSeer HSTouch\Clients\LinuxMac)

    Copy Skins folder and all under it from C:\Users\grtaylor\OneDrive\HomeSeer Stuff\HS Touch\HSTouch to USB (clearly your path will not be the same :-))

    Copy all of those to home/pi/documents/HSTouch on the Pi

    Run the client using mono

    Code:
    mono /home/pi/Documents/HSTouch/HSTouch.exe
    (all case sensitive)

    Click Change Path and navigate to the Skins folder.

    It will timeout, then enter you HS3 or MyHS details and it should connect.

    You can't deploy a project and have it run from HS Designer I've found. Deploy your Pi project, then restart the client/Pi and HSTouch. Then right click on the screen of the empty project, Open... browse to the project XML file. And your project is open. When deploying changes after that, deploy, then restart the client.

    Now to make it useful as a tablet;

    To AutoStart

    Steps from http://www.raspberry-projects.com/pi...g-programs-gui

    To run with a delay before your app launches, instead of adding the path to your app, provide a path to a script we will create:

    Code:
    sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart
    Add the following line to the file

    Code:
    @sh /home/pi/myapp_start.sh
    Exit and save, then create the script file:

    Code:
    sudo nano /home/pi/myapp_start.sh
    Insert the following into the file, setting the delay you want in seconds and the path to your app executable:

    Code:
    #!/usr/bin/sh
    sleep 4
    mono /home/pi/Documents/HSTouch/HSTouch.exe
    Exit and save, then finally make the script executable:

    Code:
    sudo chmod +x /home/pi/myapp_start.sh
    That's it, reboot and your app should launch after the delay period

    From <http://www.raspberry-projects.com/pi...g-programs-gui>

    Install screensaver (I'm not sure on my own steps here, so our mileage may vary)

    Code:
    sudo apt-get install xscreensaver
    Then in the GUI go to Preferences > Screensaver > Select disable screen saver from the dropdown.

    From <http://www.raspberry-projects.com/pi...an/screensaver>

    Connect touchscreen - I use the official 7" touchscreen. It needs to be rotated 180deg in software.

    Code:
    sudo nano /boot/config.txt
    Add new line

    Code:
    lcd_rotate=2
    From <https://www.raspberrypi.org/forums/v...c.php?t=121263>

    Save and Exit. Reboot

    In HS Touch client, right click choose to hide pointer from options. Doesn't seem to work. Surprise surprise

    Now to hide the mouse pointer

    https://raspberrypi.stackexchange.co...cursor-on-lxde

    Code:
    sudo nano /etc/lightdm/lightdm.conf
    Find the xserver-command=X line in the Seat section, add -nocursor

    Reboot

    Some very useful stuff here - https://forums.pimoroni.com/t/offici...screen-faq/959

    To change screen brightness

    Code:
    sudo nano  /sys/class/backlight/rpi_backlight/brightness
    Edit value - 0 - 255. Default 255, max on. Save and close.

    Hope that helps.

    Greg





    Comment


      #3
      Thanks, I will give that a try. The last time I did "most of what you suggested above" I still got the HSButton(0) and Label Reference Errors when using the HSTouch.exe for Linux.

      Comment


        #4
        Yup, same errors as before using the Linux version of HSTouch.exe and the latest Raspbain…. The Default (Blue) Skin even gives the Errors I have been getting no matter what Skin I use nor how many times I reinstall the Linux Version. None of these errors happen on Windows or Andriod or Apple versions.

        Error in HSButton (0). drawing label button: Object reference not set to an instance of an object.
        Below are the versions currently installed on this Raspberry Pi 4:
        Raspbain 10 (buster)
        Mono JIT Version: 5.18.0.240

        Comment


          #5
          I just updated Mono just to see if it was an old version or something (even though it was the latest available without manually adding the mono repository).

          Now Mono JIT version is: 6.8.0.105

          And still the same exact errors about HSButton (0)…...

          Comment


            #6
            Can you deploy a blank project? I don't use the default project/skin at all. It's ugly. There are functional limitations with HST on Pi - status graphics don't work for example. So if the default project has those, it won't work, and that could be it.

            My client version is 3.0.0.54 - What version do you have?

            I have created projects from scratch for lights, music, alarms etc. I use Pi's in bedrooms only. Simple UI

            Click image for larger version

Name:	Guest Room Pi Home.png
Views:	522
Size:	90.0 KB
ID:	1384892

            Comment


              #7
              I have tried several different projects all give the same error if there is even one button or even just a Text label. If there are no buttons or labels, then no errors but then there is nothing to display anyways LOL.

              I just created a clean project with only 1 Button and I get the same error when I load it and try and open it on the HSTouch. Same if I create just a clean project with just 1 Label. If its just a clear project without a Button or Label and lets say Only an Image, I do not get the error. But as soon as I add a button or Label.... I get that HSButton Error for every button/Label that is on the screen at the time.

              I am using the HSTouch Linux version 3.0.0.54 as well.

              Comment


                #8
                You did copy over the entire Skins folder and everything under it?

                Click image for larger version  Name:	Skins.png Views:	0 Size:	383.1 KB ID:	1384951

                Comment


                  #9
                  Yup

                  Comment


                    #10
                    I'm using an old build of Raspbian and Mono, I have not updated them in well over a year (if it ain't broke...) - I might try and follow my steps one more time, see what happens this time. Perhaps a change crept in to one of those. I'll try that and let you know.

                    Comment


                      #11
                      Thanks

                      Comment


                        #12
                        Well that sucks doesn't it. Clearly something changed. I see the same issues as you do now.

                        Mono JIT 4.6.2
                        Raspbian 9 (stretch)

                        That works for me. I'm leaving it there therefore.

                        Comment


                          #13
                          I'll try and install those versions if I can find them online and see if that works for me.

                          Comment


                            #14
                            I just installed Raspbain 9 Stretch and Mono 4.6.2.

                            Same errors..... There has to be something that needs to be installed on a default Raspbain or step that's getting missed somehow or the "latest" mono-complete or mono-vbnc has a bug in it somewhere... I really have no idea though.

                            I've tried so many things.

                            Installing Fresh versions of: Raspbain 9 and 10, Ubuntu 18.4
                            Installed different versions of Mono (4, 6, 8....)
                            Different hardware (Raspberry Pi 3b+ and Raspberry Pi 4)
                            Different SD Sticks and even USB Drives as the Raspberry Pi Drives
                            Manually copying over the Skins Folder
                            Numerous HSTouch projects, to include blank ones with just a single Button or Label.

                            Comment


                              #15
                              I did have a support case going at the time with Rich at HS, paid support. That thread has now been deleted so I can't see if we discussed this. And I can't find my old thread on the forum here which had all the steps I used. :-(

                              Comment

                              Working...
                              X