Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart) Topic is solved

Moderator: leecollings

jannl
Posts: 870
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.1.x
Location: Geleen
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jannl »

Booked a little progress with not binding.

I updated the file app/device_manager.js.
Around line 109, i updated:

Code: Select all

const deviceId = message.cid;
to

Code: Select all

const deviceId = message.cid || message.mac;
This at least connects and show MQTT messages coming in.
jannl
Posts: 870
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.1.x
Location: Geleen
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jannl »

Everything is working now. Repository had been updated.
Knight
Posts: 50
Joined: Thursday 12 February 2015 22:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Knight »

I'm stuck and got this error....... I dont know how to solve this.
(Rasp 3B+)
(Domoticz updated)

I got the error when i write "npm start" in this folder. pi/home/ewpe-smart-mqtt/ I found new device but then this.

Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
at Decipheriv.final (internal/crypto/cipher.js:172:29)
at decrypt (/home/pi/ewpe-smart-mqtt/app/encryptor.js:15:48)
at Connection.handleResponse (/home/pi/ewpe-smart-mqtt/app/connection.js:110:26)
at Socket.emit (events.js:314:20)
at UDP.onMessage [as onmessage] (dgram.js:921:8) {
library: 'digital envelope routines',
function: 'EVP_DecryptFinal_ex',
reason: 'bad decrypt',
code: 'ERR_OSSL_EVP_BAD_DECRYPT'
}
npm ERR! code 1
npm ERR! path /home/pi/ewpe-smart-mqtt
npm ERR! command failed
npm ERR! command sh -c node index.js

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2023-01-09T22_35_32_087Z-debug.log
Knight
Posts: 50
Joined: Thursday 12 February 2015 22:59
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Knight »

when i run npm start i get a connection to the Gree Amber 35 and it show a Key.. do I need to take that key and change the encpryp file?
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Martial »

Bonjour,
J'ai fait exactement ce qui est décrit à partir du wiki et ça marche au petit poil, sur un climatiseur de marque HEIWA (dont les composants et, ce qui nous intéresse le plus, la carte réseau, sont du GREE).
Mon modèle HEIWA est un PREMIUM HYOKO 2 R32 3,5 kW ref HMIP2-35W-V1 mais je pense que toute la gamme doit fonctionner ainsi.

Encore un cloud d'évité et des données personnelles détenues par les chinois (je me dis que si un jour on ferme les liaisons internet avec la Chine, va pas rester grand chose d'opérationnel chez certains)!

Un grand merci à tous pour le bon boulot réalisé.
Martial
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Martial »

Bonjour,
J'ai été un peu (trop?) optimiste dans mon post précédent.
Si globalement cela fonctionne parfaitement, certains détails (??) ne marchent pas.
Il y a encore un peu de boulot.
Si quelqu'un passe ici et accepte de converser sur le sujet, merci d'avance de se faire connaitre.
User avatar
jvdz
Posts: 2476
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jvdz »

@Martial, could you please post in English?
User avatar
Xenomes
Posts: 456
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2026.3
Location: Netherlands
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Xenomes »

You can try this one: https://github.com/Xenomes/ewpe-smart-mqtt. Perhaps the modification will also work for you.
HP T630 (256GB SSD/8GB Mem) - Ubuntu 24.04.4 LTS (64Bit) - Domoticz 2026.3 (Docker)
Tinytuya
jannl
Posts: 870
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.1.x
Location: Geleen
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jannl »

Thx, that solved my issue
Martial
Posts: 31
Joined: Saturday 11 March 2017 18:44
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Martial »

jvdz wrote: Thursday 07 December 2023 12:17 @Martial, could you please post in English?
Sorry,
If "google translate is good for us to read english posts, it's good for others to read french post.

Good morning,
I did exactly what is described on the wiki and it works fine, on a HEIWA brand air conditioner (whose components and, what interests us most, the network card, are GREE).
My HEIWA model is a PREMIUM HYOKO 2 R32 3.5 kW ref HMIP2-35W-V1 but I think the whole range should work like this.

Another avoided cloud and personal data held by the Chinese (I tell myself that if one day we close internet connections with China, not much will remain operational for some)!

A big thank you to everyone for the good work done.
Martial

Good morning,
I was a little (too?) optimistic in my previous post.
If overall it works perfectly, certain details (??) do not work.
There's still a little work to do.
If anyone comes here and agrees to chat on the subject, thank you in advance for making themselves known.
Mozekam
Posts: 12
Joined: Tuesday 23 December 2025 8:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Mozekam »

Hello,
I see no one has been here for a while :) Has anyone experienced that when the air conditioner goes offline in the Ewpe Smart app, the controls don't work in Domoticz?
jannl
Posts: 870
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.1.x
Location: Geleen
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jannl »

Nope, seems to work better in Domoticz compared to the app. I have 2 tosot airco's and sometimes after a reboot it is a hassle to get it working again.
Mozekam
Posts: 12
Joined: Tuesday 23 December 2025 8:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Mozekam »

Hmm, I have an interesting problem: sometimes the controls fail both in the app and in Domoticz. I then have to re-add the device in the app, and then it starts working. For the controls in Domoticz to work properly, do I need an active device in the app?
jannl
Posts: 870
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.1.x
Location: Geleen
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jannl »

The thing I do in case of problems is:
systemctl status <ewp servicename>, to check of the ip of the airco(s) is/are found. A lot of time only one is found. stopping and starting the service (with systemctl stop/start <service name> and checking via status solves that. After the status is ok, I disable and enable the hardware in Domoticz. After that is works like a charm. Never had to recreate devices. And more never had to recreate devices of any hardware.

I am planning to write a script for that, but because it does not happen a lot, it has no priority.

I am running a beta in docker of a few weeks ago. The ewpe service does run outside any docker.
Mozekam
Posts: 12
Joined: Tuesday 23 December 2025 8:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Mozekam »

Generally, the old devices stay in Domoticz. I only need to re-add the air conditioner in the EWPE app. Do I understand correctly that control in Domoticz is via a Chinese server, thanks to the EWPE bridge?
jannl
Posts: 870
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2026.1.x
Location: Geleen
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by jannl »

As far as I know it is a direct connection to the IP's of the airco, via mqtt. Also read the github links.
Below my help at a new install. Hope it is readable, comes from Excel.

Code: Select all

	
sudo git clone https://github.com/stas-demydiuk/ewpe-smart-mqtt /opt/ewpe-smart-mqtt	
sudo git clone https://github.com/Xenomes/ewpe-smart-mqtt /opt/ewpe-xenomes	
sudo chown -R pi:pi /opt/ewpe-smart-mqtt	Stolen from zigbee2mqtt
cd  /opt/ewpe-smart-mqtt	
npm install (Gives vulnerability??????)	
In app/device_manager.js, regel 109: message.cid || message.mac	Not sure if this is needed
npm start	
	
Below stolen from zigbee2mqtt	
Just to autostart after a reboot	
sudo nano /etc/systemd/system/ewpe-mqtt.service	https://github.com/Xenomes/ewpe-smart-mqtt
[Unit]	
Description=ewpe-mqtt	
After=network.target	
	
[Service]	
ExecStart=/usr/bin/npm start	
WorkingDirectory=/opt/ewpe-smart-mqtt	
StandardOutput=inherit	
StandardError=inherit	
Restart=always	
User=pi	
	
[Install]	
WantedBy=multi-user.target	
	
Save	
# Start ewpe-mqtt	
sudo systemctl start ewpe-mqtt	After a reboot, automatic starting doesn't seem to be working properly. Manual starting with the previous command works fine; let's see if both become active. Apparently, stopping and starting multiple times is sometimes necessary, then turn the hardware in Domoticz off and on...
	If the power to the air conditioning has been off, send a message via the app as well.
# Show status	
systemctl status ewpe-mqtt.service	
Enable automtic start	
sudo systemctl enable ewpe-mqtt.service	
	
https://github.com/stas-demydiuk/domoticz-ewpe-smart-mqtt-plugin	
	
	
Sometimes it helps turning it on/off with the gree app.	

Mozekam
Posts: 12
Joined: Tuesday 23 December 2025 8:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Mozekam »

ok, thank you very much for your explanation and help!
Mozekam
Posts: 12
Joined: Tuesday 23 December 2025 8:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Help with - EwpeSmart Air Conditioners via MQTT (Gree Smart)

Post by Mozekam »

Hello again,
I've noticed some improvement in performance. Since I'm not using the EWPE app (I use Imperihome via VPN and control remotely via local IP addresses), I decided to completely block network traffic "outside" the air conditioner's Wi-Fi module in my firewall. I haven't noticed the problems I had before for a long time. I even tested what happens if the power goes out and then turns back on – control returns within a few moments. It seems that the communication problems are caused by excessive load on the air conditioner's Wi-Fi module.
Post Reply