Custom MQTT Ac unit

Hi,
I’m new in Home assistant world.
I’m trying it and it is very usefull.
I yet add some devices in my home and also MQTT switches to open my garage door with a self made opener (ESP8266).

I, also, made a self remote AC unit control with a NodeMcu. I use MQTT and a custom mqtt payload like this one:

{"deviceid":"37c055","powerToogle":true, "mode": "kWhirlpoolAcDry","temp":25,"fan":"kWhirlpoolAcFanMedium","swing": "false", "clock": "12:06", "ontimer": false, "offtimer": false, "sleep": false, "super": false}

I want integrate this one in Home assistant. Please can you help me to do this.

Thank you so much

I had good experiences using NodeRed with mqtt…is that an option? (i found it easier then configuring mqtt in yaml)

I have used Adafruit io broker.
I not know Node Red. So with nodered I don’t need to configure mqtt in yaml??
Please explain me
Thanks

NodeRed can send and receive mqtt payloads without yaml.


But in order to control it, you still have to identify the unit (entity) to HomeAssistant.
However, this is also possible with NodeRed (NodeRed entities can create sensors which are visible in HA)

Ok thank you for reply.
I want to control with Home Assistant the temperature, the fan, the mode ecc…
so it is possible to get this data from home assistant and then send it to node red??

NodeRed is a Addon for home assistant

Here is how to add an ac unit via mqtt. No need for node red at all.

Thank you for you answer.
But in this way I have to rewrite the firmware on the NodeMcu.
Actual firmware get in input a unique payload with the json I write in previous post…

As you mentioned you are using a custom mqtt payload hence I suggested to use NodeRed and not MQTT HVAC :wink:

Maybe something like this ?


Where swing is HA’s entity for HVAC swing switch, which should make it visible in HA

Ok thanks.
So what I need is to get parameters (desired temperature, fan, mode ecc…) from HASS GUI and then compose the json paylod and send it in mqtt publish message.
the composition of the message can be done with nodered ( I seem to have understood) but how can I take the parameters from hass GUI and pass it to nodered, and also how can I make a card in lovelace with parameters I need.
Thank you su much

You would actually do the whole send/receive mqtt messages in NodeRed.
(and if you’d like, some automation)

And within NodeRed you can create HA (binary-)sensors and switches which will be made visible/controllable in HA :wink:

You might also want to check the NodeRed section in this community :wink:
https://community.home-assistant.io/search?q=node%20red%20entities

Sorry I try in this days to find a way to do this but there is something I missing.
I just want to create a card in lovelace where I can put control of A/C unit mode, fan, temperature etc… and then use this data to populate a json message to send in mqtt payload.
The first thing I missing is how to create a card with my needed elements, I try to search how do this but I not find anything.

Thanks

I think you are confusing the frontend and the backend.

Get the climate device in as a climate integration. Then get it into Lovelace. I pointed you to an integration that will probably work.

Thank you.
Yes I have read the link you post and it can’t work because my device answer on a unique mqtt feed where there is all the json in payload.
So I need to take information about temperature, fan, mode etc… create the json and publish it.

As you wrote it, you can rewrite it as a mqtt HVAC device.

Finally I develop a custom climate component by extending the base climate component.
It works!!

Thank you for support but if I can why nobody say me about the possibility to develop custom components?? You say about node-red integration, modify the code in device but not about the possibility to develop custom components in HA…

1 Like

As this is open source freeware, everything is possible to create/adjust/develope yourself

Unfortunately, with HA there are more then one possible solutions.
And ofc, when asking support everyone will offer that what they are most comfortable with :thinking:

Yes sure effectively this is the beautiful of open source projects

So where is your source?

Hehe, i just realized i forgot to ask :yum:
Not that is really useful, as it is a one of a kind situation, but nevertheless it would be interesting to see the modifications :nerd_face: