Code Monkey home page Code Monkey logo

hodd's People

Contributors

elbowz avatar kinkerl avatar mah1987 avatar qwandor avatar rroemhild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hodd's Issues

Is it supposed to work without SSL?

I have mosquitto running on a raspberry. No user, no pass, no SSL.
Cloned the repository and followed instructions. I only see a white screen with the settings button in the top right corner (tried FF and Chrome on Windows).
The settings are obviously saved, but "connect" doesn't seem to do anything.

Avoid the initial Settings dialog

Hello,

Thank you very much for this helpful little tool! I'm using it successfully to monitor and control my self-made smarthome devices.

A minor annoyance for me is that the Settings dialog comes up each time I open the page on my iPhone, even though I've hard-coded the correct (and only possible settings) directly in the app.js file. Is there a way to bypass that modal dialog and trigger the MQTT connect automatically?

Although I'm not a web developer (just a plain old Java programmer), I've tried to achieve it myself with the following changes:

  1. In app.js I've factored out a doConnect() method from the settingsHandleOK() method so that I can call it without an event argument:
    settingsHandleOK(bvModalEvt) {
      this.doConnect();
    },
    doConnect() {
      BASE_TOPIC = this.topic;
      DISCOVERY_TOPIC = `${this.topic}/+/$homie`;
      connect_to_mqtt(this);
    }
  1. In index.html I've changed the element from "visible" to "invisible":
         <b-modal
            id="modal-settings"
            ref="modal"
            title="MQTT Settings"
            ok-title="Connect"
            @ok="settingsHandleOK"
            @on.keyup.enter="settingsHandleOK"
            auto-focus-button="ok"
            invisible
          >
  1. At the bottom of index.html I've added a small script:
  <script>
    window.onload = function(event) {
      client_status.doConnect();
    };
  </script>

It seems to work almost correctly. The dialog does not appear. MQTT connect does happen. The page is rendered and filled with my devices. The only remaining (blocking) problem is that the window scrollbar does not appear, so that I can't scroll down in long devices.

Do you have some recommendations for me?

Thanks and all the best
/Eike

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.