This plugin automatically detects Gree AC's and add them as accessories with the following features:
{
"platforms": [
{
"name": "Gree ACs",
// Set this to the router's broadcast address
// in order to can scan for ACs
"broadcastAddress": "192.168.1.255",
// If is a 3-Speed unit, set this to true
"threeSpeedUnit": true,
"platform": "GreeACImplementationPlugin",
"coolingMinTemp": 16,
"coolingMaxTemp": 30,
"heatingMinTemp": 16,
"heatingMaxTemp": 30,
"defaultCurrentTemp": 45,
"dhtService": "http://localhost:55555"
}
]
}
In order to can get the humidity and temperature, you need a separate service to get that info (ONLY FOR RPi)
const sensor = require('node-dht-sensor');
const express = require('express');
const app = express();
app.get('/', (_, res) => {
sensor.read(11, 17, function (err, temperature, humidity) {
if (!err) {
res.status(200).json({
temperature,
humidity
});
} else {
res.status(500).json({
error: err.message,
code: err.code ?? 500
});
}
});
});
app.listen(55555, 'localhost', () => {
console.log('Service Started');
});
Based on tomikaa87
research on https://github.com/tomikaa87/gree-remote
using a NodeJS API implementation made by me at https://github.com/RaresAil/gree-ac-node-api