Ejemplo n.º 1
0
def setup_platform(hass, config, add_entities, discovery_info=None):
    """Set up the Mitsubishi ECHONET climate devices."""
    entities = []
    if config.get(CONF_IP_ADDRESS) is None:
        hvac_list = mit.discover("Home air conditioner")
        if len(hvac_list) > 0:
            for idx, hvac in enumerate(hvac_list):
                entities.append(
                    MitsubishiClimate("hvac_{}".format(idx), hvac,
                                      TEMP_CELSIUS))
        else:
            _LOGGER.warning("No ECHONET lite HVAC found")
    else:
        entities.append(
            MitsubishiClimate(
                config.get(CONF_NAME),
                mit.HomeAirConditioner(config.get(CONF_IP_ADDRESS)),
                TEMP_CELSIUS, config.get(ATTR_FAN_LIST)))
    add_entities(entities)
Ejemplo n.º 2
0
#!/usr/bin/env python3
import mitsubishi_echonet as mit
import time

echonet_objects = False
# Discover HVAC Echonet objects
while echonet_objects == False:
    print("Discovering Anything..")
    echonet_objects = mit.discover()

for node in echonet_objects:
   print("ECHONET node {} available Get properties:".format(node.netif))
   #print(aircon.netif)
   print(node.fetchGetProperties())

   print("ECHONET node {} available Set properties:".format(node.netif))
   print(node.fetchSetProperties())
   print(node.update())
   # aircon.on()
  # print(node.getAirflowVert())
   # print(node.getAutoDirection())
    #print(node.getSwingMode())

   node.setSwingMode('vert')
   # node.setSwingMode('not-used')

   # node.setAirFlowVert('central')

   # print("Getting current operational parameters")
   # print(aircon.update())
   # aircon.setFanSpeed('medium-low')
Ejemplo n.º 3
0
#!/usr/bin/env python3
import mitsubishi_echonet as mit
import time

aircons = False
# Discover HVAC Echonet objects
while aircons == False:
    print("Discovering Air Conditioners..")
    aircons = mit.discover('Home air conditioner')

for aircon in aircons:
    print("Airconditioner {} available Get properties:".format(aircon.netif))
    #print(aircon.netif)
    print(aircon.fetchGetProperties())

    print("Airconditioner {} available Set properties:".format(aircon.netif))
    print(aircon.fetchSetProperties())

    # aircon.on()
    # aircon.setMode('dry')

    print("Getting current operational parameters")
    print(aircon.update())
    # aircon.setFanSpeed('medium-low')

    print("Getting outdoor temperature")
    print(aircon.getOutdoorTemperature())