thelastoutpostworkshop / gpio_viewer

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

ESPHome functionality #50

Open JoeAverge9 opened 10 months ago

JoeAverge9 commented 10 months ago

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

JoeAverge9 commented 10 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 10 months ago

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

JoeAverge9 commented 10 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 10 months ago

Can you import libraries ?

JoeAverge9 commented 10 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 10 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 10 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 10 months ago

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

trantoriana commented 10 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 10 months ago

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

thelastoutpostworkshop commented 10 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 10 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 10 months ago

Thanks I will look into it

oka4henry commented 10 months ago

Yes, you can.

platte-73 commented 10 months ago

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

thelastoutpostworkshop commented 10 months ago

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

tache commented 9 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 9 months ago

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

tache commented 9 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 9 months ago

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

erazor666 commented 9 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 9 months ago

+1

AJ-Github-Account commented 8 months ago

+1

playerfreak commented 8 months ago

wow this would be so helpful

Joo01 commented 8 months ago

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

Jaharmi commented 8 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 8 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 7 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 7 months ago

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