Coder Social home page Coder Social logo

pbogut / openhab-ewpesmart-binding Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 1.0 65 KB

OpenHAB binding for EWPE Smart powered devices (Gree, Sinclair, etc)

Java 100.00%
gree sinclair airconditioners openhab2 binding openhab-binding openhab2-binding ewpesmart-binding

openhab-ewpesmart-binding's Introduction

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

EWPESmart Binding

This binding allows you too add EWPESmart Air Conditioners as things (Gree, Sinclair, maybe others as well). Once added as a thing, the user can control the Air Conditioner, similarly to how the Air Conditioner is controlled using the remote control or smartphone app.

Note : The EWPESmart Air Conditioner must already be setup on the wifi network and must have a fixed IP Address.

Supported Things

This binding supports one Thing type: EWPEAirCon.

Discovery

Experimental discovery is implemented, to trigger it manually follow these steps:

  • Go to Inbox
  • Click Scan button in the top right corner
  • Click Refresh button next to EWPESmart Binding

Thing Configuration

Currently can only be set up via thing-file. ipAddress and broadcastIp are required, refresh is optional (by default 2 seconds).

Channels

The following channels are supported:

channel type description
power Switch Power on/off the Air Conditioner
mode Number Sets the operating mode of the Air Conditioner
Mode: Auto: 0, Cool: 1, Dry: 2, Fan: 3, Heat: 4
turbo Switch Set on/off the Air Conditioner's Turbo mode.
light Switch Enable/disable the front display on the Air Conditioner
temp Number Sets the desired room temperature
tempSensor Number Shows the room temperature
swingVertical Number Sets the vertical swing action on the Air Conditioner
Full Swing: 1, Up: 2, MidUp: 3, Mid: 4, Mid Down: 5, Down: 6
windSpeed Number Sets the fan speed on the Air conditioner
Auto:0, Low:1, MidLow:2, Mid:3, MidHigh:4, High:5
air Switch Set on/off the Air Conditioner's Air function
dry Switch Set on/off the Air Conditioner's Dry function
health Switch Set on/off the Air Conditioner's Health function
powerSave Switch Set on/off the Air Conditioner's Power Saving function

Full Example

Things:

Thing ewpesmart:EWPEAirCon:000001 "AirCon" @ "Hall Way" [ ipAddress="192.168.1.123", broadcastIp="192.168.1.255", refresh=2 ]

Items:

Switch AirconPower                         { channel="ewpesmart:EWPEAirCon:000001:power" }
Number AirconMode                          { channel="ewpesmart:EWPEAirCon:000001:mode" }
Switch AirconTurbo                         { channel="ewpesmart:EWPEAirCon:000001:turbo" }
Switch AirconLight                         { channel="ewpesmart:EWPEAirCon:000001:light" }
Number AirconTemp "Temperature [%.1f °C]"  { channel="ewpesmart:EWPEAirCon:000001:temp" }
Number AirconRoomTemp "Room Temp[%.1f °C]" { channel="ewpesmart:EWPEAirCon:000001:tempSensor" }
Number AirconTempSet                       { channel="ewpesmart:EWPEAirCon:000001:temp" }
Number AirconSwingVertical                 { channel="ewpesmart:EWPEAirCon:000001:swingVertical" }
Number AirconFanSpeed                      { channel="ewpesmart:EWPEAirCon:000001:windSpeed" }
Switch AirconAir                           { channel="ewpesmart:EWPEAirCon:000001:air" }
Switch AirconDry                           { channel="ewpesmart:EWPEAirCon:000001:dry" }
Switch AirconHealth                        { channel="ewpesmart:EWPEAirCon:000001:health" }
Switch AirconPowerSaving                   { channel="ewpesmart:EWPEAirCon:000001:powerSave" }

Sitemap:

sitemap demo label="Demo Sitemap" {
  Frame label="Controls"
  {
     Switch item=AirconPower label="Power" icon=switch
     Switch item=AirconMode label="Mode" mappings=[0="Auto", 1="Cool", 2="Dry", 3="Fan", 4="Heat"]
     Setpoint item=AirconTemp label="Set temperature" icon=temperature minValue=16 maxValue=30 step=1
  }
  Frame label="Fan Speed"
  {
     Switch item=AirconFanSpeed label="Fan Speed" mappings=[0="Auto", 1="Low", 2="Medium Low", 3="Medium", 4="Medium High", 5="High"] icon=fan
  }
  Frame label="Fan-Swing Direction"
  {
     Switch item=AirconSwingVertical label="Direction" mappings=[0="Off", 1="Full", 2="Up", 3="Mid-up", 4="Mid", 5="Mid-low", 6="Down"] icon=flow
  }
  Frame label="Options"
  {
     Switch item=AirconTurbo label="Turbo" icon=fan
     Switch item=AirconLight label="Light" icon=light
     Switch item=AirconAir label="Air" icon=flow
     Switch item=AirconDry label="Dry" icon=rain
     Switch item=AirconHealth label="Health" icon=smiley
     Switch item=AirconPowerSaving label="Power Saving" icon=poweroutlet
  }
}

Credits

Most of the initial code was taken from jllcunha/openhab-greeair-binding.

Contribution

Always welcome.

Warranty

The software is provided "as is", without warranty of any kind.

openhab-ewpesmart-binding's People

Contributors

pbogut avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

malsina09

openhab-ewpesmart-binding's Issues

Invalid tempSensor value

Dear @pbogut ,

First of all, thank you for your work, it helps me to connect my Sinclair air conditioner to my OpenHAB system and I am sure your repo helps a lot to other fellows as well.

However, I have a problem, could you please check what I'm missing here:
Air conditioner: Sinclair ASH-12BIV
OpenHAB version: 2.5.9
My goal: I would like to control my air conditioner with my Apple HomeKit (Siri and stuff). I nearly achieve this goal with your package, but the tempSensor keeps returning invalid values. I installed and configured the HomeKit binding for OpenHAB, it works well with my other air conditioners.

My items file for the Sinclair (anonimized with "********" strings):

Switch SinclairACUnitLR_Power                "Power"                                                 { channel="ewpesmart:EWPEAirCon:********:power" }
Number SinclairACUnitLR_Mode                 "Mode"                 <ac_mode>                          { channel="ewpesmart:EWPEAirCon:********:mode" }
Number SinclairACUnitLR_SetPoint             "temp"                                    { channel="ewpesmart:EWPEAirCon:********:temp" }
Number SinclairACUnitLR_IndoorTemperatureF   "tempSensor"                                         { channel="ewpesmart:EWPEAirCon:********:tempSensor" }
String SinclairACUnitLR_Fan                  "Fan"              <fan>                              { channel="ewpesmart:EWPEAirCon:********:windSpeed" }

Group gLivingRoomSinclairThermostat "Sinclair LR Thermostat" [ "Thermostat" ]
Number ThermostatSinclairCurrentTempLR "Current temp" (gLivingRoomSinclairThermostat) [ "CurrentTemperature" ]
Number ThermostatSinclairTargetTemperatureLR "Target temp" (gLivingRoomSinclairThermostat) [ "homekit:TargetTemperature" ]
String ThermostatSinclairHeatingCoolingModeLR (gLivingRoomSinclairThermostat) [ "homekit:TargetHeatingCoolingMode" ]
String ThermostatSinclairHeatingCoolingCurModeLR (gLivingRoomSinclairThermostat) [ "homekit:CurrentHeatingCoolingMode" ]

Here's some records from openhab.log:

2020-12-28 16:16:47.311 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 66.0. Returning max value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@4a88f39f
2020-12-28 16:16:47.316 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 66.0. Returning max value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@168a255c
2020-12-28 16:16:47.316 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 66.0. Returning max value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@168a255c
2020-12-28 16:16:47.317 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 66.0. Returning max value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@168a255c
2020-12-28 16:16:47.318 [WARN ] [istics.impl.base.FloatCharacteristic] - Detected value out of range 66.0. Returning max value instead. Characteristic io.github.hapjava.characteristics.impl.thermostat.CurrentTemperatureCharacteristic@168a255c

So, as I wrote, everything (on/off state, modes, target temperature, etc.) works well, but the tempSensor value is always between 60 and 66. My first thought was it is maybe in Fahrenheit (instead of Celsius), but if I convert it to celsius, it doesn't match as well. I don't know what is this value and where it came from.

Could you help me with that, or its a problem with my air conditioner's sensor?

Thank you in advance,
RobbeR

OpenHAB 3 release

Hi,

Would it be possible to make a release for OpenHAB 3?

Best regards

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.