ESPHome-like native API for Atmega/Arduino sensors

Hi,

those of you who have switched from configuration-heavy, error-prone MQTT to the new ESPHome native API in HA will probably agree: The native API is so much easier and better.

BUT: It only runs on ESP boards. Wouldn’t it be nice to have a similar API (and firmware) for all those Atmega 32(8)/Arduino boards out there to be able to get rid of MQTT completely users of these popular chips?

Pfft.

No errors ever and this is hardly heavy:

mqtt:
  broker: 10.1.1.100
  username: !secret mqtt_usr
  password: !secret mqtt_pwd

I have to agree with api, much easier. With the api you do not need to add anything to your configuration yaml.
So is absolutely quicker. So depending on how many sensors etc you have using mqtt, and the entries in your configuration file being however many, as apposed to 0 entries for api.

An example , i am testing how many relays I can control with a single nodemcu, so far I am up to 80, had to stop there as I ran out of relays. Only did that many for testing, realistically i only need 16. Imagine how many lines would have been needed for mqtt in the configuration file. For api it needed 0 lines.
Actually it needed 1 entry.
api:

Another example on the benefits of api. Edit your respective device yaml through esphome, update that device ota, and you’re done.
No need to make any changes to your configuration yaml, no need to restart hass.

Regards original topic for arduino boards, was looking for the same for my mega board.

Zero in HA . Discovery works.
Four on the esp. as shown above. Did you actually read the post?

It’s exactly the same if using mqtt. So that’s not really a benefit is it?

Anyway, not playing this game with you. I know the benefits, no-one is saying you should change over. I stand by what I said. Customizing with the api is much easier…for me. If mqtt works for you then stick with it.

1 Like

It’s not a game. You are spreading FUD because you dont appear to understand how mqtt works with ESPhome.

The biggest problem with the api is that you have absolutely no control over it or tools to use when something goes wrong. With mqtt it is easy to subscribe to a topic using an mqtt inspection client and see what messages are actually sent.

I’m not opposed to the api, in fact I will probably change over to it eventually for the one advantage it does have, a slight speed improvement.

mqtt: install server, configure server, test connection to HA, discover sensors automatically
esphome: activate integration in HA, add IP(s) of sensors

But anyway - it seems there is no such thing for Arduino :confused:

Hello,
2 years later, any news about this?

I must agree with OP, as relative home assistant newbie (yet developer) I had no problems understanding how HA native API works, yet MQTT is too much magic for me to understand it properly, so I prefer native API to mqtt everywhere I can.

still no easy solution for Attiny85 integration to HA?

How would you like to integrate an ATTINY85 with Home Assistant? It has only 8K of program space, and 512 bytes of RAM. You could bit bang serial or use the SPI or I2C (SPI taking up almost all the available I/O pins) bus, but I don’t think that would be an API as most would consider it. You’d be sending bytes back and forth, not calling HTTP REST points.

I absolutely agree this would be great to have.

You can integrate Arduino libraries and execute them via lambdas. But sometimes it’s just the other way around, you have an Arduino project but you want to add HA features to it. Would be amazing to have.

1 Like