Web-based editor

Hi, Yesterday I had the editor working, I restarted the Pi and left the editor stopped working.

I put the command again and gives me error, any of you know how to fix it?

The error is as follows:

$ sudo docker run -d -p 3000:3000 —mount type=bind,source="$(pwd)"/,target=/
usr/src/app/configFolder voxic/ha-editor
docker: invalid reference format.
See ‘docker run --help’.

Thanks

When I proxy ha-editor I just get this:

Which settings for nginx in the location part do u use guys?

Thanks for this. I was going to use the hass-configurator but I don’t care for Ace editor and it wasn’t “just working” for me.

I found your docker image but it didn’t work on x86 (I guess you’re assuming arm?). I saw the ubuntu18.04 tag, though, and that works fine.

Here’s a docker-compose.yml for anyone in need:

version: '2.2'
services:
  hass:
    image: homeassistant/home-assistant
    network_mode: host
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - ./hass_config:/config
    restart: always

  ha-editor:
    image: voxic/ha-editor:ubuntu18.04
    network_mode: host
    volumes:
      - ./hass_config:/usr/src/app/configFolder
    restart: always

A simple docker-compose up -d gets you hass and the editor. Just need to add the panel if you want the editor to show up in the menu.

Thanks! Haven’t done much work with Docker.

Had same problem here behind Traefik, local on port 3000 its working great. Found out it works with an subdomain, but not as subfolder.

Fixed, It works like www.domain.com/editor/

hi @voxic Can I install the web-based editor on my raspberry pi without installing docker?

Yes, check the GitHub page for installation

Perfect just installed it using node.

I have 2 issues:

1). I am accessing HA via https and ssl and I have forwarded port 3000. I can access the web-based editor if I was to open port 3000 on a webpage but on HA I see a white blank page. Is it possible to access the web-based editor on HA using https?

2). How can I run the ha-editor from scratch ? i.e when I restart my raspberry pi I have to manually:
cd ha-editor node app.js

Is there anyway to get this running from boot?

Many thanks for your help.

Hi @ViperRNMC

If you don’t mind me asking how did you get the Editor to come up in the iFrame as mine just come up blank.
I have it working locally in a browser. I am using Docker on a Ubuntu 18.04 NUC behind Traefik.

In docker-compose.yaml

ha-editor:
    image: voxic/ha-editor:ubuntu18.04
    network_mode: host
    volumes:
      - ./hass_config:/usr/src/app/configFolder
    restart: always

In HA Config i have.

 panel_iframe:
  editor:
    title: 'Editor'
    url: 'http://192.168.85.5:3000' #IP to your home assistant
    icon: mdi:book-open

Thanks

I have this

docker-compose.yaml:

ha-editor:
    image: voxic/ha-editor:latest
    container_name: editor
    volumes:
    - ./hass_config:/usr/src/app/configFolder
    restart: always
    networks:
    - proxy
   labels:
    - traefik.enable=true
    - traefik.backend=ace
    - traefik.frontend.rule=PathPrefixStrip:/editor
    - traefik.port=3000
    - traefik.docker.network=proxy
    - traefik.frontend.headers.SSLRedirect=true
    - traefik.frontend.headers.STSSeconds=315360000
    - traefik.frontend.headers.browserXSSFilter=true
    - traefik.frontend.headers.contentTypeNosniff=true
    - traefik.frontend.headers.forceSTSHeader=true
    - traefik.frontend.headers.STSPreload=true
    - traefik.frontend.auth.basic.usersFile=./shared/.htpasswd

configuration.yaml:

panel_iframe:
  editor:
    title: Editor
    url: 'http://domain.com/editor/    <--close with /
    icon: mdi:book-open

I’m switch now to the other hass configurator, because it hass more options like folding pieces of code, themes and it works better on my :iphone:.
https://www.home-assistant.io/docs/ecosystem/hass-configurator/#configuration-ui-for-home-assistant

Thanks i will try it out this weekend.

Is this a file you have made or is it the password for HA?

- traefik.frontend.auth.basic.usersFile=./shared/.htpasswd

i made it to protect the editor, it’s not from hass

Hello,
I would to use this container, but when I do a “dock run”, I had this message : standard_init_linux.go:211: exec user process caused "exec format error"

This is my command line :

docker run -d -p 3000:3000 -v /etc/docker/config/ha:/usr/src/app/configFolder voxic/ha-editor

Do you know why ?

Hi

This error seems to be related to the architecture you are trying to run the image on.

That error usually means you’re trying to run this amd64 image on a non-amd64 host (such as 32-bit or ARM).

On what kind of system are you trying to run the image?

Hello, thank you for your answer.

It’s right, I work on Debian buster amd64 and docker…

Is ha-editor work only on 32 bits platform ?

You need to rebuild the docker image for your architecture. Everything you need is in the repo.

I’m alone in this case ? I’m astonished.

I never build docker image… but I am correctly understand, I use your dockerfile to build my own “ha-editor” and that all ?
Do you know if I have to modify other files ?

Thanks for your returns.

Hello. How are you? Were you able to move forward with the editor?

Hey Pablo, I’m fine thanks. This project became redundant when the Visual Studio Addon was released. I suggest you use that one instead.

Oh, okay. Thank you very much for your contribution