thelastoutpostworkshop / gpio_viewer

GPIOViewer Arduino Library to see live GPIO Pins on ESP32 boards
https://youtu.be/JJzRXcQrl3I
MIT License
943 stars 92 forks source link

ESPHome functionality #50

Open JoeAverge9 opened 6 months ago

JoeAverge9 commented 6 months ago

Would it be possible to enable this within the ESPHome project? https://www.esphome.io/

JoeAverge9 commented 6 months ago

I also found a similar request going the other way. Not sure where the best place for this request should be. https://github.com/esphome/feature-requests/issues/2546

thelastoutpostworkshop commented 6 months ago

I don't know ESPHome. Are you creating a sketch when working with ESPHome ?

JoeAverge9 commented 6 months ago

I don't know ESPHome. Are you creating a sketch when working with ESPHome ?

ESPHome is a declarative framework for programing ESP32 and ESP8266 dev boards

thelastoutpostworkshop commented 6 months ago

Can you import libraries ?

JoeAverge9 commented 6 months ago

Can you import libraries ?

I do not know for sure but depending on what you declare in the YAML config I believe this happens during the compile process before upload.

thelastoutpostworkshop commented 6 months ago

I will have a look at their documentation, if they don't allow third party libraries, there is not much I will able to do

trantoriana commented 6 months ago

ESPHome does allow importing external components using the 'external' component:

@thelastoutpostworkshop : Would be great if I knew what to import.

I am willing to test this and contribute to documenting.

T.

thelastoutpostworkshop commented 6 months ago

Thanks a lot for the info and sure I will need help for testing.

trantoriana commented 6 months ago

It looks like the source needs to be rearrange in a specific format to allow ESPHome to import such a 'component', as per:

Perhaps core developers of ESPHome are willing to contribute turning GPIOViewer into such a component.

Fingers crossed

thelastoutpostworkshop commented 6 months ago

Yes and some people open issues on it, on the ESPHome repository

thelastoutpostworkshop commented 6 months ago

It appears, that IDF is needed for ESPHome, currently GPIOViewer library is based on the Arduino Framework. So a port to IDF is needed, I do not know at this point the amount of work this port will required.

trantoriana commented 6 months ago

If i'd only knew what this means, but it seems possible to create a arduino based library as component in IDF.

At least, that is what it looks like they done here:

Perhaps a similar method can be used here ??

thelastoutpostworkshop commented 6 months ago

Thanks I will look into it

oka4henry commented 6 months ago

Yes, you can.

platte-73 commented 6 months ago

So, is it possible to use GPIO Viewer with ESPHome?

thelastoutpostworkshop commented 6 months ago

I think so, if someone wants to submit PRs for it, you are welcomed.

tache commented 5 months ago

First, this is an awesome capability. Second, I am +1 for the functionality being on ESPHome. Has anyone started the effort yet? I am on board to help.

thelastoutpostworkshop commented 5 months ago

Nobody submitted PRs for this yet, your are welcome to contribute.

tache commented 5 months ago

Going to give it a go, but got to get up to speed on ESPHome component development and then off to the races.

thelastoutpostworkshop commented 5 months ago

Thanks, I do not know how much of a learning curve it is.

erazor666 commented 5 months ago

I really like this functionality and I really hope someone makes it come to pass. Not much good on coding mysel sadly 🤔

mikulik86 commented 5 months ago

+1

AJ-Github-Account commented 4 months ago

+1

playerfreak commented 4 months ago

wow this would be so helpful

Joo01 commented 4 months ago

Yes, GPIOViewer in ESPHome would be a perfect addition! Hope someone gets it working :-)

Jaharmi commented 4 months ago

This looks great, just found it and am also interested in the possibility with ESPHome. In the meantime, for a particular problem I’m having, I was thinking I’d temporarily re-flash the affected device. It’s not like the config for that device will go away in ESPHome.

Jaharmi commented 4 months ago

I was able to add this to ESPHome.

esphome:
  libraries:
    # A library from PlatformIO
    - thelastoutpostworkshop/GPIOViewer

However, I don’t think this results in the “#include” being set and the Web server running on port 8080. I may be wrong, as the ESPHome device I was testing already had a Web server on port 80. (This also meant it had the other required libraries installed.)

MrC0nst commented 2 months ago

I was able to add this to ESPHome.

esphome:
  libraries:
    # A library from PlatformIO
    - thelastoutpostworkshop/GPIOViewer

So you have this addon working in esphome just with 4 lines of code only? I cant reach 80 or 8080 port of my esp to view gpio states

MrC0nst commented 2 months ago

This example works only with inpit pins https://github.com/dvb6666/esphome-components/blob/main/examples/test-gpio-viewer.yaml