Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host field only works with IP addresses #1

Open
michaelpiron opened this issue May 27, 2021 · 3 comments
Open

Host field only works with IP addresses #1

michaelpiron opened this issue May 27, 2021 · 3 comments

Comments

@michaelpiron
Copy link

Hi,

i have successfully been using this component to send measured data of my energy plug (Blitzwolf SHP6 running ESPhome) to my influxdb 1.8 database.

This is my configuration:

# Connection to InfluxDB
influxdb:
  host: 192.168.84.16
  port: 8089
  publish_all: false
  tags:
    device: '${device_name}'
    client: '${client_name}'
    sensor: '${sensor_name}'
  sensors:
    power:
      ignore: false
      measurement: 'plugs'
      tags:
        units: 'Watts'
    voltage:
      ignore: false
      measurement: 'plugs'
      tags:
        units: 'Volts'

This worked as long as I specified an IP address in the "host" section. (either the local LAN IP address of my Influxdb host, either my public IP address)
However, when I replace the IP address by a domain ( subdomain.domain.be or myname.synology.me), the data doesn't arrive in my Influxdb anymore. The ESPHome log doesn't give any error message, so the specified domain seems to be valid.

I tried different ways of entering the domain:
host: subdomain.domain.be
or
host: "subdomain.domain.be"
or
host: 'subdomain.domain.be'

They all give the same result: no error messages in ESPHome log, but no data arrives in my influxDB.

@michaelpiron michaelpiron changed the title Domain only works with IP addresses Host field only works with IP addresses May 27, 2021
@la7dja
Copy link
Owner

la7dja commented May 27, 2021

Hi

This may be a DNS resolving issue or even a bug in the Arduion WiFiUdp library. But to rule out any errors in parsing of the configuration, could you please check that the hostname is correct in the configuration dump in the ESPHome log.

@michaelpiron
Copy link
Author

I tried different ways of entering the domain:
host: subdomain.domain.be
or
host: "subdomain.domain.be"
or
host: 'subdomain.domain.be'

It all results in following output in the ESPHome log:
image

No errors reported in the log.

@michaelpiron
Copy link
Author

Hi @la7dja ,
Would you have any suggestions on how to further analyze this issue?
I can help in it, but at this moment I don't understand where the issue is, as the ESPHome doesn't report any error regarding the InfluxDB address.
It seems that the hostname I specified passes all tests in ESPHome, so there could indeed be an issue in de Arduino WifiUDP library. Can you easily test this hypothesis?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants