SPI SLAVE receives data instability

The data received by the spi slave is very unstable.I used the spi slave development project, and I've been plagued by this problem for half a month.I want to know when I can fix it?

Hi @L-eeX , Can you describe your specific phenomenon for us to analysis

@yake827 Download the example
# Slave machine prints information：
Received: ゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥ?
Received: ゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥ?
Received: ゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥ?
Received: ゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥゥ?
# Host printing information
Received:
Received:
Received:
Received:

@yake827 This is my own code
Slave machine prints information：
Received: 11 11 11 11
ret: 0
Received: 11 0 0 0
ret: 0
Received: 11 0 0 0
ret: 0
Received: 11 11 11 11
ret: 0
Received: 11 11 11 11
Host printing information
Received: 42 170 170 170
Received: 42 170 170 170
Received: 42 170 170 170
Received: 42 170 170 170
Received: 11 11 11 11
Received: 41 41 0 200
Received: 42 170 170 170
Received: 42 169 82 16

Hi @L-eeX , it seems happen signal loss, I suggest you solder the SPI pins of the master and slave to each other using shorter cables.

@yake827
I use the dupont line to connect two devices, which should not be a line problem

@L-eeX I also test it using the dupont lines firstly, I found when the line is too long , the signal will loss frequently.So shorter dupont line maybe completely eradicate the signal loss.

Hi @yake827 ,I have just used 10 cm (3.94 inch) dupont line, which should not influence the IIC.

@L-eeX Can you tell me your IDF commit? I will test it again.

receiver
`/* SPI Slave example, receiver (uses SPI Slave driver to communicate with sender)
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "lwip/sockets.h"
#include "lwip/dns.h"
#include "lwip/netdb.h"
#include "lwip/igmp.h"
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include "soc/rtc_cntl_reg.h"
#include "rom/cache.h"
#include "driver/spi_slave.h"
#include "esp_log.h"
#include "esp_spi_flash.h"
/*
SPI receiver (slave) example.
This example is supposed to work together with the SPI sender. It uses the standard SPI pins (MISO, MOSI, SCLK, CS) to
transmit data over in a full-duplex fashion, that is, while the master puts data on the MOSI pin, the slave puts its own
data on the MISO pin.
This example uses one extra pin: GPIO_HANDSHAKE is used as a handshake pin. After a transmission has been set up and we're
ready to send/receive data, this code uses a callback to set the handshake pin high. The sender will detect this and start
sending a transaction. As soon as the transaction is done, the line gets set low again.
*/
/*
Pins in use. The SPI Master can use the GPIO mux, so feel free to change these if needed.
*/
//#define GPIO_HANDSHAKE 2
#define GPIO_MOSI 12
#define GPIO_MISO 13
#define GPIO_SCLK 15
#define GPIO_CS 14
/*
//Called after a transaction is queued and ready for pickup by master. We use this to set the handshake line high.
void my_post_setup_cb(spi_slave_transaction_t *trans) {
WRITE_PERI_REG(GPIO_OUT_W1TS_REG, (1<<GPIO_HANDSHAKE));
}
//Called after transaction is sent/received. We use this to set the handshake line low.
void my_post_trans_cb(spi_slave_transaction_t *trans) {
WRITE_PERI_REG(GPIO_OUT_W1TC_REG, (1<<GPIO_HANDSHAKE));
}
*/
//Main application
void app_main()
{
esp_err_t ret;
//Configuration for the SPI bus
spi_bus_config_t buscfg={
    .mosi_io_num=GPIO_MOSI,
    .miso_io_num=GPIO_MISO,
    .sclk_io_num=GPIO_SCLK
};

//Configuration for the SPI slave interface
spi_slave_interface_config_t slvcfg={
    .mode=0,
    .spics_io_num=GPIO_CS,
    .flags=0,
    .queue_size=3
    //.post_setup_cb=my_post_setup_cb,
    //.post_trans_cb=my_post_trans_cb
};

/*   //Configuration for the handshake line
gpio_config_t io_conf={
.intr_type=GPIO_INTR_DISABLE,
.mode=GPIO_MODE_OUTPUT,
.pin_bit_mask=(1<<GPIO_HANDSHAKE)
};
*/
//Configure handshake line as output
//gpio_config(&io_conf);
//Enable pull-ups on SPI lines so we don't detect rogue pulses when no master is connected.
//gpio_set_pull_mode(GPIO_MISO, GPIO_PULLUP_ONLY);
gpio_set_pull_mode(GPIO_MOSI, GPIO_PULLUP_ONLY);
gpio_set_pull_mode(GPIO_SCLK, GPIO_PULLUP_ONLY);
gpio_set_pull_mode(GPIO_CS, GPIO_PULLUP_ONLY);

//Initialize SPI slave interface
ret=spi_slave_initialize(HSPI_HOST, &buscfg, &slvcfg, 1);
assert(ret==ESP_OK);

uint8_t sendbuf[4]={0xAA,0xAA,0xAA,0xAA};
uint8_t recvbuf[4]={0xbb,0xbb,0xbb,0xbb};
//memset(recvbuf, 0xAF, 2);
spi_slave_transaction_t t;
memset(&t, 0, sizeof(t));

while(1) {
    //Clear receive buffer, set send buffer to something sane
    //memset(recvbuf, 0xAF, 2);;
    //sprintf(sendbuf, "This is the receiver, sending data for transmission number %04d.", n);

    //Set up a transaction of 128 bytes to send/receive
    t.length=4*8;
    t.tx_buffer=sendbuf;
    t.rx_buffer=recvbuf;
    /* This call enables the SPI slave interface to send/receive to the sendbuf and recvbuf. The transaction is
    initialized by the SPI master, however, so it will not actually happen until the master starts a hardware transaction
    by pulling CS low and pulsing the clock etc. In this specific example, we use the handshake line, pulled up by the
    .post_setup_cb callback that is called as soon as a transaction is ready, to let the master know it is free to transfer
    data.
    */
    ret=spi_slave_transmit(HSPI_HOST, &t, portMAX_DELAY);
    printf("ret: %d\n",ret);

    //spi_slave_transmit does not return until the master has done a transmission, so by here we have sent our data and
    //received data from the master. Print it.
    printf("Received: %d %d %d %d\n",recvbuf[0],recvbuf[1],recvbuf[2],recvbuf[3]);
}

}
`
sender
`/* SPI Slave example, sender (uses SPI master driver)
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "lwip/sockets.h"
#include "lwip/dns.h"
#include "lwip/netdb.h"
#include "lwip/igmp.h"
#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include "soc/rtc_cntl_reg.h"
#include "rom/cache.h"
#include "driver/spi_master.h"
#include "esp_log.h"
#include "esp_spi_flash.h"
#include "soc/gpio_reg.h"
#include "driver/gpio.h"
#include "esp_intr_alloc.h"
/*
SPI sender (master) example.
This example is supposed to work together with the SPI receiver. It uses the standard SPI pins (MISO, MOSI, SCLK, CS) to
transmit data over in a full-duplex fashion, that is, while the master puts data on the MOSI pin, the slave puts its own
data on the MISO pin.
This example uses one extra pin: GPIO_HANDSHAKE is used as a handshake pin. The slave makes this pin high as soon as it is
ready to receive/send data. This code connects this line to a GPIO interrupt which gives the rdySem semaphore. The main
task waits for this semaphore to be given before queueing a transmission.
*/
/*
Pins in use. The SPI Master can use the GPIO mux, so feel free to change these if needed.
*/
//#define GPIO_HANDSHAKE 2
#define GPIO_MOSI 12
#define GPIO_MISO 13
#define GPIO_SCLK 15
#define GPIO_CS 14
//The semaphore indicating the slave is ready to receive stuff.
//static xQueueHandle rdySem;
/*
This ISR is called when the handshake line goes high.
/
/
static void IRAM_ATTR gpio_handshake_isr_handler(void* arg)
{
//Sometimes due to interference or ringing or something, we get two irqs after eachother. This is solved by
//looking at the time between interrupts and refusing any interrupt too close to another one.
static uint32_t lasthandshaketime;
uint32_t currtime=xthal_get_ccount();
uint32_t diff=currtime-lasthandshaketime;
if (diff<240000) return; //ignore everything <1ms after an earlier irq
lasthandshaketime=currtime;
//Give the semaphore.
BaseType_t mustYield=false;
xSemaphoreGiveFromISR(rdySem, &mustYield);
if (mustYield) portYIELD_FROM_ISR();

}*/
/*
void send(int data)
{
spi_device_handle_t handle;
int recvbuf[2]={0xBF};
int sendbuf[1]={0};
sendbuf[0]=data;
spi_transaction_t t;
memset(&t, 0, sizeof(t));
t.length=1*8; //128 bytes
t.tx_buffer=sendbuf;
t.rx_buffer=recvbuf;

ret=spi_device_transmit(handle, &t);
//printf("Received: %d\n", recvbuf[0]);

}
*/
//Main application
void app_main()
{
esp_err_t ret;
spi_device_handle_t handle;
//Configuration for the SPI bus
spi_bus_config_t buscfg={
    .mosi_io_num=GPIO_MOSI,
    .miso_io_num=GPIO_MISO,
    .sclk_io_num=GPIO_SCLK,
    .quadwp_io_num=-1,
    .quadhd_io_num=-1
};

//Configuration for the SPI device on the other side of the bus
spi_device_interface_config_t devcfg={
    .command_bits=0,
    .address_bits=0,
    .dummy_bits=0,
    .clock_speed_hz=9000000,
    .duty_cycle_pos=128,        //50% duty cycle
    .mode=0,
    .spics_io_num=GPIO_CS,
    .cs_ena_posttrans=3,        //Keep the CS low 3 cycles after transaction, to stop slave from missing the last bit when CS has less propagation delay than CLK
    .queue_size=3
};

//GPIO config for the handshake line.
/*gpio_config_t io_conf={
    .intr_type=GPIO_PIN_INTR_POSEDGE,
    .mode=GPIO_MODE_INPUT,
    .pull_up_en=1,
    .pin_bit_mask=(1<<GPIO_HANDSHAKE)
};*/

uint8_t sendbuf[4]={0x0b,0x0b,0x0b,0x0b};
uint8_t recvbuf[4]={0xee,0xee,0xee,0xee};
spi_transaction_t t;
memset(&t, 0, sizeof(t));////////////////////////////////

//Create the semaphore.
//rdySem=xSemaphoreCreateBinary();

//Set up handshake line interrupt.
//gpio_config(&io_conf);
//gpio_install_isr_service(0);
//gpio_set_intr_type(GPIO_HANDSHAKE, GPIO_PIN_INTR_POSEDGE);
//gpio_isr_handler_add(GPIO_HANDSHAKE, gpio_handshake_isr_handler, NULL);

//Initialize the SPI bus and add the device we want to send stuff to.
ret=spi_bus_initialize(HSPI_HOST, &buscfg, 1);
assert(ret==ESP_OK);
ret=spi_bus_add_device(HSPI_HOST, &devcfg, &handle);
assert(ret==ESP_OK);

//Assume the slave is ready for the first transmission: if the slave started up before us, we will not detect
//positive edge on the handshake line.
//xSemaphoreGive(rdySem);

while(1) {
    //snprintf(sendbuf, 128, "Sender, transmission no. %04i. Last time, I received: \"%s\"", n, recvbuf);
    t.length=4*8; //128 bytes
    t.tx_buffer=sendbuf;
    t.rx_buffer=recvbuf;
    //Wait for slave to be ready for next byte before sending
    //xSemaphoreTake(rdySem, 100); //Wait until slave is ready);//portMAX_DELAY); //Wait until slave is ready
    ret=spi_device_transmit(handle, &t);
    printf("Received: %d %d %d %d\n",recvbuf[0],recvbuf[1],recvbuf[2],recvbuf[3]);
}

//Never reached.
ret=spi_bus_remove_device(handle);
assert(ret==ESP_OK);

}`

Hi @L-eeX , Because you using the 10 cm (3.94 inch) dupont line, I suggest the  clock_speed_hz  less than 3MHz.

Hi @ yake827，Almost all the frequencies have been tried, and the data cannot be fully received

Hi @L-eeX , could you  give me your ESP-IDF commit? I have tested the SPI slave demo using the latest commit and find it is OK.

Hi @ L-eeX，I downloaded the latest esp-idf，I just changed the spi_slave example，My spi slave code is in the reply above。

Do you solve the problem. I have the same problem on the example of spi_slave.


Make merge a function as well as a method

Roughly speaking, this should look like:
from functools import reduce

def merge(datasets, **kwargs):
    return reduce(lambda x, y: x.merge(y, **kwargs), datasets)

We use already use this in auto_combine.
Including it would make for a better user experience that requiring users to write it themselves.

As pointed out in #679, it would be nice to handle DataArray objects (keyed by their name) in the list of datasets to merge, too.


Please need more details

Hello,
I have finally found what I was looking for - your plugin, but can’t install it to work.
Can you please describe the process (including mqtt broker) in a bit more detail.
Have 2 gree ACs in home and badly want to control them from home app

Make sure your AC is connected to your home network via AC. Get it’s ip and configure the plugin. MqTt is needed for getting the room temperature. For example I use DHT 11 sensor with esp8266 that reads room temperature and post it to an mq  topic.

Dear duculete,
so, mqtt is should be hardware, not software? I have homekit sensor so read
the temperature in the room
On Sat, Jun 16, 2018 at 5:36 PM duculete<EMAIL_ADDRESS>wrote:

Make sure your AC is connected to your home network via AC. Get it’s ip
and configure the plugin. MqTt is needed for getting the room temperature.
For example I use DHT 11 sensor with esp8266 that reads room temperature
and post it to an mq topic.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-397816514,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbL_cey1h3ozQ7eBOcv7PKbTUSh17ks5t9RgEgaJpZM4UqbYK
.

You can use mosquito as mqtt server on a pc or RaspberryPi

ok.
Thanks, my homebridge is installed on Raspberry.
Sorry to bother you for so much, but I am a bit of new in all that, are
there any special settings after installing mosquito, or just install it,
install your plugin, write correct IPs of ACs and that's it?
Regards,
Roman
On Sat, Jun 16, 2018 at 6:40 PM duculete<EMAIL_ADDRESS>wrote:

You can use mosquito as mqtt server on a pc or RaspberryPi
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-397820549,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbDeiMHqmfIeK4TyVCudRaybgPf4vks5t9SbogaJpZM4UqbYK
.

Hello, yes try that and then you should see in logs when it discovers the AC. If any problems please reply here.

Hello again,
I have installed  mosquitto, tried it out to see that it is working, after
that I installed your plugin, edited the config file as it says in your
wiki, just inserted another ip for my AC, but when I run home bridge, that
is the error that I receive:
Loading 1 accessories...
/usr/local/lib/node_modules/homebridge/lib/api.js:64
  throw new Error("The requested accessory '" + name + "' was not

registered by any plugin.");
  ^

Error: The requested accessory 'GreeAC' was not registered by any plugin.
at API.accessory

(/usr/local/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories

(/usr/local/lib/node_modules/homebridge/lib/server.js:264:42)
at Server.run

(/usr/local/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports

(/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object.<anonymous>

(/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:652:30)

at Object.Module._extensions..js (module.js:663:10)

at Module.load (module.js:565:32)

at tryModuleLoad (module.js:505:12)

at Function.Module._load (module.js:497:3)

[image: Screen Shot 2018-06-18 at 20.11.12.png]
On Sat, Jun 16, 2018 at 8:03 PM duculete<EMAIL_ADDRESS>wrote:

Hello, yes try that and then you should see in logs when it discovers the
AC. If any problems please reply here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-397825895,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbO-HZgPMP3Rt8_1f9qHR96Yqw9X7ks5t9Tp-gaJpZM4UqbYK
.

hello,
did you install the plugin?

Yes, of course.
But there’s one error of not finding package.js
On Jun 18, 2018, at 21:00, duculete<EMAIL_ADDRESS>wrote:
hello,
did you install the plugin?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I tested on my setup and it running ok.
how did you install the plugin? please post here the accessory configuration for gree-ac

Hello again,
again sorry for bothering you... I have managed to run it after
reinstalling home bridge. It works fine, except for it's minimum is 17 C
and the AC has 16, but everything works fine. I just can't figure out how
to write 3 ACs, it goes out with an error if I write the config.json like
this:
{
"bridge": {
"name": "Homebridge",
"username": "AA:15:5D:B3:AE:32",
"port": 51826,
"pin": "234-25-123"
},
"description": "My Home bridge",
"accessories": [
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "Office AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "bedroom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "LivingRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
}
]
}
On Mon, Jun 18, 2018 at 9:10 PM duculete<EMAIL_ADDRESS>wrote:

I tested on my setup and it running ok.
how did you install the plugin? please post here the accessory
configuration for gree-ac
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398145410,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbA34R9IjYBtpFSTvemLmmhHSf8L5ks5t9-0ggaJpZM4UqbYK
.

here's the mistake:
[6/19/2018, 8:38:09 PM] Homebridge is running on port 51826.
[6/19/2018, 8:38:09 PM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/19/2018, 8:38:09 PM] [bedroom AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/19/2018, 8:38:09 PM] [LivingRoom AC] Connecting on Office with ip
address <IP_ADDRESS>[7000] debug=false: SUCCESS
and the config.json looks like this right now:
{
"bridge": {
"name": "Homebridge",
"username": "AA:15:5D:B3:AE:32",
"port": 51826,
"pin": "234-25-123"
},
"description": "My Home bridge",
"accessories": [
{
  "accessory": "GreeAC",

  "host": "<IP_ADDRESS>",

  "name": "Office AC",

  "debug": "false",

  "updateInterval": 10000,

  "mqttUrl": "mqtt://<IP_ADDRESS>",

  "currentTempTopic": "home/office/temperature"

},
{
  "accessory": "GreeAC",

  "host": "<IP_ADDRESS>",

  "name": "bedroom AC",

  "debug": "false",

  "updateInterval": 10000,

  "mqttUrl": "mqtt://<IP_ADDRESS>",

  "currentTempTopic": "home/bedroom/temperature"

},
{
  "accessory": "GreeAC",

  "host": "<IP_ADDRESS>",

  "name": "LivingRoom AC",

  "debug": "false",

  "updateInterval": 10000,

  "mqttUrl": "mqtt://<IP_ADDRESS>",

  "currentTempTopic": "home/LivingRoom/temperature"

}
]
}
On Tue, Jun 19, 2018 at 8:31 PM Roman<EMAIL_ADDRESS>wrote:

Hello again,
again sorry for bothering you... I have managed to run it after
reinstalling home bridge. It works fine, except for it's minimum is 17 C
and the AC has 16, but everything works fine. I just can't figure out how
to write 3 ACs, it goes out with an error if I write the config.json like
this:
{
"bridge": {
"name": "Homebridge",
"username": "AA:15:5D:B3:AE:32",
"port": 51826,
"pin": "234-25-123"
},
"description": "My Home bridge",
"accessories": [
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "Office AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "bedroom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "LivingRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
}
]
}
On Mon, Jun 18, 2018 at 9:10 PM duculete<EMAIL_ADDRESS>wrote:

I tested on my setup and it running ok.
how did you install the plugin? please post here the accessory
configuration for gree-ac
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398145410,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbA34R9IjYBtpFSTvemLmmhHSf8L5ks5t9-0ggaJpZM4UqbYK
.

I see. I will take a look since I have only one AC and I did not tested with multiple AC on the same network.

I can test it.
Actually I have cooper&hunter (which is similar to gree).
They are connected via EWPE Smart app for iphone. And all in the same network.
For now everything works, except, minimim temperature is 16C, but the pluging only handles 17C.
Anyways, it works even if I turn on with remote or turn off - it updates in the Home App.
Thank you in advance
Regrads,
Roman
On Jun 19, 2018, at 21:09, duculete<EMAIL_ADDRESS>wrote:
I see. I will take a look since I have only one AC and I did not tested with multiple AC on the same network.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I uploaded to github the changes. you can test by getting the contents of app/deviceFactory.js (from this repo) update the file /usr/local/lib/node_modules/homebridge-gree-ac/app/deviceFactory.js (replace the contents of the file your raspberry pi with the code from this repo); do the same thing for index.js (from this repo) -> /usr/local/lib/node_modules/homebridge-gree-ac/index.js
After that, restart homebridge and you should see all 3 AC added to Home app and min temperature 16C
... or you can download the entire repo, install with npm and test.
let me know if you have troubles and I can help.

/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/api.js:64
  throw new Error("The requested accessory '" + name + "' was not

registered by any plugin.");
  ^

Error: The requested accessory 'GreeAC2' was not registered by any plugin.
at API.accessory

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:284:42)
at Server.run

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:702:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)

at Module.load (internal/modules/cjs/loader.js:612:32)

at tryModuleLoad (internal/modules/cjs/loader.js:551:12)

at Function.Module._load (internal/modules/cjs/loader.js:543:3)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]

Then tried so (all the acccessories name are the same):
{
"bridge": {
"name": "Homebridge",
"username": "AA:15:5D:B3:AE:32",
"port": 51826,
"pin": "234-25-125"
},
"description": "My Home bridge",
"accessories": [
{
  "accessory": "GreeAC",

  "host": "<IP_ADDRESS>",

  "name": "Office AC",

  "debug": "false",

  "updateInterval": 10000,

  "mqttUrl": "mqtt://<IP_ADDRESS>",

  "currentTempTopic": "home/office/temperature"

},
{
  "accessory": "GreeAC",

  "host": "<IP_ADDRESS>",

  "name": "BedRoom AC",

  "debug": "false",

  "updateInterval": 10000,

  "mqttUrl": "mqtt://<IP_ADDRESS>",

  "currentTempTopic": "home/bedroom/temperature"

},
{
  "accessory": "GreeAC",

  "host": "<IP_ADDRESS>",

  "name": "LivingRoom AC",

  "debug": "false",

  "updateInterval": 10000,

  "mqttUrl": "mqtt://<IP_ADDRESS>",

  "currentTempTopic": "home/LivingRoom/temperature"

}
]
}
got this error:
[6/19/2018, 11:34:19 PM] Loaded config.json with 3 accessories and 0
platforms.
[6/19/2018, 11:34:19 PM] ---
[6/19/2018, 11:34:21 PM] Loaded plugin: homebridge-gree-ac
[6/19/2018, 11:34:21 PM] Registering accessory 'homebridge-gree-ac.GreeAC'
[6/19/2018, 11:34:21 PM] ---
[6/19/2018, 11:34:21 PM] Loading 3 accessories...
[6/19/2018, 11:34:21 PM] [Office AC] Initializing GreeAC accessory...
[6/19/2018, 11:34:21 PM] [BedRoom AC] Initializing GreeAC accessory...
[6/19/2018, 11:34:21 PM] [LivingRoom AC] Initializing GreeAC accessory...
Setup Payload:
X-HM://0023UVN1H9DE3
Scan this code with your HomeKit app on your iOS device to pair with
Homebridge:
[6/19/2018, 11:34:21 PM] Homebridge is running on port 51826.
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[6/19/2018, 11:34:21 PM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/19/2018, 11:34:21 PM] [BedRoom AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/19/2018, 11:34:21 PM] [LivingRoom AC] Connecting on Office with ip
address <IP_ADDRESS>[7000] debug=false: SUCCESS
internal/crypto/cipher.js:175
const ret = this._handle.final();
                       ^

Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad
decrypt
at Decipheriv.final (internal/crypto/cipher.js:175:28)

at Object.decrypt

(/Users/rnglad/node_modules/homebridge-gree-ac/app/encryptionService.js:21:56)
at Device._handleResponse

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:149:40)
at Socket.Device.socket.on

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:50:51)
at Socket.emit (events.js:187:15)

at UDP.onMessage [as onmessage] (dgram.js:673:8)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

If I run it with one device - it runs OK
On Tue, Jun 19, 2018 at 10:40 PM duculete<EMAIL_ADDRESS>wrote:

I uploaded to github the changes. you can test by getting the contents of
app/deviceFactory.js (from this repo) update the file
/usr/local/lib/node_modules/homebridge-gree-ac/app/deviceFactory.js
(replace the contents of the file your raspberry pi with the code from this
repo); do the same thing for index.js (from this repo) ->
/usr/local/lib/node_modules/homebridge-gree-ac/index.js
After that, restart homebridge and you should see all 3 AC added to Home
app and min temperature 16C
... or you can download the entire repo, install with npm and test.
let me know if you have troubles and I can help.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398520430,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbGqjc9La6tYSeUelznKsULpcvZ01ks5t-VOegaJpZM4UqbYK
.

that is an invalid config. GreeAC is the name of the accessory (this is telling Homebridge witch plugin to use), so it should be the same for all the "instances". value of "name" field will appear also on Home app on your iPhone (but you can can rename it on your Iphone, later).
The only thing that differentiate accessories is the "name" key". Use this configuration:
"accessories": [
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "Office AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/office/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "BedRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "LivingRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/LivingRoom/temperature"
}

I tried it and once when I just received your message (though it seemed the
same as I tried)
It worked, but all the other times I run home bridge it gives me this error:
Last login: Wed Jun 20 00:29:16 on ttys000
/Users/rnglad/.npm-global/lib/node_modules/homebridge/bin/homebridge ; exit;
MediaMac:~ rnglad$
/Users/rnglad/.npm-global/lib/node_modules/homebridge/bin/homebridge ; exit;
[6/20/2018, 12:30:38 AM] Loaded config.json with 3 accessories and 0
platforms.
[6/20/2018, 12:30:38 AM] ---
[6/20/2018, 12:30:38 AM] Loaded plugin: homebridge-gree-ac
[6/20/2018, 12:30:38 AM] Registering accessory 'homebridge-gree-ac.GreeAC'
[6/20/2018, 12:30:38 AM] ---
[6/20/2018, 12:30:38 AM] Loading 3 accessories...
[6/20/2018, 12:30:38 AM] [Office AC] Initializing GreeAC accessory...
[6/20/2018, 12:30:38 AM] [BedRoom AC] Initializing GreeAC accessory...
[6/20/2018, 12:30:38 AM] [LivingRoom AC] Initializing GreeAC accessory...
Setup Payload:
X-HM://0023UVN1F9DE3
Scan this code with your HomeKit app on your iOS device to pair with
Homebridge:
6/20/2018, 12:30:38 AM] Homebridge is running on port 51826.
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[6/20/2018, 12:30:38 AM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 12:30:38 AM] [BedRoom AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 12:30:38 AM] [LivingRoom AC] Connecting on Office with ip
address <IP_ADDRESS>[7000] debug=false: SUCCESS
internal/crypto/cipher.js:175
const ret = this._handle.final();
                       ^

Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad
decrypt
at Decipheriv.final (internal/crypto/cipher.js:175:28)

at Object.decrypt

(/Users/rnglad/node_modules/homebridge-gree-ac/app/encryptionService.js:21:56)
at Device._handleResponse

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:149:40)
at Socket.Device.socket.on

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:50:51)
at Socket.emit (events.js:187:15)

at UDP.onMessage [as onmessage] (dgram.js:673:8)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Tue, Jun 19, 2018 at 11:41 PM duculete<EMAIL_ADDRESS>wrote:

that is an invalid config. GreeAC is the name of the accessory (this is
telling Homebridge witch plugin to use), so it should be the same for all
the "instances". value of "name" field will appear also on Home app on your
iPhone (but you can can rename it on your Iphone, later).
The only thing that differentiate accessories is the "name" key". Use this
configuration:
"accessories": [
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "Office AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/office/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "BedRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/bedroom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "LivingRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/LivingRoom/temperature"
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398538272,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbNgJHN8zm0-oQfPhNRQwGD6JRisyks5t-WHzgaJpZM4UqbYK
.

Hello,
Can you try with one accessory defined? First configure ip of the first AC, restart Homebridge and test. Next stop homebridge, and test for the ip of the second AC. Same for the last AC device.
Thanks,

Ok. I will try and tell you how it goes. Plus, I see, that you’ve published a new version of the plugin.
Wish I could code like you!
On Jun 20, 2018, at 11:54, duculete<EMAIL_ADDRESS>wrote:
He .
Hello,
Can you try with one accessory defined? First configure ip of the first AC, restart Homebridge and test. Next stop homebridge, and test for the ip of the second AC. Same for the last AC device.
Thanks,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

And one more little thing (just to mention)
If i turn off and on the AC with remote. It the description it says right, but the icon is wrong
On Jun 20, 2018, at 11:54, duculete<EMAIL_ADDRESS>wrote:
Hello,
Can you try with one accessory defined? First configure ip of the first AC, restart Homebridge and test. Next stop homebridge, and test for the ip of the second AC. Same for the last AC device.
Thanks,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Give it a few seconts, it will update the home app also.

Ok, i did a test by adding a "fake" AC but on the same IP. So now I have 2 AC in home app (but both will controll my home AC). It works ok for me, no crash. Can you test? Just take the /app/deviceFactory.js from this repo and replace your /app/deviceFactory.js (on your Mac or where you run Homebridge), put the configuration with 3 AC (valid ips), restart homebridge and try again.
thanks,

Hello,
now it works, but!!! It adds 3 devices with 3 names, but 1 IP
[6/20/2018, 11:11:37 PM] Homebridge is running on port 51826.
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[6/20/2018, 11:11:37 PM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 11:11:37 PM] [LivingRoom AC] Connecting on Office with ip
address <IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 11:11:37 PM] [BedRoom AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:47 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:47 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:47 PM] [BedRoom AC] Status updated on Office
On Wed, Jun 20, 2018 at 9:40 PM duculete<EMAIL_ADDRESS>wrote:

Ok, i did a test by adding a "fake" AC but on the same IP. So now I have 2
AC in home app (but both will controll my home AC). It works ok for me, no
crash. Can you test? Just take the /app/deviceFactory.js from this repo and
replace your /app/deviceFactory.js (on your Mac or where you run
Homebridge), put the configuration with 3 AC (valid ips), restart
homebridge and try again.
thanks,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398854316,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbPb8BqKMB3-5MIhoedK6Hz98FZX8ks5t-pcMgaJpZM4UqbYK
.

and my config is:
{
"bridge": {
"name": "Homebridge",
"username": "AA:25:5D:B3:AE:32",
"port": 51826,
"pin": "234-25-123"
},
"description": "My Home bridge",
"accessories": [
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "Office AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/office/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "LivingRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/LivingRoom/temperature"
},
{
"accessory": "GreeAC",
"host": "<IP_ADDRESS>",
"name": "BedRoom AC",
"debug": "false",
"updateInterval": 10000,
"mqttUrl": "mqtt://<IP_ADDRESS>",
"currentTempTopic": "home/BedRoom/temperature"
}
]
}
On Wed, Jun 20, 2018 at 11:14 PM Roman<EMAIL_ADDRESS>wrote:

Hello,
now it works, but!!! It adds 3 devices with 3 names, but 1 IP
[6/20/2018, 11:11:37 PM] Homebridge is running on port 51826.
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[GreeAC] New device registered: Office - <IP_ADDRESS>
[6/20/2018, 11:11:37 PM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 11:11:37 PM] [LivingRoom AC] Connecting on Office with ip
address <IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 11:11:37 PM] [BedRoom AC] Connecting on Office with ip
address <IP_ADDRESS>[7000] debug=false: SUCCESS
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:43 PM] [BedRoom AC] Status updated on Office
[6/20/2018, 11:12:47 PM] [Office AC] Status updated on Office
[6/20/2018, 11:12:47 PM] [LivingRoom AC] Status updated on Office
[6/20/2018, 11:12:47 PM] [BedRoom AC] Status updated on Office
On Wed, Jun 20, 2018 at 9:40 PM duculete<EMAIL_ADDRESS>wrote:

Ok, i did a test by adding a "fake" AC but on the same IP. So now I have
2 AC in home app (but both will controll my home AC). It works ok for me,
no crash. Can you test? Just take the /app/deviceFactory.js from this repo
and replace your /app/deviceFactory.js (on your Mac or where you run
Homebridge), put the configuration with 3 AC (valid ips), restart
homebridge and try again.
thanks,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398854316,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbPb8BqKMB3-5MIhoedK6Hz98FZX8ks5t-pcMgaJpZM4UqbYK
.

hmm, how about now?

Should i update the same file again?
On Thu, Jun 21, 2018 at 00:55 duculete<EMAIL_ADDRESS>wrote:

hmm, how about now?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398910437,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbLKGYyRXfWFU4Ws7Qytj2LyS_8Ptks5t-sTrgaJpZM4UqbYK
.

I have updated the same file, that's the error it gave me:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:61
print("GREEAC:ip=%s", address);
^
ReferenceError: print is not defined
at Socket.socket.bind

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:61:3)
at Object.onceWrapper (events.js:273:13)

at Socket.emit (events.js:182:13)

at startListening (dgram.js:171:10)

at _handle.lookup (dgram.js:289:7)

at process._tickCallback (internal/process/next_tick.js:63:19)

at Function.Module.runMain (internal/modules/cjs/loader.js:746:11)

at startup (internal/bootstrap/node.js:238:19)

at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Thu, Jun 21, 2018 at 12:59 AM Roman<EMAIL_ADDRESS>wrote:

Should i update the same file again?
On Thu, Jun 21, 2018 at 00:55 duculete<EMAIL_ADDRESS>wrote:

hmm, how about now?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398910437,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbLKGYyRXfWFU4Ws7Qytj2LyS_8Ptks5t-sTrgaJpZM4UqbYK
.

ups...forgot about that one....can you replace deviceFactory.js and test?

I did it! It started fine, but it finds and operates only the first
accessory in the list (in my case it is Office one), though it adds 3
devices to my HOME app, but the other two are always 'updating' and you
cannot operate them:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[6/21/2018, 1:10:40 AM] Homebridge is running on port 51826.
[GreeAC] New device registered: Office - <IP_ADDRESS>
[6/21/2018, 1:10:40 AM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/21/2018, 1:12:01 AM] [Office AC] Status updated on Office
[6/21/2018, 1:12:01 AM] [Office AC] Status updated on Office
[6/21/2018, 1:12:13 AM] [Office AC] Status updated on Office
On Thu, Jun 21, 2018 at 1:08 AM duculete<EMAIL_ADDRESS>wrote:

ups...forgot about that one....can you replace deviceFactory.js and test?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398913520,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbByCbun8K2YRNRy4UemaZcxRJ8cbks5t-sf1gaJpZM4UqbYK
.

Like so!
On Jun 21, 2018, at 01:08, duculete<EMAIL_ADDRESS>wrote:
ups...forgot about that one....can you replace deviceFactory.js and test?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hello,
I've seen you've updated the deviceFactory.js, so I updated it too and
here's what I got:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS>
[6/21/2018, 6:12:58 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[6/21/2018, 6:12:58 PM] [Office AC] Connecting on Office with ip address
<IP_ADDRESS>[7000] debug=false: SUCCESS
[6/21/2018, 6:14:06 PM] [Office AC] Status updated on Office
[6/21/2018, 6:14:06 PM] [Office AC] Status updated on Office
[6/21/2018, 6:14:09 PM] [Office AC] Status updated on Office
[6/21/2018, 6:14:10 PM] [Office AC] Status updated on Office

One device works fine, two other are constantly 'updating'
On Thu, Jun 21, 2018 at 1:15 AM Roman<EMAIL_ADDRESS>wrote:

[image: image1.jpeg]
Like so!
On Jun 21, 2018, at 01:08, duculete<EMAIL_ADDRESS>wrote:
ups...forgot about that one....can you replace deviceFactory.js and test?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-398913520,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbByCbun8K2YRNRy4UemaZcxRJ8cbks5t-sf1gaJpZM4UqbYK
.

Hello again,
Sorry for bothering you, it there nothing can be done?
Regards,
Roman
On Jun 21, 2018, at 01:08, duculete<EMAIL_ADDRESS>wrote:
ups...forgot about that one....can you replace deviceFactory.js and test?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hello,
Sorry for the delay. For the moment i have no time to work on this project but as soon as i get some spare time I will continue.

Thanks a lot.
It just seems to me, that now everything works correctly, it just connects to one device and doesn’t go to initiate the next.
Sorry for bothering you again.
Have a nice day.
On Jun 26, 2018, at 07:42, duculete<EMAIL_ADDRESS>wrote:
Hello,
Sorry for the delay. For the moment i have no time to work on this project but as soon as i get some spare time I will continue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

can you try?
replace index.js and deviceFactory.js and the restart homebridge

Hello,
Sorry, I’m away from my computer for a week. I will try at 3rd of july and write you asap

From: duculete<EMAIL_ADDRESS>Sent: Thursday, June 28, 2018 5:37:26 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details (#1)
can you try?
replace index.js and deviceFactory.js and the restart homebridge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-401078043, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AmcrbHpu4Y0PnCo75yvKl3DrVNO2jONoks5uBPg2gaJpZM4UqbYK.

Hello Again,
all the devices are added, but they all show as unavailable and then this
happens
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:35:55 PM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:35:55 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:35:55 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:35:55 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setTemp

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:261:14)
at GreeAC.identify

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:360:24)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:430:79)
at Accessory.emit (events.js:182:13)

at Accessory._identificationRequest

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128:10)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:80:14)
at Characteristic.Identify.emit (events.js:182:13)

at Characteristic.Identify.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Thu, Jun 28, 2018 at 7:52 PM R Roman<EMAIL_ADDRESS>wrote:

Hello,
Sorry, I’m away from my computer for a week. I will try at 3rd of july and
write you asap

From: duculete<EMAIL_ADDRESS>Sent: Thursday, June 28, 2018 5:37:26 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details (#1)
can you try?
replace index.js and deviceFactory.js and the restart homebridge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-401078043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHpu4Y0PnCo75yvKl3DrVNO2jONoks5uBPg2gaJpZM4UqbYK
.

then I turned on the ac and ran home bridge again
it showed me correct info from the ac that was turned on
and showed 2 other as turned off - I tried to turn them on from home app -
this happened:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:44:02 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:44:02 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:44:02 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:44:02 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:43 PM Roman<EMAIL_ADDRESS>wrote:

Hello Again,
all the devices are added, but they all show as unavailable and then this
happens
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:35:55 PM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:35:55 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:35:55 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:35:55 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setTemp

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:261:14)
at GreeAC.identify

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:360:24)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:430:79)
at Accessory.emit (events.js:182:13)

at Accessory._identificationRequest

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128:10)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:80:14)
at Characteristic.Identify.emit (events.js:182:13)

at Characteristic.Identify.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Thu, Jun 28, 2018 at 7:52 PM R Roman<EMAIL_ADDRESS>wrote:

Hello,
Sorry, I’m away from my computer for a week. I will try at 3rd of july
and write you asap

From: duculete<EMAIL_ADDRESS>Sent: Thursday, June 28, 2018 5:37:26 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details
(#1)
can you try?
replace index.js and deviceFactory.js and the restart homebridge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-401078043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHpu4Y0PnCo75yvKl3DrVNO2jONoks5uBPg2gaJpZM4UqbYK
.

Whenever i try to change anything from home app it terminates:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:47:03 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:47:03 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:47:03 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:47:03 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:46 PM Roman<EMAIL_ADDRESS>wrote:

then I turned on the ac and ran home bridge again
it showed me correct info from the ac that was turned on
and showed 2 other as turned off - I tried to turn them on from home app -
this happened:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:44:02 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:44:02 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:44:02 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:44:02 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:43 PM Roman<EMAIL_ADDRESS>wrote:

Hello Again,
all the devices are added, but they all show as unavailable and then this
happens
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:35:55 PM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:35:55 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:35:55 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:35:55 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setTemp

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:261:14)
at GreeAC.identify

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:360:24)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:430:79)
at Accessory.emit (events.js:182:13)

at Accessory._identificationRequest

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128:10)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:80:14)
at Characteristic.Identify.emit (events.js:182:13)

at Characteristic.Identify.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Thu, Jun 28, 2018 at 7:52 PM R Roman<EMAIL_ADDRESS>wrote:

Hello,
Sorry, I’m away from my computer for a week. I will try at 3rd of july
and write you asap

From: duculete<EMAIL_ADDRESS>Sent: Thursday, June 28, 2018 5:37:26 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details
(#1)
can you try?
replace index.js and deviceFactory.js and the restart homebridge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-401078043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHpu4Y0PnCo75yvKl3DrVNO2jONoks5uBPg2gaJpZM4UqbYK
.

tried to reinstall the plugin, the error remains, but there are some
strange thing happening
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 134-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/9/2018, 7:43:41 AM] Homebridge is running on port 51826.
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/9/2018, 7:43:41 AM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/9/2018, 7:43:41 AM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
you see, not all the acs are connected, previous time there were 3 of them,
then 1, now only two
On Wed, Jul 4, 2018 at 5:49 PM Roman<EMAIL_ADDRESS>wrote:

Whenever i try to change anything from home app it terminates:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:47:03 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:47:03 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:47:03 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:47:03 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:46 PM Roman<EMAIL_ADDRESS>wrote:

then I turned on the ac and ran home bridge again
it showed me correct info from the ac that was turned on
and showed 2 other as turned off - I tried to turn them on from home app

this happened:

Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:44:02 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:44:02 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:44:02 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:44:02 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:43 PM Roman<EMAIL_ADDRESS>wrote:

Hello Again,
all the devices are added, but they all show as unavailable and then
this happens
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:35:55 PM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:35:55 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:35:55 PM] [BedRoom AC] Connected to Bedroom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:35:55 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setTemp

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:261:14)
at GreeAC.identify

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:360:24)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:430:79)
at Accessory.emit (events.js:182:13)

at Accessory._identificationRequest

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128:10)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:80:14)
at Characteristic.Identify.emit (events.js:182:13)

at Characteristic.Identify.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Thu, Jun 28, 2018 at 7:52 PM R Roman<EMAIL_ADDRESS>wrote:

Hello,
Sorry, I’m away from my computer for a week. I will try at 3rd of july
and write you asap

From: duculete<EMAIL_ADDRESS>Sent: Thursday, June 28, 2018 5:37:26 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details
(#1)
can you try?
replace index.js and deviceFactory.js and the restart homebridge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-401078043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHpu4Y0PnCo75yvKl3DrVNO2jONoks5uBPg2gaJpZM4UqbYK
.

restarted it after writing you:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 134-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/9/2018, 7:45:49 AM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/9/2018, 7:45:49 AM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/9/2018, 7:45:49 AM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
On Mon, Jul 9, 2018 at 7:45 AM Roman<EMAIL_ADDRESS>wrote:

tried to reinstall the plugin, the error remains, but there are some
strange thing happening
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 134-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/9/2018, 7:43:41 AM] Homebridge is running on port 51826.
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/9/2018, 7:43:41 AM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/9/2018, 7:43:41 AM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
you see, not all the acs are connected, previous time there were 3 of
them, then 1, now only two
On Wed, Jul 4, 2018 at 5:49 PM Roman<EMAIL_ADDRESS>wrote:

Whenever i try to change anything from home app it terminates:
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:47:03 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:47:03 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:47:03 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:47:03 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:46 PM Roman<EMAIL_ADDRESS>wrote:

then I turned on the ac and ran home bridge again
it showed me correct info from the ac that was turned on
and showed 2 other as turned off - I tried to turn them on from home app

this happened:

Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:44:02 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:44:02 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:44:02 PM] [BedRoom AC] Connected to Bedroom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:44:02 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Wed, Jul 4, 2018 at 5:43 PM Roman<EMAIL_ADDRESS>wrote:

Hello Again,
all the devices are added, but they all show as unavailable and then
this happens
Or enter this code with your HomeKit app on your iOS device to pair
with Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:35:55 PM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:35:55 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:35:55 PM] [BedRoom AC] Connected to Bedroom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:35:55 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setTemp

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:261:14)
at GreeAC.identify

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:360:24)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:430:79)
at Accessory.emit (events.js:182:13)

at Accessory._identificationRequest

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128:10)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:80:14)
at Characteristic.Identify.emit (events.js:182:13)

at Characteristic.Identify.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Thu, Jun 28, 2018 at 7:52 PM R Roman<EMAIL_ADDRESS>wrote:

Hello,
Sorry, I’m away from my computer for a week. I will try at 3rd of july
and write you asap

From: duculete<EMAIL_ADDRESS>Sent: Thursday, June 28, 2018 5:37:26 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details
(#1)
can you try?
replace index.js and deviceFactory.js and the restart homebridge
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-401078043,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHpu4Y0PnCo75yvKl3DrVNO2jONoks5uBPg2gaJpZM4UqbYK
.

you mentioned that the errors remained - what are the errors?
What is the status of Home app accessories?

I wrote you 2 letters before:
It shows all three ACs, but always "updating", as soon as I try to do
something (like turn on or smth) it terminates the Homebridge
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/4/2018, 5:47:03 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/4/2018, 5:47:03 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/4/2018, 5:47:03 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/4/2018, 5:47:03 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:228:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:216:14)
at Device.setPower

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:248:14)
at GreeAC.setTargetTemperature

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:333:32)
at Characteristic.TargetTemperature.emit (events.js:182:13)

at Characteristic.TargetTemperature.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
at Bridge.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:871:22)
at Array.forEach (<anonymous>)

at Bridge.Accessory._handleSetCharacteristics

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:811:8)
at HAPServer.emit (events.js:182:13)

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
On Mon, Jul 9, 2018 at 11:10 AM duculete<EMAIL_ADDRESS>wrote:

you mentioned that the errors remained - what are the errors?
What is the status of Home app accessories?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403396403,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbB_NoBR1EVZ8Pt-FrJOvUH3l6HrDks5uExARgaJpZM4UqbYK
.

are you sure you are using the last code (deviceFactory.js)? i don't see any messages like:
init deviceFactory on host ...

I'll try do uninstall and then install again
On Mon, Jul 9, 2018 at 11:19 AM duculete<EMAIL_ADDRESS>wrote:

are you sure you are using the last code (deviceFactory.js)? i don't see
any messages like:
init deviceFactory on host ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403398585,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbFPS06sgEDQWh2TYZDBlqlMtpZXgks5uExH7gaJpZM4UqbYK
.

Hello there,
now it seems a bit more interesting, though I got error "cannot add this
accessory" (i'll figure out why), but terminal looks much more promising
right now
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/9/2018, 6:42:28 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/9/2018, 6:42:29 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/9/2018, 6:42:29 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/9/2018, 6:42:29 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
On Mon, Jul 9, 2018 at 11:22 AM Roman<EMAIL_ADDRESS>wrote:

I'll try do uninstall and then install again
On Mon, Jul 9, 2018 at 11:19 AM duculete<EMAIL_ADDRESS>wrote:

are you sure you are using the last code (deviceFactory.js)? i don't see
any messages like:
init deviceFactory on host ...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403398585,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbFPS06sgEDQWh2TYZDBlqlMtpZXgks5uExH7gaJpZM4UqbYK
.

You get the error on home app on iphone? Try to stop homebridge, remove persistent and accesories folders from homebridgehome folder  and restart homebridge.

Hello again,
here's it, it gave me the code and added a bridge, but as soon as the
devices got to 'updating'
it crashed:
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/9/2018, 7:06:07 PM] Homebridge is running on port 51826.
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/9/2018, 7:06:07 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/9/2018, 7:06:07 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/9/2018, 7:06:07 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:229
_sendRequest (message, address = that.device.address, port =

that.device.port) {
                                 ^

ReferenceError: that is not defined
at Device._sendRequest

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:229:38)
at Device._sendCommand

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:217:14)
at Device.setTemp

(/Users/rnglad/node_modules/homebridge-gree-ac/app/deviceFactory.js:262:14)
at GreeAC.identify

(/Users/rnglad/node_modules/homebridge-gree-ac/index.js:360:24)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/lib/server.js:430:79)
at Accessory.emit (events.js:182:13)

at Accessory._identificationRequest

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:128:10)
at Accessory.<anonymous>

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:80:14)
at Characteristic.Identify.emit (events.js:182:13)

at Characteristic.Identify.Characteristic.setValue

(/Users/rnglad/.npm-global/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:320:10)
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
I've started it homebridge again and now no errors, and it shows me if the
AC is on or off and what it is doing 'cooling to 23', but it doesn't do
anything and here's the log after i pressed all the buttons (nothing)
Or enter this code with your HomeKit app on your iOS device to pair with
Homebridge:
┌────────────┐

│ 234-25-123 │

└────────────┘

[GreeAC]: connecting to <IP_ADDRESS> [using source port 8136]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8054]
[GreeAC]: connecting to <IP_ADDRESS> [using source port 8253]
[7/9/2018, 7:07:40 PM] Homebridge is running on port 51826.
[GreeAC] New device added: LivingRoom - <IP_ADDRESS>
[GreeAC] New device added: Bedroom - <IP_ADDRESS>
[GreeAC] New device added: Office - <IP_ADDRESS>
[GreeAC] device is bound: Office - St2Vw5Yz8Bc1Ef4H
[7/9/2018, 7:07:41 PM] [Office AC] Connected to Office with IP address
<IP_ADDRESS>
[GreeAC] device is bound: LivingRoom - Rs9Uv2Xy5Ab8De1h
[7/9/2018, 7:07:41 PM] [LivingRoom AC] Connected to LivingRoom with IP
address <IP_ADDRESS>
[GreeAC] device is bound: Bedroom - d4Fg7Ij0Lm3Op6Rs
[7/9/2018, 7:07:41 PM] [BedRoom AC] Connected to Bedroom with IP address
<IP_ADDRESS>
On Mon, Jul 9, 2018 at 6:52 PM duculete<EMAIL_ADDRESS>wrote:

You get the error on home app on iphone? Try to stop homebridge, remove
persistent and accesories folders from homebridgehome folder and restart
homebridge.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403527247,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbKvkdvI9uYrukOgEw1WEtKsBlEmCks5uE3wigaJpZM4UqbYK
.

Hello,
I uploaded the code that works for me (from my homebridge instance). Can you test now?

Wow,
It is perfect, it really works!!!
I’m thrilled!
Thank you so much!!!
It is awesome!
And I just wonder why is this icon always shows 16? Or is it just that kind of icon?
On Jul 9, 2018, at 19:37, duculete<EMAIL_ADDRESS>wrote:
Hello,
I uploaded the code that works for me (from my homebridge instance). Can you test now?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

what icon? can you be more specific?

In the home app it shows me a square icon of AC, the on the left corner it always shows 16 degrees
And i see, that yours shows 22!
Maybe cause you have this setup that shows the temperature in the room

From: duculete<EMAIL_ADDRESS>Sent: Monday, July 9, 2018 7:55:37 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details (#1)
what icon? can you be more specific?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403546804, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AmcrbOJfHgGSWod92m9srxOVn1UiVyJDks5uE4sJgaJpZM4UqbYK.

you sent me pictures of your Home app and on the conditioner you have blue
or green circle with current temperature, have you installed some specific
hardware for that or is your Gree conditioner checks and sends this info
automatically? Cause mine just shows me 16 all the time
Regards,
Roman
On Mon, Jul 9, 2018 at 8:01 PM R Roman<EMAIL_ADDRESS>wrote:

In the home app it shows me a square icon of AC, the on the left corner it
always shows 16 degrees
And i see, that yours shows 22!
Maybe cause you have this setup that shows the temperature in the room

From: duculete<EMAIL_ADDRESS>Sent: Monday, July 9, 2018 7:55:37 PM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details (#1)
what icon? can you be more specific?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403546804,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbOJfHgGSWod92m9srxOVn1UiVyJDks5uE4sJgaJpZM4UqbYK
.

Did you started? Long press on icon/mode/cool.
Do you have mqtt topic with room temperature ?

Hello again,
thanks again, everything works. I've been testing everything on my mac
(maybe not everything was correctly setup for mosquitto server), now I'll
transfer everything on raspberry pi for everyday work.
About the same API, as most of the sources say that they are the same:
https://github.com/tomikaa87/gree-remote/issues/4
On Tue, Jul 10, 2018 at 7:24 AM duculete<EMAIL_ADDRESS>wrote:

Also are you sure that your AC type is exposing same api as Gree AC?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-403696050,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHPCHnzE-uSi4DCPE07oYNxbdTX_ks5uFCx9gaJpZM4UqbYK
.

Cool! Enjoy!

Hello again,
Sorry for bothering you again, just to let you know:
Everything works fine after I repeated the setup on my RaspberryPi, so it it superb, you just have to update the code, because if you enter npm I home....-Gree...  it installs previous version, which is not that perfect.
What I am doing right now is trying to find, what is different between Gree and C&H ACs, because mine is not updating the information about room temperature as yours does
You see, it is always 16degrees. And I just cant understand why, as this guy writes, Gree and Cooper&Hunter are the same:
https://github.com/alexiade/gree-remote

On Jul 10, 2018, at 09:54, duculete<EMAIL_ADDRESS>wrote:
Cool! Enjoy!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hello,
I will update the code on npm after few days of (you) testing :D.
What is your configuration in homebridge and how does your temperature sensor write data to mqtt topic?

Hello again,
my config is pretty simple, now it is only mosquitto, homebridge and your
plugin on my raspberry pi and that's all. I actually thought, that your
pluging enables your AC to write temperature data to mqtt is it not? Should
I install something else for that?
Regards.
Roman
On Wed, Jul 11, 2018 at 6:20 AM duculete<EMAIL_ADDRESS>wrote:

Hello,
I will update the code on npm after few days of (you) testing :D.
What is your configuration in homebridge and how does your temperature
sensor write data to mqtt topic?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-404032358,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AmcrbHebijY8C05Z83bIOn0cBq3igM-Iks5uFW7ugaJpZM4UqbYK
.

You need to read again the description of the plugin. My plugin reads room temperature from mqtt topic...

Sorry,
I am new to this, i got it, i will now try work with sending temp to mqtt.
Is your AC writes it without added hardware or did you ad a sensor for indoor temperature?

From: duculete<EMAIL_ADDRESS>Sent: Wednesday, July 11, 2018 9:49:16 AM
To: duculete/homebridge-gree-ac
Cc: rnglad; Author
Subject: Re: [duculete/homebridge-gree-ac] Please need more details (#1)
You need to read again the description of the plugin. My plugin reads room temperature from mqtt topic...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/duculete/homebridge-gree-ac/issues/1#issuecomment-404063598, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AmcrbBLfY2sN6LWg5iEzzZKy8kkMqSjtks5uFZ_sgaJpZM4UqbYK.

I explained it in my first comment 25 days ago. Look at the begining of this discussion...

Dear Duculete,
Thank you so much, you moved me a bit forward,
I read some topics, played with parts and now i have dht22 setup to measure the temperature
Thanks a lot!!!
On Jul 11, 2018, at 11:46, duculete<EMAIL_ADDRESS>wrote:
I explained it in my first comment 25 days ago. Look at the begining of this discussion...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Hello again,
Just to let you know that all 3 ACs work fine and all 3 sensors are read perfectly!
You’ve done a great thing!
I’ve just increased the max temp to 35, cause we sometimes have it
Thanks.
Roman
On Jul 11, 2018, at 11:46, duculete<EMAIL_ADDRESS>wrote:
I explained it in my first comment 25 days ago. Look at the begining of this discussion...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

On Jul 11, 2018, at 11:46, duculete<EMAIL_ADDRESS>wrote:
I explained it in my first comment 25 days ago. Look at the begining of this discussion...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Thanks for the update! Enjoy!