I’ll have a think but, in the worst case, you could use a public MQTT server, read the IP address and then disable MQTT. You could actually set that up in a rule so that it was totally automatic.
Regards
Phil K
Sent from Mail for Windows 10
From: Ajith Vasudevan
Sent: 09 January 2021 06:59
To: TasmotaUsers
Subject: Re: How to get IP Address via Telegram
Thanks, Phil, for the quick reply.
As I mentioned, this is for a remote deployment and the only thing known about the network is the SSID and password. The subnet is also not known, for me to be able to set a static IP which would work.
The whole point of getting the IP address is for me to be able to tell it to the people at the remote site (over phone), so they can use it to access the web interface on their mobiles (to set the Timer, which, by the way, is the usecase )
As you can see, this is required only one-time after startup. Without the IP address (and MQTT), I cannot use the IPAddress1 command either.
I will setup MQTT in the worst case, but wanted to see if I can avoid it, because there's no use for it otherwise in my scenario.
I know that that Rules support "Tele-" events. But I am unable to figure out how to trigger a rule for the tele/SENSORS/INFO2 event at startup.
Also, is it possible to trigger Rules on "stat-" events? Because the command "IPAddress1" send out a "stat/<topic>/RESULT message. It is enough if I am able to access that in the Rule.
Regards,
Ajith
On Saturday, January 9, 2021 at 12:05:46 PM UTC+5:30 knowles...@gmail.com wrote:
If you send a command with IPAddress1 and no parameters Tasmota will respond with the IP address. Don't know if that helps.
Please bear in mind that the whole point of Tasmota is to use MQTT.
Why not just set a static IP?
Regards
Phil K
From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Ajith Vasudevan <ajith.v...@gmail.com>
Sent: Saturday, January 9, 2021 6:19:03 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: How to get IP Address via Telegram
Hello friends,
This is my very first post for help with a Tasmota feature. I've been a user of Tasmota for over 2 years now, and consider myself quite an expert in using it.
I recently discovered that Tasmota has Telegram support, and wish to leverage it for obtaining the DHCP--assigned IP address of my Tasmotized Wemos D1 Mini.
I am able to send messages to my Telegram Bot from Tasmota using "tmsend <message>".
I could use this command in a Tasmota Rule, but I am unable to figure out how to access the IPAddress in a Rule. I know that the INFO2 Tele- message on startup has the info I need. However, I cannot find any documentation as to how to trigger a rule when that Tele- message is sent.
I need this for a remote deployment, and I do not want to use MQTT for getting the IPAddress (STATUS 5), because, for my usecase, I have no need for MQTT for anything else.
It would be great if someone can help me with this.
Thanks in advance!
-Ajith
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/7096e064-38c5-4094-ac66-87fc2a8f7e2an%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/fe4f7b53-b6cc-42a9-9006-9ae210e4e1a0n%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/C3FBB7B4-93DC-40FA-94A2-3683C9949750%40hxcore.ol.
You received this message because you are subscribed to a topic in the Google Groups "TasmotaUsers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonoffusers/CzRBWeNG21g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAECyPQi0gOd35OMuByX-Z1GB-sgPh4-DdkgcD0RUz7VpOhRZTQ%40mail.gmail.com.
Hostname can be set via console
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAECyPQhLuYpDmM-AyUDu012DUttgZyR5z4ACsD6wnnsVt2iYeA%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAECyPQhLuYpDmM-AyUDu012DUttgZyR5z4ACsD6wnnsVt2iYeA%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/BFFFF765-FD23-4EFC-B117-5FF355A18C15%40hxcore.ol.
It's one of the annoyances of Tasmota that you can't set an IP address in the AP mode. I know it wouldn't help you in this case Ajith but everytime I set up a device I have to log in to my router to get the IP address. I then have to go into the device to set a static IP - I have a range of IP addresses for each room so that it's easier to find them later.
The ability to store the IP address in a variable (or, better still, automatically create a 'system' variable) might help.
--
You received this message because you are subscribed to a topic in the Google Groups "TasmotaUsers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonoffusers/CzRBWeNG21g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAECyPQi8Z2vC7ByvWP%2B0RLS1Bh-TvYSemGfpMRrLFbxNT6wx8w%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "TasmotaUsers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sonoffusers/CzRBWeNG21g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAECyPQi_u7O7uwRLL%3D4gu%2Bz94H51wQ2%3DuBfEgit2KgRrA6dDCw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/CAECyPQixu8WBDGPXuCuJ0XMEfOXBRHsZ69kmKmZXjnVK-PNxMQ%40mail.gmail.com.
Although I've not used it myself, I am sure Tasmota's "Scripting" could be used to achieve what you want.
On Monday, July 5, 2021 at 3:57:17 PM UTC+5:30 Automater wrote:
I followed the example but get the IP address in the form 0.0.0.0 (192.168.1.3)How can I just get 192.168.1.3?
The answer is no.
IPAddress1 will return the IP Address with 0.0.0.0 in front to signify that it is a DHCP address.
Status 5 will give you JSON (which you could parse) with the IP Address in it but there isn’t a way to get the output of Status 5 as a trigger for a rule (status5#ipaddress).
Your best bet is to use regex to extract the contents of the brackets \(([^()]+)\)*
Regards
Phil K
Sent from Mail for Windows 10
From: Ajith Vasudevan
Sent: 05 July 2021 15:35
To: TasmotaUsers
Subject: Re: How to get IP Address via Telegram
>> Isn't there a solution within the command/rule set?
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/2dc4053b-af56-409f-8618-c77a8ca1a14en%40googlegroups.com.