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

MQTT: can we have network status messages (ip address, etc) #202

Closed
g6094199 opened this issue Nov 18, 2021 · 8 comments
Closed

MQTT: can we have network status messages (ip address, etc) #202

g6094199 opened this issue Nov 18, 2021 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@g6094199
Copy link

Can we have IP (v4/v6) address send via MQTT plz?
Also if its connected via ethernet or wifi (eg. important for w32-eth devices).

sometimes Gateway and DNS is also usefull for fast debugging (mostly on dhcp).

messages for SSID and MAC address will be a goodie on top.

@g6094199 g6094199 added the enhancement New feature or request label Nov 18, 2021
@proddy
Copy link
Contributor

proddy commented Nov 18, 2021

good idea. So add the IPv6 IP, MAC and SSID (if enabled) to the API output of http://ems-esp.local/api/system/settings

There is a topic called ems-esp/info which is sent when EMS-ESP starts with the version and IP address, e.g. {"event":"start","version":"3.3.0b7","ip":"192.168.1.134"} . I'll add the MAC and SSID too. Does that work for you?

@proddy proddy self-assigned this Nov 18, 2021
@g6094199
Copy link
Author

👍

good idea. So add the IPv6 IP, MAC and SSID (if enabled) to the API output of http://ems-esp.local/api/system/settings
I'll add the MAC and SSID too. Does that work for you?

maybe the bssid too ;-)

@proddy
Copy link
Contributor

proddy commented Nov 18, 2021

ok. A bit like the command show system from the console does.

@g6094199
Copy link
Author

g6094199 commented Nov 18, 2021

in general, yes

these are settings which are usefull for debugging wihout connecting directly to ems.

@proddy
Copy link
Contributor

proddy commented Nov 18, 2021

ok. I meant the URL http://ems-esp.local/api/system (the info command) not settings. I'll add it shortly.

@proddy
Copy link
Contributor

proddy commented Nov 18, 2021

pls check 3.3.0b8

@g6094199
Copy link
Author

whow, that was quick!
but i cant see any new mqtt messages coming in.

Bildschirmfoto vom 2021-11-18 13-34-09

@proddy
Copy link
Contributor

proddy commented Nov 18, 2021

it's in the MQTT topic called info, not heartbeat. The heartbeat is used for dynamically changing data. It's a waste to send the Network details every 60 seconds if it doesn't change, and for Home Assistant to create sensors from them. If you want the information it's best to use the API and do a call to http://ems-esp.local/api/system. If you want to see this information in HA then manually create a sensor:

sensor:
  - platform: rest
    resource: http://ems-esp.local/api/system/info
    name: emsesp_MAC
    value_template: "{{ value_json.Network.MAC }}"

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

No branches or pull requests

2 participants