T-REX-XP / cooper_hunter-hvac-mqtt-bridge

MQTT Bridge for controlling Cooper&Hunter smart air conditioners, e.g. with Home Assistant
GNU General Public License v3.0
7 stars 4 forks source link

Not work with 2 AC. #5

Open gradiumyolla opened 4 years ago

gradiumyolla commented 4 years ago

In Hass.io addon mode don't work configuration with more one AC. Some times start only one instance, in some cases both is errored.

[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
audited 73 packages in 2.132s
found 2 vulnerabilities (1 low, 1 high)
  run 'npm audit fix' to fix them, or 'npm audit' for details
Running instance 0 for 192.168.1.37
npx: installed 186 in 37.213s
Running instance 1 for 192.168.1.59
npx: installed 186 in 12.934s
npx: installed 186 in 13.389s
[TAILING] Tailing last 15 lines for [/HVAC_/] process (change the value with --lines option)
/root/.pm2/logs/HVAC-0-error.log last 15 lines:
/root/.pm2/logs/HVAC-0-out.log last 15 lines:
0|HVAC_0   | brocker: mqtt://192.168.1.100
0|HVAC_0   | [MQTT] Connected to broker on mqtt://192.168.1.100 as "MQTT"
0|HVAC_0   | [UDP] Connected to device at 192.168.1.37
0|HVAC_0   | getSecKey----mac:*********----key:*********
0|HVAC_0   | [UDP] New device registered: *********
0|HVAC_0   | --in _requestDeviceStatus
0|HVAC_0   | Connected to tcp port
0|HVAC_0   | received status msg.

/root/.pm2/logs/HVAC-1-out.log last 15 lines:
/root/.pm2/logs/HVAC-1-error.log last 15 lines:
1|HVAC_1   |   code: 'MODULE_NOT_FOUND',
1|HVAC_1   |   requireStack: []
1|HVAC_1   | }
1|HVAC_1   | internal/modules/cjs/loader.js:968
1|HVAC_1   |   throw err;
1|HVAC_1   |   ^
1|HVAC_1   | 
1|HVAC_1   | Error: Cannot find module '/root/.npm/_npx/213/lib/node_modules/pm2/lib/ProcessContainerFork.js'
1|HVAC_1   |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
1|HVAC_1   |     at Function.Module._load (internal/modules/cjs/loader.js:841:27)
1|HVAC_1   |     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
1|HVAC_1   |     at internal/main/run_main_module.js:17:47 {
1|HVAC_1   |   code: 'MODULE_NOT_FOUND',
1|HVAC_1   |   requireStack: []
1|HVAC_1   | }

0|HVAC_0  | --Get status from AC 
0|HVAC_0  | --in _requestDeviceStatus

Current config:

interval: 60
name: LivingRoom AC
mqtt:
  broker_url: 'mqtt://192.168.1.100'
  username: *****
  password: *****
devices:
  - name: ACHall
    hvac_host: 192.168.1.37
    mqtt_topic_prefix: homeassistant/climate/ac_hall
  - name: ACChildroom
    hvac_host: 192.168.1.59
    mqtt_topic_prefix: homeassistant/climate/ac_childroom
ki0ki0 commented 3 years ago

@gradiumyolla Check out my new integration homeeasy_ha for this type of HVAC unit. Works fine with two units(2 integrations required)

ki0ki0 commented 3 years ago

There are new people coming from this thread, so I'll post some updates here. I've published new integration homeeasy_ha_local, take a look at the benefits it provides.

T-REX-XP commented 3 years ago

Thank you! Good job!