Getting Tasmota IP address

If you are Using Tasmota Stuff Here a way to find there IP address It Needs Node-red thats the Heat of it

node red bit First

[{"id":"5e69bd5c.2694f4","type":"server-state-changed","z":"389574d4.a0f25c","name":"","server":"db41d9dd.930258","entityidfilter":"input_select.sonoff_list","haltifstate":"","x":176,"y":156.00000858306885,"wires":[["64b57571.e6559c","f615684a.488688","12fdbd2c.5a98e3","ba79907f.4726c"]]},{"id":"64b57571.e6559c","type":"function","z":"389574d4.a0f25c","name":"Get ipaddress","func":"var newMsg =\"cmnd/\" + msg.payload.toString() + \"/ipaddress\"\nmsg.topic = newMsg;\nreturn msg;","outputs":1,"noerr":0,"x":488,"y":98.99999237060547,"wires":[["3137bdbc.592952"]]},{"id":"3137bdbc.592952","type":"mqtt out","z":"389574d4.a0f25c","name":"","topic":"","qos":"","retain":"","broker":"22618f74.c776d","x":694.9999923706055,"y":151.00000858306885,"wires":[]},{"id":"339965fc.6ba4fa","type":"mqtt in","z":"389574d4.a0f25c","name":"","topic":"stat/#","qos":"2","broker":"22618f74.c776d","x":134,"y":369,"wires":[["9268c550.9a9808"]]},{"id":"9268c550.9a9808","type":"debug","z":"389574d4.a0f25c","name":"","active":true,"console":"false","complete":"payload","x":546,"y":371,"wires":[]},{"id":"f615684a.488688","type":"function","z":"389574d4.a0f25c","name":"Get Module","func":"var newMsg =\"cmnd/\" + msg.payload.toString() + \"/Module\"\nmsg.topic = newMsg;\nreturn msg;","outputs":1,"noerr":0,"x":492,"y":144,"wires":[["3137bdbc.592952"]]},{"id":"12fdbd2c.5a98e3","type":"function","z":"389574d4.a0f25c","name":"Get Gpio","func":"var newMsg =\"cmnd/\" + msg.payload.toString() + \"/Gpio\"\nmsg.topic = newMsg;\nreturn msg;","outputs":1,"noerr":0,"x":501,"y":195.00001525878906,"wires":[["3137bdbc.592952"]]},{"id":"ba79907f.4726c","type":"function","z":"389574d4.a0f25c","name":"Get FriendlyName","func":"var newMsg =\"cmnd/\" + msg.payload.toString() + \"/FriendlyName\"\nmsg.topic = newMsg;\nreturn msg;","outputs":1,"noerr":0,"x":492,"y":249,"wires":[["3137bdbc.592952"]]},{"id":"e9248990.7b3a68","type":"comment","z":"389574d4.a0f25c","name":"Convert to a Topic","info":"","x":331.33233642578125,"y":50.769880294799805,"wires":[]},{"id":"8ddc98d6.e81388","type":"comment","z":"389574d4.a0f25c","name":"This Just for Debuging so you can see out in debug window on side","info":"","x":348,"y":323,"wires":[]},{"id":"db41d9dd.930258","type":"server","z":"","name":"Home Assistant","url":"http://localhost:8123","pass":"welcome"},{"id":"22618f74.c776d","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
input_boolean.html:
  custom_ui_state_card: state-card-html
  config:
    stylesheet: /local/random_sensors.css
    html:
    - c: <center>Tasmota<br>
    - m: <b>${sensor.sonoff_list_status}</b></center>
    - c: <ul>
    - m: '<li>Type : ${sensor.sonoff_module}</li>'
    - m: '<li>IP : ${sensor.sonoff_ip}</li>'
    - m: '<li>Topic : ${sensor.sonoff_list_status}</li>'
    - c: <ul>
    - c: </ul>
    - c: <center><br><br><a href='https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#main'
        target='_blank' >Commands</a></center>
  - platform: mqtt
    name: "SonOff IP"
    state_topic: 'stat/#'
    value_template: "{{ value_json.IPAddress1.split(' ')[1].replace('(','').replace(')','') }}"
    
  - platform: mqtt
    name: "SonOff Module"
    state_topic: 'stat/#'
    value_template: "{{ value_json.Module.split(' ')[1].replace('(','').replace(')','') }}"
    #value_template: "{{ value_json.Module }}"
    
  - platform: mqtt
    name: "SonOff Friendly"
    state_topic: 'stat/#'
    value_template: "{{ value_json.FriendlyName1}}"

  - platform: mqtt
    name: "SonOff GPIO"
    state_topic: 'stat/#'

    
  - platform: mqtt
    name: "New SonOff IP"
    #state_topic: 'stat/{{ states("input_select.sonoff_list") }}/RESULT'
    state_topic: 'stat/SONOFF-TMP/RESULT'
    value_template: "{{ value_json.IPAddress1.split(' ')[1].replace('(','').replace(')','') }}"    
    

need a input Select with the Topic Name of you current Tasmota Sonoff

  sonoff_list:
    name: Tasmota List
    options:
      - SONOFF5
      - SONOFF6
      - SONOFF7
      - SONOFF10
      - SONOFF11
      - SONOFF-POW1
      - workshop
      - Wemos_fan
      - Select one
    initial: Select one

Put everything in a group

image

Tryed to make the IP address a Link but for some reason i couldn’t get it to work. :frowning:

  son_off:
    name: "Select Tasmota"
    control: hidden
    entities:
      - input_select.sonoff_list
      - input_boolean.html
      - script.get_gonoff_ip
      - sensor.new_sonOff_IP

When you first Put Tasmota on to Sonoff Its hard to find the IPaddress of it Well log into router and get that way
Before you flash it change the Project Name to SONOFF-TMP as this is the default Topic
And setup the MQTT stuff save it

now you can flash it.

Need create script to Publish a MQTT message

get_gonoff_ip:
  alias: Get Sonoff New IP (SONOFF-TMP)
  sequence:
  - data:
      topic: cmnd/SONOFF-TMP/ipaddress
    service: mqtt.publish

now after you flash you thing with Tasmota you can run the Above Script and its ipaddress will be shown in the
sensor.new_sonOff_IP

hope this help out someone

You could just use Fing on your phone to scan your network :wink:

Mad code though.

yes you are right could of done that That would be the Manual WAY

isn’t why we are here trying to get the Computer do the work for us

I completely understand why, and the effort you have gone to with the code is amazing! I just see opening an app and clicking scan to be super simple for the amount of times I need to add a Sonoff to my network.

Keep up the good work!