Samsung AC

would be really nice to use the MIM-H04 too. Smart Things is soo laggy, slow and unreliable.

1 Like

Helló!

Do you have got a working solution for older AC’s with port 2878?

Köszi

hello,
followed your guide, installed debian 8.11 netinstall on a VM and executed:
npm install -g homebridge-plugin-samsung-air-conditioner
and
chown -R root /usr/local/lib/node_modules/
chmod -R 775 /usr/local/lib/node_modules/

but I get these error messages and can’t install the homebridge plugin:

root@debian:/home/gyik# npm install -g homebridge-plugin-samsung-air-conditioner
npm WARN engine [email protected]: wanted: {“node”:“>=10.20.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>= 10.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>=10”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>=6.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})

[email protected] install /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-k eepalive/node_modules/ref-napi/node_modules/node-addon-api
node-gyp rebuild

gyp: binding.gyp not found (cwd: /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net -keepalive/node_modules/ref-napi/node_modules/node-addon-api) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.16.0-6-amd64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modu les/ref-napi/node_modules/node-addon-api
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-addon-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-addon-api
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-6-amd64
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “homebridge-plugin-samsung-air-conditioner”
npm ERR! cwd /home/gyik
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN engine [email protected]: wanted: {“node”:“>=6.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>= 6.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})

[email protected] install /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepali ve/node_modules/ffi-napi/node_modules/ref-napi
node-gyp-build

/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gyik/npm-debug.log
npm ERR! not ok code 0
root@debian:/home/gyik#
root@debian:/home/gyik#
root@debian:/home/gyik# chown -R root:325325 /usr/local/lib/node_modules/
root@debian:/home/gyik# chmod -R 775 /usr/local/lib/node_modules/
root@debian:/home/gyik# npm install -g homebridge-plugin-samsung-air-conditioner
npm WARN engine [email protected]: wanted: {“node”:“>=10.20.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>=10”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>= 10.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>=6.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>= 6.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})
npm WARN engine [email protected]: wanted: {“node”:“>=6.0”} (current: {“node”:“0.10.29”,“npm”:“1.4.21”})

[email protected] install /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modu les/ref-napi/node_modules/node-addon-api
node-gyp rebuild

gyp: binding.gyp not found (cwd: /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_mo dules/ref-napi/node_modules/node-addon-api) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess.handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.16.0-6-amd64
gyp ERR! command “nodejs” “/usr/bin/node-gyp” “rebuild”
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ref-napi/node
modules/node-addon-api
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

[email protected] install /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ff i-napi/node_modules/ref-napi
node-gyp-build

/usr/bin/env: node: No such file or directory
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! Error: ENOENT, chown ‘/usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modu les/ffi-napi/node_modules/debug/node_modules/ms/index.js’
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Linux 3.16.0-6-amd64
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “homebridge-plugin-samsung-air-conditioner”
npm ERR! cwd /home/gyik
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ffi-napi/node _modules/debug/node_modules/ms/index.js
npm ERR! fstream_path /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ffi-n api/node_modules/debug/node_modules/ms/index.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chown
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:305:19
npm ERR! fstream_stack /usr/lib/nodejs/graceful-fs/polyfills.js:143:7
npm ERR! fstream_stack Object.oncomplete (evalmachine.:107:15)
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-addon-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls node-addon-api
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.16.0-6-amd64
npm ERR! command “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “homebridge-plugin-samsung-air-conditioner”
npm ERR! cwd /home/gyik
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gyik/npm-debug.log
npm ERR! not ok code 0

npm-debug.log:

1983 error Error: ENOENT, chown '/usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ffi-napi/node_m$
1984 error If you need help, you may report this entire log,
1984 error including the npm and node versions, at:
1984 error http://github.com/npm/npm/issues
1985 error System Linux 3.16.0-6-amd64
1986 error command “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g” “homebridge-plugin-samsung-air-conditioner”
1987 error cwd /home/gyik
1988 error node -v v0.10.29
1989 error npm -v 1.4.21
1990 error path /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ffi-napi/node_modules/debug/node$
1991 error fstream_path /usr/local/lib/node_modules/homebridge-plugin-samsung-air-conditioner/node_modules/net-keepalive/node_modules/ffi-napi/node_modules/de$
1992 error fstream_type File
1993 error fstream_class FileWriter
1994 error fstream_finish_call chown
1995 error code ENOENT
1996 error errno 34
1997 error fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:305:19
1997 error fstream_stack /usr/lib/nodejs/graceful-fs/polyfills.js:143:7
1997 error fstream_stack Object.oncomplete (evalmachine.:107:15)
1998 verbose exit [ 34, true ]

Also tried with an Ubuntu 1604 container, and a 2004 VM, but unfortunately with the same result.

Do you or anyone got an idea to fix this?

Thank you

Have you tried installing older node versions like 10 to 12? i think that’s what i must’ve used when i first tried it

sorry, i’m a noob. can you pls specify what command should i run? thanks

I have an older samsung AC using port 2878, which I found @peterbuga guide helpful. I too was having old SSL certificate errors and the only way I was able to resolve was as below. NOTE: I tried installing Debian, but was met with a bunch of issues getting NODEJS installed etc…

Here are some additional details on what I did if it helps others @gyiku @Nick398 @andriuskr @gyik

  1. I did this using Ubuntu v20 (although I think other versions will work too)
  2. Given the SSL errors and issues I faced I completely removed NODEJS from uBuntu with the following command
sudo apt-get purge nodejs
  1. I reinstalled NODEJS using 2 commands below
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
  1. After that I was able to run the below 2 commands and get the token without issues (despite some error warnings for the plugin install).
npm install -g homebridge-plugin-samsung-air-conditioner
homebridge-samsung-ac-get-token <your ac's ip address>

Hopefully this helps someone else. Best of Luck!

FWIW, this guide was helpful to get me going as well: Guide: Samsung A/C to Home Assistant – Creating Smart Home

2 Likes

Man, you rock. Really.
Finally I was able to install the homebridge plugin.
Although got some permission issues, but

npm install -g homebridge-plugin-samsung-air-conditioner --unsafe

solved that, then faced gyp ERR! stack Error: not found: make.
Needed to run

apt-get install -y build-essential

and homebridge plugin was installed.
Now the family is sleeping, but can’t wait for tomorrow to give a try to get those damn tokens =)

Happy to confirm, it WORX!

Got the token, but struggling to create a thermostat card that works and reads out the current temperature correctly.
I have an entity came up after adding these to the config.yaml:

climate:
  - platform: climate_ip
    config_file: 'samsung_2878.yaml'
    ip_address: '192.168.1.33'
    token: 'c5c29abd-899d-40c8-9e7a-xxxxxxxxxxxxxxxx'
    cert: 'ac14k_m.pem' #set as '' to skip certificate verification
    mac: 'bc:8c:cd:xx:xx:xx'
    name: xy

but with these added, the Thermostat Card just not showing the actual temp:

However I have 3 of these 2878 units and with the exact same settings like above one thermostat is working, but the other two does not.
Any idea?

If you have a working setup with Lovelace simple thermostat card https://github.com/nervetattoo/simple-thermostat could you please share that part of your config file?

Thank you

I need some help with getting the token can someone has the patience to guide me? pm?

I keep getting this message:

Traceback (most recent call last):
  File "C:\Users\zilbe\Downloads\actest.py", line 1, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

any advice?

Hi, I’ve been struggeling with getting the token for a while my self, and what I figured out is the script in the original thread does not work.
I followed this guide and got my token: homebridge-plugin-samsung-air-conditioner - npm

this is for the 2878 port version, but it’s a link there to 8888 also.

As for getting the integration up and running, how do I actually control it? Pretty new to HA, so I really don’t understand how the integrations actually work.

Anyone know if it is possible to get power consumption info from this integration?

Bump? :smiley:
No one got power concumption from HP?

Not sure if this is what you are asking since I have not gone back and read through all the other posts but here it is anyways.
I have a couple of Samsung minisplits. One is a single head and the other is a triple (only 2 heads connected.) I have the single head (wall head) connected to SmartThings and one wall unit of the other connected to SmartThings. The main unit on the multi-head unit is a console and does not connect to SmartThings. It has a wired thermostat that displays the energy usage of the heat pump. The SmartThings connected head (same outside unit) does not display power consumption, only time running, so it is rather useless. In order for me to utilize the power usage for the multi-head unit I have to manually read it off the wall thermostat. The single head unit does report the power usage through SmartThings and I can display it in HA.


I can also display the current usage although there does appear to be quite a delay at times
image

Ah, my heat pump is not supported by smart things, but I have to use the shitty app SmartAirCondition… :frowning:

Hi

I have an Samsung WindFree AR12RXWXXCWKNEU and try all for get token, but without sucess…

someone can put the procedure for this AC model?

I’m windows and HA on raspberry Pi 4.

I’m use this metodo: Guide: Samsung A/C to Home Assistant – Creating Smart Home

and when I’m put command “python3 actest.py” give me this error:

How I can correct this?

best regards

This is a windfree AC, you won’t be able to get a token. There is only one solution if you want to control it from HA: use the Smartthings integration (or try using an IR blaster)

1 Like

Hi

I’m try use Smartthinks integration but HA give an error, after click on install.

How I can solve it?

If I remember correctly, I set up my Samsung Heat pump in SmartThings first and was able to control and monitor it from my phone using the SmartThings app. I then connected my SmartThings account to my HA setup. That gave me all the sensors and data in HA. I do remember having to use a Token of some kind for my heatpump setup. I can’t really remember the procedure as I was just learning HA and the heat pump/smartThings stuff. I do remember that it was not difficult but was also not very clear what I had to do. I just made sure I copied all the uasernames/passwords and tokens down so I had them available when I needed them.

I have 2 heat pump units (outside.) One is connected to an indoor head that supports smartThings. The other is a multisplit (2 indoor heads) On that unit I can only control one of the heads using SmartThings (only the wall unit supports SmartThings the other wall unit has a wired thermostat.) The other inside unit is the main unit and I have to manually get the power usage from the thermostat. I can’t program it using SmartThings either. I have to manually enter the programs for it on the thermostat. It makes it a real pain to use.

I don’t recall any issues actually installing the SmartThings integration into HA. I’m pretty sure I just followed these instructions

1 Like