Panasonic MirAIe integration

i am getting socket error since yesterday.

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] mosquitto.sh: executing…
[14:19:48] INFO: SSL is not enabled
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing…
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:19:48] INFO: Starting NGINX for authentication handling…
[14:19:48] INFO: Starting mosquitto MQTT broker…
1648975788: mosquitto version 1.6.12 starting
1648975788: |-- *** auth-plug: startup
[14:19:49] INFO: Successfully send discovery information to Home Assistant.
[14:19:49] INFO: Successfully send service information to the Supervisor.
1648975788: Config loaded from /etc/mosquitto/mosquitto.conf.
1648975788: Loading plugin: /usr/share/mosquitto/auth-plug.so
1648975788: ├── Username/password checking enabled.
1648975788: ├── TLS-PSK checking enabled.
1648975788: └── Extended authentication not enabled.
1648975788: Opening ipv4 listen socket on port 1883.
1648975788: Opening ipv6 listen socket on port 1883.
1648975788: Opening websockets listen socket on port 1884.
1648975788: Warning: Mosquitto should not be run as root/administrator.
1648975788: mosquitto version 1.6.12 running
1648975788: New connection from 127.0.0.1 on port 1883.
1648975788: Socket error on client , disconnecting.
1648975789: New connection from 172.30.32.1 on port 1883.
1648975789: New client connected from 172.30.32.1 as node-red-ha-miraie-ac-node (p2, c1, k60).
1648975790: New connection from 172.30.32.1 on port 1883.
{“result”: “ok”, “data”: {}}1648975790: New client connected from 172.30.32.1 as 6PliD2am6FoT70yG5iRj0R (p2, c1, k60, u’mqtt-user’).
1648975801: New connection from 172.30.32.2 on port 1883.
1648975801: Socket error on client , disconnecting.
1648975844: Client node-red-ha-miraie-ac-node disconnected.
1648975844: New connection from 172.30.32.1 on port 1883.
1648975844: New client connected from 172.30.32.1 as node-red-ha-miraie-ac-node (p2, c1, k60).
1648975921: New connection from 172.30.32.2 on port 1883.
1648975921: Socket error on client , disconnecting.
1648975970: Client node-red-ha-miraie-ac-node disconnected.
1648975970: New connection from 172.30.32.1 on port 1883.
1648975970: New client connected from 172.30.32.1 as node-red-ha-miraie-ac-node (p2, c1, k60).
1648976041: New connection from 172.30.32.2 on port 1883.
1648976041: Socket error on client , disconnecting.
1648976053: Socket error on client 6PliD2am6FoT70yG5iRj0R, disconnecting.
1648976065: New connection from 172.30.32.1 on port 1883.
1648976065: New client connected from 172.30.32.1 as 11NpJv8UYExgCIbVJyaYLa (p2, c1, k60, u’mqtt-user’)

Hey @safvan89, not entirely sure what that is about but please check

  • that you are using the latest version
  • that you don’t have more than one node connecting to the mqtt broker

Hope that helps!

hey @charutak, v1.1.1 has an input port that lets you fetch and update the device status. This with some kind of automation may help if you see a definite pattern around when this happens.

hi @milothomas i have hosted HA on windows 10 VM. presently i have esphome, mqtt broker and node-red as addons. installed mqtt broker and node red after seeing your post. so no other node making connection to broker. firewall turned off. initially it got connected but throwing this error after HA restart.

hey @safvan89, the node uses a fixed value as its mqtt client ID, so if you have multiple nodes at the same time, the broker may not like it.

Also, please see if you can connect to the broker using a client on your phone/pc to make sure that the setup is good.

You could also change the log level to DEBUG and see if there are any details that might help.

@milothomas hi, finally got it working. Hosted HA on old zotac mini pc and problem automatically got resolved.

That’s great, but any clues on what the issue was on the VM?

Hey, @milothomas I looked through the Node_RED code. Would you like to collaborate on building a HomeBridge plugin, and a native HA plugin based on your Node-RED implementation?

1 Like

Hey @milothomas

Awesome! Thank you very much. This was my first Node-Red integration and it worked smoothly.

Thanks a ton. Cheers!!

The app can show the power consumption of the AC. Is it possible to get this into home assistant as well?

1 Like

Hey, an update has been published. Sensors for daily and monthly power consumption added.

Thanks to @milothomas for his contribution in node-red plugin.

I was able to get all the controls of AC working and dumped the payload by subscribing to control topic of MQTT broker.

I have created native HA integration Kir4Kun/ha-miraie-ac (github.com).

You don’t need to setup Mosquitto Broker and node-red plugin anymore.

Copy the miraie folder from custom components and paste it into /config/custom_components of your HA installation, after that restart the system and also clear your browser cache.

Then you can add miraie integration from Integrations page, you need mobile number (with country code) and password for the log in.

It will automatically detect all the devices and add it to your home assistant.

This integration is in very early stage and I also a very beginner python developer. For feedback and suggestions please open the issues on Gthub page.

Thanks.

3 Likes

works beautifully!
Kudos

Hi @drhk10, I have created a homebridge plugin for MirAIe panasonic AC. It is working like a charm. See if it can help you.

1 Like

Hi @ajsingha002 , I have created a homebridge plugin for MirAIe panasonic AC. It is working like a charm. See if it can help you.

can you share node flow diagram i am new to node red and just want to use this node to get my ac on home assistant , what i did till now i got the mirai node in the flow and configured the login it shows the green light and shows one device connected but i am not sure how to connect this with mqtt add on

Thank you i was able to connect it works like charm thanks

Is it possible to control ACs locally? Don’t want to use IR.

Hi All,
I’m new to home assistant. I have Panasonic Miraie enabled Aircon. I have installed node-red install for miraie and provided all details for authentication and mqqt. It seems to login correctly but unable to fetch device details as per log (attached below)

1/8/2024, 1:30:11 PMnode: MirAIe
msg : string[23]
"Starting MirAIe node..."
1/8/2024, 1:30:11 PMnode: MirAIemsg : string[21]
"Logging in to MirAIe."
1/8/2024, 1:30:12 PMnode: MirAIemsg : string[28]
"Getting MirAIe Home details."
1/8/2024, 1:30:12 PMnode: MirAIemsg : Object
object
message: "There was an error getting device details. Request failed with status code 404"
name: undefined
description: undefined
number: undefined
fileName: undefined
lineNumber: undefined
columnNumber: undefined
stack: undefined
config: object
code: undefined
status: 404

Any help to fix this issue will be great.

Thanks!

how to add this to home assistant