Arduino Emailer
FIXED- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- Re: Arduino Emailer
- « Previous
-
- 1
- 2
- Next »
Re: Arduino Emailer
27-08-2021 12:53 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
Re: Arduino Emailer
27-08-2021 3:08 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Why even do that? - using a http request you can get the ip address in plain text from these sites (these are basic non SSL sites - i have other urls that use SSL):
http://www.antedes.com/getip.php (sometimes this one needs a referring url)
http://dynupdate.no-ip.com/ip.php
https://www.packetmail.net/myip.php
http://dynamic.zoneedit.com/checkip.html
http://bot.whatismyipaddress.com/
Re: Arduino Emailer
29-08-2021 10:51 PM - edited 29-08-2021 10:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@7up wrote:
Why even do that? - using a http request you can get the ip address in plain text from these sites (these are basic non SSL sites - i have other urls that use SSL):
Absolutely this. Parsing SMTP dialogue from Plusnet's mail server is just weird, and you deserve every consequence of things going awry in my book... 😉
Tracking IP address changes is a problem that's had perfectly functioning simple solutions for the decades that dynamic IP addresses have been around for. There's no need to invent a new one, particularly such a random one at that.
Oh and don't stop with just the IP address. Get your Arduiono to update a DNS record so you don't have to perform any reconfiguration of your camera app(s). This sort of thing should operate seamlessly without any user input action required.
Re: Arduino Emailer
31-08-2021 1:59 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@MJN wrote:
Parsing SMTP dialogue from Plusnet's mail server is just weird
But you gotta admit, it's clever!
I prefer the http method but there is a shortage of urls that will output your ip as text - i've got about 30 in a database table but that's it. Obviously there will be others out there that google hasn't picked up (or my search terms suck) but as of yet, i've not got lucky in finding them.
Re: Arduino Emailer
31-08-2021 8:36 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Besides, every dynamic DNS provider out there provides their own lookup facility (or a method by which you don't even need to parse for your own address - you just hit a URL with your API key and if your address has changed they'll update the mapping without you needing to do anything else).
Re: Arduino Emailer
02-09-2021 3:01 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
For that reason, it's best to check your own IP first to see if it has changed since the last check, if not do nothing. If it has, then call the update URL.
Obviously to check the IP you need to get it from somewhere like one of those URLs I've provided.. but then it's the same problem - keep calling the same URL every few seconds and it'll become a problem for the operator of the site. So, it's best to use multiple IP URLs in a round robin fashion. This then distributes the load of your IP checks over multiple servers so that they are not seen as excessive by any one particular server.
Re: Arduino Emailer
02-09-2021 8:27 AM - edited 02-09-2021 8:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If a near-instant response is desired for whatever reason then just parse the WAN address from your router. That removes the 3rd party dependency too if that's of concern (again though I can't see why it would be - there are numerous other failure points that risk letting you down first). Many routers these days even have built-in DDNS functionality so it can be handled for you automatically without any checking required.
Re: Arduino Emailer
03-09-2021 9:42 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The reason for short intervals is that i'd prefer the device to be accessible with as little downtime as possible. If it drops offline for 5 minutes that isn't great is it.
As for parsing the wan address, that usually means the application needs to be able to log into the router to gain it in the first place. Now imagine distributing a ddns updater online and it needing to be able to get into hundreds or thousands of routers - any of which could be updated by their ISP to change the html at any moment in time. Thats just one of those failure points you mention.
As for the built in DDNS many routers have, the plusnet hubone for example only offers paid ddns services - not a free one like afraid.org which is far superior in many ways. Even then the feature in the router is undocumented making no mention of how often it updates the external service. Again, it's another failure point.
Using my method means that the program can call any external server address it has in its database, if that fails it can try another in order to get the IP address. If it's changed from the currently known one stored in memory then it can call the update url and the job is done. Despite those many failure points you mention, it hasn't failed once in a rather long time. The simple realitiy is that it won't fail unless there is an internet connection failure - and those are catered for using try/finally or try/except blocks. Once the connection is restored it will regain the new IP and call the update urls (yes it supports multiple).
As for the 3rd party dependency that you don't like, thats why i've got multiple IP urls - I'm not daft enough to put all my eggs in one basket. Like i said the program even supports multiple update urls so that i have multiple ways to find the machine if one ddns address fails.
I've had a lot of failures / errors in my life, i now foresee them with almost everything and try to plan ahead for them.
Re: Arduino Emailer
03-09-2021 9:45 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Moderators Note
Due to the nature and aim of the discussion this has been moved from email to Tech Help.
If it helped click the thumb
If it fixed it click 'This fixed my problem'
Re: Arduino Emailer
on 03-09-2021 10:57 AM - last edited on 03-09-2021 11:00 AM by dvorak
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
What was the point of that? There is already a locked version of this topic in the Tech help forum. This thread was about methods of obtaining ones own IP address automatically. You moved it to email, now you're moving it back to Tech.
Next thing I know, @JonoH will be telling me how overworked you guys are - even though you're creating it for yourselves on a forum that's nearly dead anyway since the switch away from SMF.
Moderators Note: Full quote of preceding post removed.
Re: Arduino Emailer
03-09-2021 11:02 AM - edited 03-09-2021 11:03 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Because it's not related to email and it's not related to an issue with PN service.
So tech help is appropriate.
In serving its purpose as a support function I'd say it's far from dead.
If it helped click the thumb
If it fixed it click 'This fixed my problem'
Re: Arduino Emailer
03-09-2021 12:31 PM - edited 03-09-2021 12:33 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
03-09-2021 7:15 PM - edited 03-09-2021 7:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@7up wrote:
As for the built in DDNS many routers have, the plusnet hubone for example only offers paid ddns services - not a free one like afraid.org which is far superior in many ways.
Not true, at least one of them offers a free tier (NoIP) as it's what I use and I'm paying nothing for the privilege (just need to confirm activity once every thirty days when prompted by email).
Dynamic DNS is definitely what I would suggest here.
To answer the original question, sending an email every 5 minutes would be fine, but Dynamic DNS is a lot less faffing.
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Re: Arduino Emailer
04-09-2021 1:04 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@bobpullen, would it be possible to add another ddns host to the router firmware? - Afraid.org is actually a very good free ddns service that i've been using for over a decade yet its not supported. No-IP used to be great but then the nagmail started and degraded the service.
Also would it be possible to have a seperate url on the router (eg 192.168.1.254/ip ) to get the external IP address from? - As mentioned above it can be done via other websites but that extra flexibility might be useful to some.
- « Previous
-
- 1
- 2
- Next »
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page