<commit_before>hue2mqtt
========

  Written and (C) 2015 <NAME> <<EMAIL>> 
  
  Provided under the terms of the MIT license.


Overview
--------
Gateway between a Philips Hue bridge and MQTT

It is intended as a building block in heterogenous smart home environments where 
an MQTT message broker is used as the centralized message bus.
See https://github.com/mqtt-smarthome for a rationale and architectural overview.

hm2mqtt communicates with Homematic using the documented XML-RPC API
and thus requires either an CCU1/CCU2 or a Homematic configuration adapter with
the XML-RPC service running on a host (currently Windows-only). It is _not_
able to talk directly to Homematic devices using 3rd party hardware like a CUL.



Topic structure
===============
hue2mqtt follows the mqtt-smarthome topic structure with a top-level prefix and a function like
_status_ and _set_. Lamp, group and scene names are read from the Hue bridge.

Status reports are sent to the topic

    hue/status/lights/<lampname>
    
The payload is a JSON encoded object with the following fields:

* val - either 0 if the lamp is off, or the current brightness (1..254)
* hue_state - A JSON object which has the complete lamp state as returned from the Hue API:
   * on: boolean, whether the lamp is on
   * bri: current brightness 1..254
   * hue: hue from 0..65535
   * sat: saturation from 0..254<commit_msg>removed bogus reference to Homematic<commit_after>hue2mqtt
========

  Written and (C) 2015 <NAME> <<EMAIL>> 
  
  Provided under the terms of the MIT license.


Overview
--------
Gateway between a Philips Hue bridge and MQTT, using the official Philips
Java API library.

It is intended as a building block in heterogenous smart home environments where 
an MQTT message broker is used as the centralized message bus.
See https://github.com/mqtt-smarthome for a rationale and architectural overview.


Topic structure
===============
hue2mqtt follows the mqtt-smarthome topic structure with a top-level prefix and a function like
_status_ and _set_. Lamp, group and scene names are read from the Hue bridge.

Status reports are sent to the topic

    hue/status/lights/<lampname>
    
The payload is a JSON encoded object with the following fields:

* val - either 0 if the lamp is off, or the current brightness (1..254)
* hue_state - A JSON object which has the complete lamp state as returned from the Hue API:
   * on: boolean, whether the lamp is on
   * bri: current brightness 1..254
   * hue: hue from 0..65535
   * sat: saturation from 0..254
{'fraction_non_alphanumeric': 0.07244094488188976, 'fraction_numerical': 0.02125984251968504, 'mean_word_length': 3.7230483271375463, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5335485', 'n_tokens_mistral': 769, 'n_tokens_neox': 692, 'n_words': 363}