esphome_syslog
esphome_syslog copied to clipboard
component no longer being loaded on esphome 2023.11.2?
heya, i successfully used your syslog component before on a dingtian board (ethernet only) by using the known hack of just commenting out the if(WiFi.status() != WL_CONNECTED) line.
"some" months later, i tried using it again, in the meantime esphome was updated to 2023.11.2 (not sure what version was in use previously.. ), and now it looks like the component is not loaded at all. i dont even see the "syslog started" line, let alone the wifi not connected part (not using the ethernet "hack").
i also tried manually reverting this change but it had no effect.
could you please check if any "structural" changes are needed for current esphome version? am i missing something? someone else has it working with 2023.11.2 currently? thanks
Hi,
I'm not aware of any recent changes, but I'll look into it.
There was a change a while back tho, how are you importing the component?
sorry for my late reply :)
my complete config looks like this.. as you can see its a dingtian board with modbus, that part still works, but the remote-syslogging stopped working at some point :)
thanks for any help.
esphome:
name: relayboard3
friendly_name: "Dingtian 2CH Relay Board#3"
platform: esp32
board: esp32dev
external_components:
- source: github://TheStaticTurtle/esphome_syslog
components: [syslog]
- source:
type: git
url: https://github.com/elupus/esphome-nibe.git
components: [ nibegw ]
logger:
level: DEBUG
hardware_uart: "UART1"
baud_rate: 0
syslog:
ip_address: "10.43.2.201"
port: 1514
api:
ota:
password: !secret ota_password
ethernet:
type: JL1101
mdc_pin: 23
mdio_pin: 18
clk_mode: GPIO17_OUT
use_address: 10.43.2.53
web_server:
port: 80
status_led:
pin:
number: 15
inverted: true
switch:
- platform: gpio
name: "Relay1"
pin: 16
id: relay1
- platform: gpio
name: "Relay2"
pin: 2
id: relay2
binary_sensor:
- platform: gpio
name: "FACTORY (onboard) -> Relay1"
pin:
number: 34
inverted: true
on_press:
then:
- switch.toggle: relay1
- platform: gpio
name: "INPUT I1"
pin:
number: 36
inverted: true
- platform: gpio
name: "INPUT I2"
pin:
number: 39
inverted: true
uart:
tx_pin: 1
rx_pin: 3
baud_rate: 9600
debug:
direction: BOTH
nibegw:
dir_pin:
number: GPIO33
inverted: false
udp:
target:
- ip: 10.43.2.201
port: 19999
source:
- 10.43.2.201
acknowledge:
- MODBUS40
- RMU40_S4
constants:
- address: MODBUS40
token: ACCESSORY
data: [
0x0A, # MODBUS version low
0x00, # MODBUS version high
0x02, # MODBUS address?
]
# Accessory version response
- address: RMU40_S4
token: ACCESSORY
data: [
0xEE, # RMU ?
0x03, # RMU version low
0x01, # RMU version high
]
# Unknown response that nibepi uses
- address: RMU40_S4
token: RMU_DATA
command: RMU_WRITE
data: [
0x63,
0x00,
]
# Constant fixed temperature to avoid pump going into alarm.
- address: RMU40_S4
token: RMU_WRITE
data: [
0x06, # Temperature
0x14, # degrees low
0x00, # degrees high
]
button:
- platform: restart
name: Nibegw Restart
- platform: safe_mode
name: Nibegw Safe Mode Boot`
Hi,
I'm not sure why it stopped working, did it happen after an update or reboot, or just out of the blue?
If it was after an update can you send me the compilation log? Would you mind also providing the startup logs ?
Thanks
sorry i should have specified that :) the original module's modbus component died, probably due to some voltage spike / eletrical problem so we transferred everything to a same-model device, but we recompiled the firmware with newest stuff while doing so.
i do remember trying to completely "strip it down" (remove the nibe component) to reduce general debug logging, and even then, NOTHING In the log output had any reference to the syslog component. in particular, i remember seeing the output from https://github.com/TheStaticTurtle/esphome_syslog/blob/6cab1982b9122404abc0441a16ae4a3da40909aa/components/syslog/syslog_component.cpp#L32 on the console previously, but this is no longer the case, as if it wouldnt be loaded at all for some reason.
the install is at a friends' place, so it will take me a few days, but i will provide compile and startup logs asap (probably next monday).
took me a bit longer than expected, sorry about that :)
this is the config i tested it with:
esphome:
name: relayboard2
friendly_name: "Dingtian 2CH Relay Board#2 + defMOD [c4-de-e2-87-a6-47]"
platform: esp32
board: esp32dev
external_components:
- source: github://TheStaticTurtle/esphome_syslog
components: [syslog]
syslog:
ip_address: "10.43.2.201"
port: 1514
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password
ethernet:
type: JL1101
mdc_pin: 23
mdio_pin: 18
clk_mode: GPIO17_OUT
use_address: 10.43.2.54
web_server:
port: 80
status_led:
pin:
number: 15
inverted: true
switch:
- platform: gpio
name: "Relay1"
pin: 16
id: relay1
- platform: gpio
name: "Relay2"
pin: 2
id: relay2
binary_sensor:
- platform: gpio
name: "FACTORY (onboard) -> Relay1"
pin:
number: 34
inverted: true
on_press:
then:
- switch.toggle: relay1
- platform: gpio
name: "INPUT I1"
pin:
number: 36
inverted: true
- platform: gpio
name: "INPUT I2"
pin:
number: 39
inverted: true
and this is the compile output. it looks to me as if esphome is completely ignoring my external_components stanza.. no idea whats going on :x compile1.txt
Hi, thanks for getting back to me.
It appears that the component was loaded since the library manager is installing the underling [email protected]
library.
It also appears that it was compiled:
-
Compiling .pioenvs\relayboard2\src\esphome\components\syslog\syslog_component.cpp.o
-
Compiling .pioenvs\relayboard2\lib4ac\Syslog\Syslog.cpp.o
What stumps me is why it doesn't start.
The Syslog started
message is printed at the very start of the setup and there shouldn't be any way to disable it appart from esphome simply not executing setup()
but no clue why.
Or the log output got silenced somehow and everything is actually working. Do you receive syslog message? (you can potentially check by sending messages to your computer IP and running Wireshark with a filter on udp.port==<port>
)
I've just re-read all the changelogs from esphome since January 2022, and I didn't see anything that could cause that. I also heavily doubt that they would make a breaking change that big (changing the setup procedure would break hundreds of components).
Could you try with Wi-Fi? Maybe also try a complete clean install (new device)?
Thanks, Samuel