HI,
I’ve recently just started using ESPhome and have been working on an IRSensor for a universal remote to control some lighting and scenes in a room. I have the yaml code for ESPHome working and all the entities show up in HA. But; only 20 or so of the entities will appear in Node-Red; leaving some options like Indigo, and Violet now showing up when trying to create an automation. Can anyone explain why?
esphome:
name: man_cave_multisensor
platform: ESP8266
board: nodemcuv2
wifi:
ssid: !secret wifi_network
password: !secret wifi_password
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.1.73
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.1.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Man Cave Multisensor"
password: !secret wifi_password
captive_portal:
# Enable logging
logger:
level: warn
# Enable Home Assistant API
api:
password: !secret api_password
ota:
password: !secret api_password
remote_receiver:
pin:
number: D1
inverted: yes
# mode: INPUT_PULLUP
# dump: all
remote_transmitter:
pin: D5
carrier_duty_percent: 50%
dallas:
- pin: D7
#binary sensors from remote controls
#First binary sensor sets with MCR are for Man Cave Remote
binary_sensor:
- platform: remote_receiver
name: "MCR Fan"
samsung:
data: 0xE0E0F807
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR CR-10 Lamp"
samsung:
data: 0xE0E0C43B
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR Set Lights White"
samsung:
data: 0xE0E08877
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR Set Lights Red"
samsung:
data: 0xE0E020DF
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR Set Lights Orange"
samsung:
data: 0xE0E0A05F
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR Set Lights Yellow"
samsung:
data: 0xE0E0609F
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR Power"
samsung:
data: 0xE0E040BF
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "MCR Lamps"
samsung:
data: 0xE0E016E9
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Set Lights Green"
samsung:
data: 0xE0E010EF
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Set Lights Blue"
samsung:
data: 0xE0E0906F
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Set Lights Indigo"
samsung:
data: 0xE0E050AF
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Set Lights Violet"
samsung:
data: 0xE0E030CF
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Stream Q104"
samsung:
data: 0xE0E0926D
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Stop Media"
samsung:
data: 0xE0E0629D
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Pause Media"
samsung:
data: 0xE0E052AD
filters:
- delayed_off: 200ms
- platform: remote_receiver
name: "Heater"
samsung:
data: 0xE0E0C837
filters:
- delayed_off: 200ms
#start of other binary sensors
- platform: gpio
pin: GPIO12
name: "Man Cave Motion"
device_class: motion
#switches for remote transmitter
switch:
- platform: template
name: "Master Bedroom Fan"
turn_on_action:
remote_transmitter.transmit_nec:
address: 0x807F
command: 0xC03F
- platform: template
name: "Living Room TV On"
turn_on_action:
remote_transmitter.transmit_sony:
data: 0x00000A90
nbits: 12
sensor:
- platform: dallas
address: 0x64031515AAD3FF28
name: "Man Cave Temperature"
-Cheers,
sender
January 25, 2021, 11:50am
2
Did you “added them later”? Might need to restart nodered then
Yes I did. I also have tried restarting node red as well as the host pc and so far nothing. It’s almost as if I hit a limit with node red.
sender
January 25, 2021, 3:21pm
4
yes seems so then… sorry dont know that
Mikefila
(Mike Fila)
January 25, 2021, 6:11pm
5
What happens if you just add them manually. I assume that when you type an entity, the one you are looking for doesn’t appear? You can type out the name of the sensor and save it even if it doesn’t autogen.
Then fire the automation and see if it works. This seems to be an open issue from 2018, manually entering the sensor is listed as a work around. This add-on supposedly fixes the problem but didn’t read the whole threads.
plugin:
Bug threads:
opened 11:26AM - 19 Feb 18 UTC
bug
# Summary
When trying to run Node-RED with a custom root path, some 404 errors … appear when editing a flow with homeassistant nodes.
The only visible symptom is that autocomplete is broken and a red "404" error is displayed at the top of the page.
Manually filling-in the inputs seems to work fine.
# Steps to reproduce
### Setup
I've started from scratch on a Debian stretch box, and installed both node-red and node-red-contrib-home-assistant via npm :
```
node-red@HomeTest:/opt/node-red$ node -v
v6.12.3
node-red@HomeTest:/opt/node-red$ npm -v
3.10.10
node-red@HomeTest:/opt/node-red$ npm list node-red
/opt/node-red
└── [email protected]
node-red@HomeTest:/opt/node-red$ npm list node-red-contrib-home-assistant
/opt/node-red
└── [email protected]
```
(I've stuck to [email protected] to avoid 3.0 issues that are already logged)
### No custom root path
After the fresh install, custom root path are disabled in the settings.js :
```
node-red@HomeTest:/opt/node-red$ grep "http.*Root:" /opt/node-red-data/settings.js
//httpAdminRoot: '/admin',
//httpNodeRoot: '/red-nodes',
//httpRoot: '/red',
```
And Node-RED listens on /
```
node-red@HomeTest:/opt/node-red$ /usr/bin/node --max-old-space-size=128 /opt/node-red/node_modules/node-red/red.js --userDir /opt/node-red-data -v
19 Feb 11:00:34 - [info]
Welcome to Node-RED
===================
19 Feb 11:00:34 - [info] Node-RED version: v0.18.3
19 Feb 11:00:34 - [info] Node.js version: v6.12.3
19 Feb 11:00:34 - [info] Linux 4.9.0-3-amd64 x64 LE
19 Feb 11:00:34 - [info] Loading palette nodes
19 Feb 11:00:35 - [warn] ------------------------------------------------------
19 Feb 11:00:35 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
19 Feb 11:00:35 - [warn] ------------------------------------------------------
19 Feb 11:00:35 - [info] Settings file : /opt/node-red-data/settings.js
19 Feb 11:00:35 - [info] User directory : /opt/node-red-data
19 Feb 11:00:35 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
19 Feb 11:00:35 - [info] Flows file : /opt/node-red-data/flows_HomeTest.json
19 Feb 11:00:35 - [info] Creating new flow file
19 Feb 11:00:35 - [info] Starting flows
19 Feb 11:00:35 - [info] Started flows
19 Feb 11:00:35 - [info] Server now running at http://127.0.0.1:1880/
```
When adding a simple Home Assistant Service node, an ajax call is sent to :
`http://[domain]:1880/homeassistant/services`
The autocomplete works fine.
### Custom httpRoot
```
node-red@HomeTest:/opt/node-red$ grep "http.*Root:" /opt/node-red-data/settings.js
//httpAdminRoot: '/admin',
//httpNodeRoot: '/red-nodes',
httpRoot: '/red',
```
```
node-red@HomeTest:/opt/node-red$ /usr/bin/node --max-old-space-size=128 /opt/node-red/node_modules/node-red/red.js --userDir /opt/node-red-data -v
19 Feb 11:14:57 - [info]
Welcome to Node-RED
===================
[...]
19 Feb 11:14:58 - [info] Server now running at http://127.0.0.1:1880/red/
```
In the Node-RED admin, called with "/red", the Ajax calls are still sent to `http://[domain]:1880/homeassistant/services`
Which generates `Cannot GET /homeassistant/services`
However, if I add the root path manually, it answers correctly : `http://[domain]:1880/red/homeassistant/services`
### Custom httpAdminRoot
```
node-red@HomeTest:/opt/node-red$ grep "http.*Root:" /opt/node-red-data/settings.js
httpAdminRoot: '/admin',
//httpNodeRoot: '/red-nodes',
//httpRoot: '/red',
```
```
node-red@HomeTest:/opt/node-red$ /usr/bin/node --max-old-space-size=128 /opt/node-red/node_modules/node-red/red.js --userDir /opt/node-red-data -v
19 Feb 11:28:19 - [info]
Welcome to Node-RED
===================
[...]
19 Feb 11:28:19 - [info] Server now running at http://127.0.0.1:1880/admin/
```
In the Node-RED admin, called with "/admin", the Ajax calls are still sent to `http://[domain]:1880/homeassistant/services`
Which generates `Cannot GET /homeassistant/services`
However, if I add the root path manually, it answers correctly : `http://[domain]:1880/admin/homeassistant/services`
# Workaround
I'm running NGinx as a Reverse Proxy. Adding a custom location to proxy to Node-RED works :
```
location /homeassistant/ {
proxy_pass http://localhost:1880/red/homeassistant/;
...
}
location /red/ {
proxy_pass http://localhost:1880/red/;
...
}
```
Hi guys, pulling my hair out with this
So I have Home Assistant running in a docker on unraid and Node Red running in another docker…
I access them via the lets encrypt docker / reverse proxy so I have SSL access internally and externally to the network.
If I open a status node up if I connect direct to the IP eg http://192.168.0.19:1880/node-red/#flow/d147397f.dbb958
then when it tries to pull the entity IDs I get this error
"
Cannot GET /homeassistant/entities
Cannot GET …
For reference, I have fixed this issue on my WebSocket fork if people need to use httpRoot or httpAdminRoot in their setup and want it working out of the box.
1 Like
Thanks; got it figured out. I had some items wrong in Node-Red (my bad). Next time I won’t code with my eyes closed.
That said; i’m now trying to figure out how to send multiple codes at once. I have a remote that if you press the power button it it the IR receiver receives 4 different brands of code at the same time.
Received JVC: data=0x01FE
Received LG: data=0x01FE7887, nbits=32
Received NEC: address=0x01FE, command=0x7887
Received Pioneer: rc_code_X=0x011E
I’m just not sure how/if ESPHome and the IR Blaster component can send 4 codes from four different brands at the same time.
-Cheers,