Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Ready to go Gree AC unit control and statuses reading from device (QuickApp)


Question

Posted (edited)

Hello,
I would like to share my first worth Quick App to control Gree AC Unit (Air conditionier).

 

This app was developed for my own requirements. I need it to write some scenes which automatically turn on / off ac when temperature is different from set in thermostat.


I would like to say thank for the people who have helped me to find the necessary information. Big thanks to these guys - https://github.com/tomikaa87/gree-remote who had made a lot of work and make the developing process less complicated.

 

It's doesnt work with fallowing models:

  • Gree Pular - it use different UDP packages, need to be debug

 

Ok, let's go to inistall it, what you need:

1. Make sure, that your Gree AC Unit have static IP address. Please enter this IP address to QuickApp variable.

2. When IP address is entered, click Pair Device button

3. If pair is success, you are available to control your AC unit

4. Statuses from AC device is updated after each 5 minutes, you can change this 

 

QuickApp version: v1.

Works with: Home Center 3

 

Take and use it, I'm sure that this app will get updates and additional scenes for automatization :)

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

 

Notes (Updated 2024-05):

Different GREE AC units send different packages to devices, so it cannot be working with every gree ac unit. I'm planning to build another 3 AC units (different gree models in other rooms), when I have it, i'll try to adapt code to more Gree AC devices

Please login or register to see this attachment.

Edited by Deivydas
  • Like 2
  • Thanks 2

Recommended Posts

  • 0
Posted

Thank you for sharing! Looks like hard work! ?

  • Thanks 1
  • 0
  • Inquirer
  • Posted

    It was not easy to understand how control device via network. I'm the PHP developer, so firstly I found a solution how to do in PHP, after that just rewriting in LUA. It was interested and fun for me  

     

    My main goal is to have just 1 app (Fibaro) with full control of mine house, and devices  How to do I have no idea, I have big interested in it  :D

     

    Maybe have you try this QuickApp? I would like to know is it working with other models of Gree

    • 0
    Posted
    2 hours ago, Deivydas said:

    Maybe have you try this QuickApp? I would like to know is it working with other models of Gree

     

    I don't own a Gree AC, else I would definitely use it.

    • 0
    Posted
    3 hours ago, Deivydas said:

    It was not easy to understand how control device via network. I'm the PHP developer, so firstly I found a solution how to do in PHP, after that just rewriting in LUA. It was interested and fun for me  

     

    My main goal is to have just 1 app (Fibaro) with full control of mine house, and devices  How to do I have no idea, I have big interested in it  :D

     

    Maybe have you try this QuickApp? I would like to know is it working with other models of Gree

    Sorry to say, but it’s not working for me.

     

    Please login or register to see this code.

     

     

    • Thanks 1
    • 0
  • Inquirer
  • Posted (edited)

    I'll help you. What will be the fastest way, maybe using teamviewer?

     

    The problem is with devicePairing, need to debug pairing functions and too see the result returns.
     

     

    1. Does your AC Unit have set Static IP adress?

    2. What model of your Gree Ac

    3. Write in this place: self:debug(cid), what it response for you?

     

     

    Please login or register to see this attachment.

    Edited by Deivydas
    • 0
    Posted (edited)

    Great job, Ive been looking for this for a long time (im new to LUA), works like a charm, thanks a lot for sharing!

     

    The only thing which is not being updated is the "main switch", so even the AC is on the QA shows its on, but the main switch shows its still off

    Please login or register to see this attachment.

    Edited by AchoSK01
    • 0
    Posted
    On 10/30/2022 at 8:54 PM, Deivydas said:

    I'll help you. What will be the fastest way, maybe using teamviewer?

     

    The problem is with devicePairing, need to debug pairing functions and too see the result returns.
     

     

    1. Does your AC Unit have set Static IP adress?

    2. What model of your Gree Ac

    3. Write in this place: self:debug(cid), what it response for you?

     

     

    Please login or register to see this attachment.

    Hello,

     

    thanks, in the meantime: pairing is OK after a few try, but no status and no reaction for control.

    In QA variables every variable have value

    • 0
  • Inquirer
  • Posted

    @AchoSK01 the problem is just with MAIN Switch? Everything else is working for you fine?

     

    @Milan Takacs look at my screenshot. All params should be set to false except the IP adress. When you have IP address set and all params false after making the pair, these params should be filled by custom ids which was received from your network. Are you sure that after pairing these params are filled?

    Please login or register to see this attachment.

    • 0
    Posted

    Yes, all the rest is working well :), just the main/"power switch" doesnt get updated ( if the AC has beeen switched off/on via remote control/gree app)

    • 0
    Posted

    @Deivydas Yes. All field is filled.

     

    Please login or register to see this attachment.

    • 0
  • Inquirer
  • Posted

    Ok, so pair was successfull and after that you should be able to control your device. Ok, at this point if it's dont work, we need to check the packages responses on different actions.

     

    @Milan Takacsmaybe we can do discuss into private messages? I would like to help you, to make it work, but at the forum, we will do it so long

    • 0
    Posted (edited)

    I check this great quickapp with my Gree Pular and it didnt Pair/

    It gets key, mac, name but cant get cid.

    Error: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 1 0:1 [�] line:

     

    I also see that cid is empty in debug.

    Edited by viperlodz
    • 0
  • Inquirer
  • Posted

    Ok, need to debug. Maybe different packages is in your device than mine, I dont know, need to debug.

     

    Can we move for a talk to PM

    • 0
  • Inquirer
  • Posted

    Let's collect with which models it's working.

     

    @AchoSK01 what model of gree do you own?

     

    23 hours ago, AchoSK01 said:

    Yes, all the rest is working well :), just the main/"power switch" doesnt get updated ( if the AC has beeen switched off/on via remote control/gree app)

     

    • 0
    Posted

    Ive got:

    GREE - AMBER / GWH09YC-K6DNA1A/l 

     

    • 0
    Posted (edited)

    I try to use it for Sinclair AC. Status change to connected :), but nothing else. I don't know what mean ac_key in gree ac. I will wait for the next ver.  maybe it will start to work with Sinclair ac. 

     

    I have tried on Sinclair ASH 18BIV

    Edited by ksobczak
    • 0
  • Inquirer
  • Posted

    The AC_KEY is unique key which is receive after the success pairing. When we have AC_KEY we can controll our AC Unit.

     

    All control is under UDP, but to control the devices we need to know packages which should be send to AC_UNIT. I have found the decode packages on github, which was working with my Gree and write an QuickApp.

     

    Milan are using other model of Gree, we have connected the device and find 2 packages for turn on, and turn off, but other packages are still under the debuging.

     

    @ksobczak are you hearing any beeps from AC when clicking any buttons in quickapp?

    • 0
    Posted
    On 11/6/2022 at 7:26 PM, Deivydas said:

    The AC_KEY is unique key which is receive after the success pairing. When we have AC_KEY we can controll our AC Unit.

     

    All control is under UDP, but to control the devices we need to know packages which should be send to AC_UNIT. I have found the decode packages on github, which was working with my Gree and write an QuickApp.

     

    Milan are using other model of Gree, we have connected the device and find 2 packages for turn on, and turn off, but other packages are still under the debuging.

     

    @ksobczak are you hearing any beeps from AC when clicking any buttons in quickapp?

     

    unfortunately nothing

    • 0
  • Inquirer
  • Posted

    I'll take a look what AC model I'm using at home, because for me it's everything working fine :/

    • 0
    Posted

    Hi there.
    I tried QuickApp and I want to give you feedback.
    I have a Nord air conditioner designed by Gree in 2019.
    It can be controlled with the Gree+ application, I thought I would try this QuickApp as well.
    Unfortunately, it failed, the value of the ac_key variable shows an empty field.
    The program is a very nice piece of work, I will keep an eye on the developments.

     

    [2022-12-15] [22:51:04] [DEBUG] [GREE AC400]: Reading AC Status

    [2022-12-15] [22:51:33] [DEBUG] [GREE AC400]: Reading AC Status

    [2022-12-15] [22:52:00] [TRACE] [GREE AC400]: UIEvent: {"elementName":"pair","values":[],"eventType":"onReleased","deviceId":400}

    [2022-12-15] [22:55:11] [TRACE] [GREE AC400]: UIEvent: {"elementName":"pair","values":[],"eventType":"onReleased","deviceId":400}

    [2022-12-15] [22:55:18] [TRACE] [GREE AC400]: UIEvent: {"elementName":"buttonUpdateStatuses","values":[],"eventType":"onReleased","deviceId":400}

    [2022-12-15] [22:55:18] [TRACE] [GREE AC400]: Was trying to not configure Gree AC Unit statuses.

    [2022-12-15] [22:56:33] [DEBUG] [GREE AC400]: Reading AC Status

    [2022-12-15] [22:56:35] [DEBUG] [GREE AC400]: Pairing error

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...