Hi
Could you tell me, how I can send the %ip% to mqtt broker, I can send other datas like the temperature and analog input.
thank you
Send IP address to mqtt
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 22
- Joined: 17 Jun 2016, 19:22
Re: Send IP address to mqtt
This can only done if you can add some code to the mqtt plugin and compile the firmware yourself. Sending %ip% is not a standard feature. I would like to see this implemented also in the generic http plugin
-
- Normal user
- Posts: 497
- Joined: 04 Oct 2016, 23:16
Re: Send IP address to mqtt
You can send it at boot or at a given interval using events.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- New user
- Posts: 3
- Joined: 21 Oct 2016, 18:25
Re: Send IP address to mqtt
thanks a lot
I put it in the rules section and it works:
On System#Boot do //When the ESP boots, do
Publish /%sysname%/Bedroom/IPAddress,%ip%
timerSet,1,600 //Set Timer 1 for the next event in 10 minutes
On Rules#Timer=1 do //When Timer1 expires, do
Publish /%sysname%/Bedroom/IPAddress,%ip%
timerSet,1,600 //Set Timer 1 for the next event in 10 minutes
I put it in the rules section and it works:
On System#Boot do //When the ESP boots, do
Publish /%sysname%/Bedroom/IPAddress,%ip%
timerSet,1,600 //Set Timer 1 for the next event in 10 minutes
On Rules#Timer=1 do //When Timer1 expires, do
Publish /%sysname%/Bedroom/IPAddress,%ip%
timerSet,1,600 //Set Timer 1 for the next event in 10 minutes
-
- Normal user
- Posts: 497
- Joined: 04 Oct 2016, 23:16
Re: Send IP address to mqtt
good to be helpful 

My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- New user
- Posts: 9
- Joined: 19 Sep 2016, 04:11
- Location: Johannesburg - RSA
Re: Send IP address to mqtt
Thanks that is useful,
Would be cool to have both %sysname% and %ip% as part of http://www.esp8266.nu/index.php/SysInfo
Later Ferdie
Would be cool to have both %sysname% and %ip% as part of http://www.esp8266.nu/index.php/SysInfo
Later Ferdie
Who is online
Users browsing this forum: Bing [Bot], Perplexity.ai [bot] and 23 guests