ESP8266 gets reconised in HA but not the PIR, need some HELP!

your indentation is still incorrect

binary_sensor should be at start of line

this is troons

binary_sensor:
  - platform: gpio
    pin: D2
    name: "Utility room motion"
    device_class: motion

yours is still wrong

1 Like

i’ve read on most places ive looked today that it can/would run on 3.3v but i was really doubtfull about that…

The thing is that the VIN is the first place i tried thinking it was 5v also :wink: But it didnt work… maybe with my yaml fixed it"ll work better now :wink:

thanks ill try that

is it now validating?

OMG i feel so dumb… thanks

is the sensor now in HA?

no


binary_sensor:
  - platform: gpio
    name: "pin D7"
    pin: D7
    device_class: motion

INFO Reading configuration /config/esphome/mtn_snsr_01.yaml...
Failed config

binary_sensor.gpio: [source /config/esphome/mtn_snsr_01.yaml:28]
  platform: gpio
  name: pin D7
  
  Cannot resolve pin name 'D7' for board esp12e.
  pin: D7 [source /config/esphome/mtn_snsr_01.yaml:30]
  device_class: motion

Does that mean that i should be using the GPIO name instead?

put Pin D7 in quotes as per troons example on the name line

it’s plugged in the raspberry pi (for electricity), i have deleted the previous integration that i had done earlier so that it dont get all mixed up…

pi did but i get the same errors

binary_sensor:
  - platform: gpio
    name: "pin D7"
    pin: "D7"
    device_class: motion

should i put motion in quotes as well

“motion”

try using the gpio number instead of d7 for the pin
i think d7 is GPIO13

and no for quotes around motion

YES it validated, now lets see if it works and i get a binary …

it failed but, i had forgotten to put it back to “usb”

looks like it just did work FINALLY!!!

thanks for your patience.

I’m still learning,

the help was really appreciated

I’ll confirm if everything is fine later

2 Likes

I’m not 100% sure that this is the correct board type. Normally you should use board: nodemcuv2.

But if it’s working, that’s good, just stay with it. If you should run into further problems, try the nodemcu board type. :slight_smile:

1 Like

Since many of your problems related to understanding YAML have a look at this great guide.

1 Like

Yep, but granted, even if you read about it, the fire editor HA offers isn’t typo-prooved at all. Means if you simply add a space too much or less, forget about a single colon or such like, you’re lost.
Sorry to say but this is the #1 misery HA comes along with, and it’s also #2 - #9 miseries since I can’t name any others.
Feels as if being warped back into the 80th when fiddling with assembler programming, where also a single typo led to nothing at all.
If I could vote for what’s missing most … a propper editor being YAML synatx aware while typing.

1 Like

Thanks i was actually looking for something like this.
I’ve been working with computers all my life “i’m a film editor/digital colourist” so i’ve always been around code but , lately i’ve found a bigger interrest in it. It started with raspberry pi and some media servers and networking for media… it grew into me. I really like to learn,.
Thank you for this!

its not easy but im learning and im perseverent…

Then you’re at the right place, welcome to the loony bin! :rofl: :rofl: :rofl:

2 Likes