Install GLADYS 2 on the raspberry for testing

Hello,
A quick question about testing: I don’t want to test Gladys on my computer for space reasons and to get as close as possible, so directly on the RPI3.

I’m just starting to test the Arduino module. I’ve (roughly) understood the clone and install steps.

My question 1: Can we put 2 Gladys on the Raspberry SD card, knowing that I have all my setups on my personal GLADYS and I want to work in parallel on the fork with the Arduino module.

My question 2: It was really practical to import and test a module in your personal environment, you just had to import a folder. Isn’t there a way to not have several complete versions of gladys by piece developed? It’s a lot of versions in the end I’m not even sure I have the official one (gladys-4-playground?).

I might still need a bit of advice to understand how everything works.

Last question while I’m at it: if someone wants Gladys modules or really very specific programs for themselves (for example, I would like to run programs like a music player, install everything we do on the RPI these days, Plex, smart mirror, etc.) how do we integrate them?

Thanks,

Hello,

In my opinion, the easiest way to run multiple Gladys instances on your Pi is to use Docker images in a docker-compose file. You just need to declare different folders for the mounted volume and change the shared port. Here is an example:

version: '3.3'
services:
  gladys:
    image: gladysassistant/gladys:4.0.0-beta-arm
    restart: always
    privileged: true
    network: host
    environment:
      NODE_ENV: production
      SQLITE_FILE_PATH: /var/lib/gladysassistant/gladys-production.db
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/lib/gladysassistant:/var/lib/gladysassistant
      - /dev:/dev
    ports:
      - '80:1443'
      - '443:1443'
  gladysrflink:
    image: 'pebou/gladys:4.0.0-beta-integration-rflink-arm'
    restart: always
    privileged: true
    network_mode: host
    container_name: gladys-rflink
    environment:
      NODE_ENV: production
      TZ: Europe/Paris
      SQLITE_FILE_PATH: /var/lib/gladysassistant-rflink/gladys-production.db
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'
      - '/var/lib/gladysassistant:/var/lib/gladysassistant'
      - '/dev:/dev'
    ports:
      - '30080:1443'
      - '30443:1443'
  watchtower:
    image: containrrr/watchtower:armhf-latest
    restart: always
    container_name: watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

Thank you, my 64GB card is full of Gladys… I’m surprised. I don’t know where to start over.

If you have a lot of unused images, I invite you to run a quick:

docker system prune

To remove unused images/containers. This should free up some space.

Documentation:

Also, you mention « gladys-4-playground », that’s very old, back when Gladys 4 was not in alpha.

If you are on an old Raspbian Gladys image, start over with the new Raspbian image (A privacy-first, open-source home assistant | Gladys Assistant)

Where if you want I need feedback on this topic https://community.gladysassistant.com/t/test-image-raspbian-beta

Ok so to summarize:

I re-flash Gladys with the latest image on my SD card. (I have the tasmota module inside I think I have the right version but since I don’t know what to delete I have to start from there)
I install docker
I install the Gladys version I want to test with docker (the one with the 433 module)
then I imagine I can’t modify anything, just test.
I’d be happy to provide feedback on https://community.gladysassistant.com/t/test-image-raspbian-beta but it’s too vague it will take me a week just to install the mess. :slight_smile: I’ll go take my developer’s master and I’ll be back!

The image already contains Gladys and docker, you have nothing to do.

The link I gave you is a new Raspbian image, either you use the official one, or the one in the topic I gave you.

In both cases, you just have to flash the image.

Edit to test another docker image, you just have to create another docker container, for example for the 433 (RFLink?)

docker run -d \
--restart=always \
--privileged \
--network=host \
--name gladysrflink \
-e NODE_ENV=production \
-e SERVER_PORT=8040 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-rflink.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
pebou/gladys:4.0.0-beta-integration-rflink

And you will have access on port 8040

Very well. However, it’s not RFLINK, it’s Arduino 433. from @billona

So this: Images 🐳 pour tester des services en développement
pebou/gladys - Docker Image

I tried something but it doesn’t work.

gladys@raspberrypi:~ $ docker run -d \

–restart=always \
–privileged \
–network=host \
–name gladysarduino \
-e NODE_ENV=production \
-e SERVER_PORT=8040 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-arduino.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
pebou/4.0.0-beta-integration-arduino
Unable to find image ‹ pebou/4.0.0-beta-integration-arduino:latest › locally
docker: Error response from daemon: pull access denied for pebou/4.0.0-beta-integration-arduino, repository does not exist or may require ‹ docker login ›: denied: requested access to the resource is denied.
See ‹ docker run --help ›.

The name of the Docker image you provided is not correct, it’s pebou/gladys:4.0.0-beta-integration-arduino

It seems obvious, can you put the complete code that I need to send? I’ve made a lot of replacements and combinations, it doesn’t work.

@VonOx gladys with the automatic build is functional. Do I need to check something in particular?

You’re talking about this Raspbian image? => [TEST] Image Raspbian Beta

I managed to pull the image from @peb

docker pull pebou/gladys:4.0.0-beta-integration-arduino
4.0.0-beta-integration-arduino: Pulling from pebou/gladys
cbdbe7a5bc2a: Already exists
8f3938f7d3bd: Already exists
6e3c12f5dc10: Already exists
ce0cb7a9eeee: Already exists
59f74697acb6: Pull complete
361a7ffc3fa4: Pull complete
39c031af9eb6: Pull complete
468a5a64d661: Pull complete
3ea6567c65ec: Pull complete
cab474f2725a: Pull complete
Digest: sha256:ddcdda51ef26b60e6838df0e488a72f692406de9f13516ceafddfd0a2b478600
Status: Downloaded newer image for pebou/gladys:4.0.0-beta-integration-arduino
docker.io/pebou/gladys:4.0.0-beta-integration-arduino

To create the container, this should work

docker run -d \
--restart=always \
--privileged \
--network=host \
--name gladysarduino \
-e NODE_ENV=production \
-e SERVER_PORT=8040 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-arduino.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant:/var/lib/gladysassistant \
-v /dev:/dev \
 pebou/gladys:4.0.0-beta-integration-arduino

Yes, that’s it.

It seems to work! However, on port 8040, I then get the RFLINK version that was previously installed.
I created a docker-compose file, but the folders in SSH do not seem to allow writing.