Giter Club home page Giter Club logo

kotlin-homieiot's People

Contributors

boc-tothefuture avatar pavog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

pavog

kotlin-homieiot's Issues

Creating a homie controller

I'm interested in leveraging your library to create a Homie controller library in Kotlin, and I'd like to gauge your interest and hear what you think about the idea, if possible.

My initial thoughts include creating base classes for Device, Node, and Property that can be shared between the (your) Device library and the Controller library. I think it would also make sense to define something similar to your Publishers, but for a controller.

Thanks for your thoughts in advance.

Warnings before connecting

From #2
Question 1: Defining device
When you create Device and add nodes, properties and subscriptions to them you get lot of warnings before connecting:

WARN org.homieiot.mqtt.RootHomiePublisher - Message (true) published on topic (foo/bar/baz/$settable) without connected MqttClient
WARN org.homieiot.mqtt.RootHomiePublisher - Message (baz,bax) published on topic (foo/bar/$properties) without connected MqttClient
WARN org.homieiot.mqtt.RootHomiePublisher - Message (bai,bar) published on topic (foo/$nodes) without connected MqttClient

Warnings and weird things before connecting

Hi,

I have three questions of things:

Question 1: Defining device

When you create Device and add nodes, properties and subscriptions to them you get lot of warnings before connecting:

WARN org.homieiot.mqtt.RootHomiePublisher - Message (true) published on topic (foo/bar/baz/$settable) without connected MqttClient
WARN org.homieiot.mqtt.RootHomiePublisher - Message (baz,bax) published on topic (foo/bar/$properties) without connected MqttClient
WARN org.homieiot.mqtt.RootHomiePublisher - Message (bai,bar) published on topic (foo/$nodes) without connected MqttClient

Question 2: Publishing topics multiple times

Second noticeable thing is that nodes and properties are published one by one (incrementally) e.g. homie/foo/$nodes → "bar" and then homie/foo/$nodes → "bar,baz".

Do you have any plans avoid these warnings and incomplete array values? All topics should be sent during ½ s from connecting, see Timings. I think there should be 3 phases after connecting:

  1. (Define and) publish all topics once.
  2. Publish device state (to ready or alert).
  3. Other topic value updates etc.

Question 3: Best connecting practice

When I connect in main method like client.connect().get() the main thread will continue quite fast to the end of program or System.exit(0). How to wait (forever) and not consuming CPU cycles.

/homie/off/topic

These aren't real problems, just wondering. This repository is young and very good. Thanks!

What is the future of this project?

I'm new to Homie and considering rebuilding my home automation system (for about the 10th time lol) around it. I'm investigating library options and have played around with yours with good results. I see that you haven't touched it in a year and a half, and that it doesn't support Homie 4. Do you have any further plans for this project? Do you ever plan to do a release?

No pressure and no complaint. I'm impressed with what you have done, and I'm just trying to understand what the future might hold, so I can make my decisions accordingly.

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.