External access to eGeoffrey



  • @eporocrail ok my bad, the mosquitto_sub should be working now. The mosquitto.conf file seems correct apart from "local_password xxxxxx" which should be commented out.



  • @user2684
    mosquito is OK.

    Stopped and started eGeoffrey again.

    pi@raspberrypi:~/egeoffrey $ sudo egeoffrey-cli logs egeoffrey-bridge
    Attaching to egeoffrey_egeoffrey-bridge_1
    egeoffrey-bridge_1 | Generating configuration file...
    egeoffrey-bridge_1 | Starting moquitto...
    egeoffrey-bridge_1 | 1593429692: Warning: Bridge egeoffrey-gateway using insecure mode.
    egeoffrey-bridge_1 | 1593429692: mosquitto version 1.6.9 starting
    egeoffrey-bridge_1 | 1593429692: Config loaded from /mosquitto/config/mosquitto.conf.
    egeoffrey-bridge_1 | 1593429692: Opening ipv4 listen socket on port 1883.
    egeoffrey-bridge_1 | 1593429692: Opening ipv6 listen socket on port 1883.
    egeoffrey-bridge_1 | 1593429692: Opening ipv4 listen socket on port 8883.
    egeoffrey-bridge_1 | 1593429692: Opening ipv6 listen socket on port 8883.
    egeoffrey-bridge_1 | 1593429692: Opening websockets listen socket on port 443.
    egeoffrey-bridge_1 | 1593429692: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593429692: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593429692: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593429698: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593429698: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593429698: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.



  • @eporocrail weird, I need to reproduce it to further debug. Meanwhile let me know if you can access your local instance (house id set to boomhut, no password). Thanks



  • @user2684

    No log-in possibility for the normal website access.



  • Have a look at your .env file, it should contain both:

    EGEOFFREY_GATEWAY_HOSTNAME=egeoffrey-bridge
    EGEOFFREY_ID=boomhut
    

    and not other EGEOFFREY_ directives. If not, fix it, stop and start eGeoffrey. Look at the logs to ensure services are connecting fine to the gateway, then try doing the same via the web interface. I believe I forgot to mention EGEOFFREY_GATEWAY_HOSTNAME in my previous instructions.

    Also consider all of this manual configuration should be handled automatically via the cli.



  • @user2684
    Looks a bit different but still authorisation problem:

    pi@raspberrypi:~/egeoffrey $ sudo egeoffrey-cli logs egeoffrey-bridge
    Attaching to egeoffrey_egeoffrey-bridge_1
    egeoffrey-bridge_1 | Generating configuration file...
    egeoffrey-bridge_1 | Starting moquitto...
    egeoffrey-bridge_1 | 1593433932: Warning: Bridge egeoffrey-gateway using insecure mode.
    egeoffrey-bridge_1 | 1593433932: mosquitto version 1.6.9 starting
    egeoffrey-bridge_1 | 1593433932: Config loaded from /mosquitto/config/mosquitto.conf.
    egeoffrey-bridge_1 | 1593433932: Opening ipv4 listen socket on port 1883.
    egeoffrey-bridge_1 | 1593433932: Opening ipv6 listen socket on port 1883.
    egeoffrey-bridge_1 | 1593433932: Opening ipv4 listen socket on port 8883.
    egeoffrey-bridge_1 | 1593433932: Opening ipv6 listen socket on port 8883.
    egeoffrey-bridge_1 | 1593433932: Opening websockets listen socket on port 443.
    egeoffrey-bridge_1 | 1593433932: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433932: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433932: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433938: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433938: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433938: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433944: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433944: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433944: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433948: New client connected from ::ffff:172.21.0.9 as egeoffrey-boomhut-system-watchdog-egeoffrey-gui-d5cef24021 (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433948: New client connected from ::ffff:172.21.0.3 as egeoffrey-boomhut-system-watchdog-egeoffrey-notification-smtp-2026b9e220 (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433948: New client connected from ::ffff:172.21.0.8 as egeoffrey-boomhut-system-watchdog-egeoffrey-service-mqtt-ff2821532d (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433948: New client connected from ::ffff:172.21.0.2 as egeoffrey-boomhut-system-watchdog-egeoffrey-notification-mobile-fa267c3afd (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433948: New client connected from ::ffff:172.21.0.9 as egeoffrey-boomhut-gui-webserver (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433949: New client connected from ::ffff:172.21.0.5 as egeoffrey-boomhut-system-watchdog-egeoffrey-service-fcc_weather-3dfd189271 (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433949: New client connected from ::ffff:172.21.0.3 as egeoffrey-boomhut-notification-smtp (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433949: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-system-watchdog-egeoffrey-controller-362ba2a576 (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433950: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433950: New client connected from ::ffff:172.21.0.2 as egeoffrey-boomhut-notification-mobile (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433950: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433950: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433951: New client connected from ::ffff:172.21.0.8 as egeoffrey-boomhut-service-mqtt (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433951: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-controller-logger (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433951: New client connected from ::ffff:172.21.0.5 as egeoffrey-boomhut-service-fcc_weather (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433952: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-controller-db (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433952: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-controller-config (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433953: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-controller-alerter (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433953: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-controller-chatbot (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433953: New client connected from ::ffff:172.21.0.7 as egeoffrey-boomhut-controller-hub (p2, c1, k60, u'boomhut').
    egeoffrey-bridge_1 | 1593433956: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433956: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433956: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433962: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433962: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433962: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433968: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433968: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433968: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433974: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433974: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433974: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433980: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433980: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433980: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433986: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433986: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433986: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433992: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433992: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433992: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593433998: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593433998: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593433998: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    egeoffrey-bridge_1 | 1593434004: Connecting bridge egeoffrey-gateway (gateway.egeoffrey.com:8883)
    egeoffrey-bridge_1 | 1593434004: Connection Refused: not authorised
    egeoffrey-bridge_1 | 1593434004: Socket error on client local.egeoffrey-boomhut-system-bridge, disconnecting.
    pi@raspberrypi:~/egeoffrey $



  • Ok this means the modules are now connecting to the local gateway so you should be able to login as well via web (boomhut house id, no passcode) but still not connecting to the bridge (which is something I need to replicate). Thanks



  • @user2684
    Yes, access via webpage is working!



  • Good one! As for the bridge, I replicated exactly your same configuration and it is working fine here 😕 I know it is obvious but would you mind checking if the remote_password in the file data/bridge/config/mosquitto.conf is correct? (including the special characters)



  • @user2684

    My mistake. An error in the password. Now it is working!

    Tomorrow I start with the documentation.

    Thanks.



  • @eporocrail ok let me also know if pointing the mobile app or the web interface to the public gateway you can see your data correctly, even from outside the local network



  • @user2684

    Via webpage no access to gateway.egeoffrey.com:1883 and not too gateway.egeoffrey.com:8883



  • @eporocrail you should be using always port 443 from the web interface since using websockets when connecting to the mqtt broker. Also ensure the SSL checkbox is checked. Thanks!



  • @user2684

    web access: gateway.egeoffrey.com:443 has as result:
    400 Bad Request

    The plain HTTP request was sent to HTTPS port



  • @user2684

    Where the remote access to eGeoffrey is almost working I gave it some thoughts.

    Lets go for a complete setup to manage the house and a second one, the holiday home.

    The aim is to come up with a Howto to create from scratch a system to manage both houses.

    Than we have the simple set-up for one house for most users.
    The more sophisticated version is than available for the "admins".



  • The plain HTTP request was sent to HTTPS port

    Sorry, definitely my bad explanation. What I meant was what to enter when you logout from the web interface or from the same in the mobile app and the login screen shows up. The login screen has the following:

    • Gateway:
    • House:
      • House Id: boomhut
      • Passcode: your password
    • User:
      • Username: admin
      • Password: admin

    Basically from any web interface you can login to any instance of eGeoffrey by providing the right gateway



  • @user2684

    When I access eGeoffrey on my Mac via gateway.egeofrrey.com I see the heartbeat and the pushbutton. Also activity is displayed correctly.

    When I do the same on the smartphone I only have the pushbutton. The heartbeat is not visible. Activity of pushbutton is OK.

    When I go for editing the page the heartbeat is not available?????



  • Cool, it means it working then. As for the heartbeat widget in the mobile app, my bad, the mobile app has not been updated yet with the new gui, this is why it is now showing up correctly. I will publish by tomorrow.

    Out of the manual configuration, do you believe this capability (e.g. access from outside the local network without opening a port in the router or setting up a VPN) may be useful/interesting for a user? The automation piece is pretty demanding (new cli capabilities, a registration page, automatic provisioning etc.) so want to be sure it is worth the time I need to spend to implement it.
    Thanks



  • @user2684

    I think that with a proper Howto the user who has some experience with eGeoffrey can manage to come as far as we are now.

    Maybe one could indeed distinguish between a simple straightforward local installation and the more advanced set-up maybe with two different houses on the mongo db for the experienced admin.

    Give it some thought.



  • @user2684

    And for sure it is worthwile to make it available!

    And I do not think any further automation is required.


Log in to reply