ESP32 for non HA Purposes

Appreciate this post is slightly ‘off topic’ but I know the good people here will know the answer.

I’ve been using ESP32s for a while now with ESPHome and know my way around them from a hardware perspective. However I now have a use-case where I want to use an ESP32 to so something outside of HA. In a nutshell, I want to use one to read proprietary serial data from an industrial machine and forward the data to a piece of 3rd party software using a websocket. Ideally with remote flashing/management of the device included.

Can someone point me in the direction of a platform/toolchain for this?

Thanks!

If you cant figure out yow to use google and search for “how to use esp32” you might as well not bother.

Theres a gazillion guides on programming esp32 and dont involve HA or esphome.

1 Like

I don’t know much about this but my understanding is you can still use ESPHOME if you want to.

I believe you can use the webserver component and rest api.

Dunno about remote access though.

1 Like

You can create your own component and add arbitrary C++ code and libraries to it. Thus you can make ESPHome but with Arduino code and take advantage of all ESPHome facilities.

I did that for my novamatic climate component on my github.

1 Like

I don’t see anything in the ESPhome docs about sending WebSockets nor do I have experience with them at all, but you certainly can use ESPhome without HA. Perhaps someone with WebSocket experience can chime in on how to do it with ESPhome.

A google search did bring up a few things that look related to what you are trying to do.

1 Like

That is kinda my point, there are a gazillion, mostly around Arduino Studio which seems to be a very basic IDE and not have the device management type capabilities I was seeking.

HA users tend to fit into the ‘know a bit of code but prefer point and click’ category like me, so recommendations from this group are helpful in finding the right one.

So use a different IDE… Hello??

The reason you mostly see people use Arduino is because it’s very capable and can do what most people need. If it doesn’t have what you’re seeking than once again… do a google search for an IDE that has the features you want. This isn’t complicated, it just takes effort on your part.

It’s amazing what you can find with simple Google searches but, the problem is you have people who don’t want to do it. It’s easier for them to put their hand out and ask others to put the information in their hand so they don’t have to do any type of work.

I think you’ll find your attitude to this puts you in a minority of one. Folks on this forum tend to want to help others and share their knowledge and experiences freely, thats what makes it such a great community.

Google is a great resource but it doesn’t make up for experience. Every tool/article on Google claims to be THE way or THE BEST way. If you expect everyone to go through a complete entire trial and error process themselves until they have exhausted everything on Google, then what is the point of having a community in the first place? You could just post a link to the API documentation and cancel this whole forum!

If you don’t want to spend your time on questions like this then you really shouldn’t have bothered to reply. This forum is not a place to virtue signal or criticize - you’ve spent more time doing this than simply typing out something helpful like “Try Arduino Studio”.

Try it next time, you might like it.

This is the common excuse you hear from people like yourself that don’t want to try. The point of communities is to ask questions but, when the question can simply be answered by doing a Google search it’s pretty clear that you aren’t seeking an answer, you’re being lazy. I disagree that i’m in the minority because you’ll see similar responses quite often. It’s not hard to tell when someone needs help and when someone doesn’t want to help themself.

Expect people to go through a trial and error process? YES!! This is how you figure things out, this is how you learn, this is how you troubleshoot problems, this is how you don’t make a clown out of yourself. That is absolutely the expectation people have who read these questions. That’s exactly how the people you are asking learned ourselves.

I think you’re generalising people far too much here. There are those who have a lot of time to dedicate to projects and learn the fundamentals in deep detail, perhaps they even enjoy doing so, perhaps their day-job or career overlap with this and it’s beneficial for them. Then there are those who don’t have a great deal of time for it and don’t enjoy it, and who work in completely different fields and for whom it’s wasted knowledge beyond the one thing they need to acheive, and they will never use again. Both types of people exist in this forum.

Could you claim the latter group are ‘using’ the former group? Potentially, but it’s entirely at the discretion of the person to share their input or not, again, some people enjoy doing so and teaching and sharing experience. There is no requirement to reply to posts and I don’t feel that anyone feels forced to.

I just keep hearing long winded excuses for why you can’t be bothered to try. Did you even try the Arduino IDE before stating it wouldn’t work for your needs? I suspect not because it seems to do the job for most people.

I have, and I have looked at the Arduino Cloud option that does remote code upload (one of my needs) however it is a cloud based service that I am not comfortable with, I prefer something local. You can do OTA with remote ports from the IDE but there is no monitoring/management interface.

The best option for me it seems, as suggested in a post here, is to use ESPHome with custom arduino code modules, something I didn’t know was possible and not easily google-able.

I’ve marked this as the solution.

Why not ask ChatGpt to help you get on your way?

Ya, sorry. Maybe i was a little harsh. You see people all the time who just want code to copy of someone to go find them a link, its annoying. It does seem like youve tried so again, i apologize.

Arduino IDE is somewhat basic but, like i said it suits a lot of people just fine. The other popular one is PlatformIO, its a visual studio code addon. Its probably the most popular IDE out of any.

Like you can open Arduino environments, python, c++, whatevr and code all from one IDE. If your looking for “options” or “features” PlatformIO has enough for you to get lost for days.