Coder Social home page Coder Social logo

mqtt-smarthome-system's People

Contributors

lyuzashi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

mqtt-smarthome-system's Issues

Handle MIDI as transient devices

Wrap MIDI interface into a module which will occasionally/on trigger search for new matching devices and gracefully handle disconnects.

It should be able to detach and reconnect to devices when unplugged or plugged in and when config changes to specify new devices/config.

MQTT Message typing

MQTT messages are all sent as strings.

Sensible assumptions could be made in this order

  1. "true" or "false" – boolean
  2. "0" or "1" for */on topic – boolean
  3. anything for */text topic – string
  4. numerical – integer
  5. anything else – string

Particular topics could have overriding rules for special cases.

Write a function to handle all these for unmarshalling a message.

Expose some configuration via MQTT

Compose configuration into MQTT topics.

Requires handling of arrays and tool to rebuild config object in memory.

Discover tree structure by subscribing to a * topic and getting all messages under it?

e.g.

interfaces:
  lattice:
    modes:
      lighting:
        zones:
         - name: lounge

interfaces/lattice/modes/lighting/zones/0/name : lounge

PiGPIO integration and discovery

Provide interface for devices via PiGPIO.

  • Discover nodes via mDNS
  • Handle like pins in current GPIO module
  • Expand support for
    • bit bang serial devices
    • 1-wire LEDs
    • SPI (stretch)

Rebuild local GPIO to connect via PiGPIO too.

Rate limit Hue interface more logically

Rather than the current setup which limits hue API calls to one in-flight at a time, use throttling to allow many requests up to a certain rate to be sent.

https://developers.meethue.com/develop/application-design-guidance/hue-system-performance/

The available system throughput (from the hue API) is thus restricted by the number of ZigBee messages per second that can be handled by the system, which is approximately 25 ZigBee messages/s

#ZigBee messages per hue API command Parameters used in body of hue API command (example) System throughput Time between hue API messages
1 setting brightness brightness 40 ms
1 setting brightness+color 25 hue API commands/s 80 ms
3 setting brightness + color+on 2 hue API commands/s 120 ms
Parameters used in body of hue API command #ZigBee messages
bri 1
hue 1
sat 1
xy 1
ct 1
on 1
transitiontime 0
bri + xy 2
bri + xy + on 3
bri + hue 2
bri + sat 2
bri + hue + sat 2
bri + hue + sat + on 3
bri + ct 2
bri + ct + on 3

Scene system

Configuration for scenes which may have names or be part of a sequence.

Sequencing provides time stamp sets of scenes and start from 0 when triggered

Add MQTT permissions layer

Provide authentication scheme for accessing MQTT topics

Simple IoT devices can provide a username:password and will have limited access to particular topics.

Access control can be described in #17

Describe devices in universal language

Every device should belong to an universal graph including protocol specific interfaces and generic attribute language.

This could be the presence of a device by MAC address on the IP network, a ZigBee lightbulb with all attributes and multiple protocol support or a local input device.

Provide some way to generate or template these so new devices can be added easily. A config screen?

USB/IP discovery via Linux

Simple discover/attach loop to find network devices and attach them via USB/IP when a remote computer is publishing an advertisement.

Publish state of MIDI devices to MQTT

Provide status of banks and key presses over MQTT.
This can be used to display an interface for controlling in different modes, e.g. Lighting bank selected, show master brightness, channel names and modifier hints

Manage Hue Transitions

While running long transitions, it should be possible to calculate the current state by extrapolating the less granular changes observed.

These should then have the capability to be overrode, such as turning off lights when leaving during a sunset event

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.