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

🚀 | Notification about IP of RaspberryPi #921

Closed
BerniPi opened this issue Apr 29, 2020 · 8 comments
Closed

🚀 | Notification about IP of RaspberryPi #921

BerniPi opened this issue Apr 29, 2020 · 8 comments
Milestone

Comments

@BerniPi
Copy link
Collaborator

BerniPi commented Apr 29, 2020

Feature Description

I know that it's recommended to use a static ip. But i also want to connect my phoniebox to the networks of grandparents and to hotspots from mobiles.
I can add the wifi-settings from my phone's hotspot and the phoniebox connects, but i cannot access to the webinterface without knowing the ip. Connecting with the hostname works at home, but not on my android phone.

What functionality would you like to see in your phoniebox?

The phoniebox notify me about his ip: There is a possibility that the ip gets spoken, but i don't like that in this case. A good solution is, to mail the ip at startup or at buttonpress.

How do you envision the feature to work from a users perspective?

The phoniebox starts and I get a notification about the ip.

Further information that might help

I know that this is very special and i don't think that it shoud be added to phoniebox as code, but maybe anyone else is interested or you want to add it to the wiki.

Solution: It's fairly simple. I found some scripts, but only this one worked: https://github.com/oliverscheer/send-email-with-device-ip-address
I execute it with a systemd-service at startup.

@s-martin
Copy link
Collaborator

s-martin commented May 1, 2020

I would see this as an optional features as some people may have a mail agent disabled to improve overall startup performance.

If you provide a PR we gladly integrate it.

@BerniPi
Copy link
Collaborator Author

BerniPi commented May 1, 2020

Looks like MiczFlor is already working on it: 3a65a6c

@veloxidSchweiz
Copy link
Contributor

veloxidSchweiz commented May 2, 2020

maybe an alternative would be a text to voice output.. .
it would be a pretty small script:
install
apt-get install espeak
and then:
hostname -I | espeak
or alternatively:
espeak -s 100 "your IP address is `ifconfig wlan0 | grep inet | awk '{ print substr($2,6,15)} ' | head -1`"

@veloxidSchweiz
Copy link
Contributor

Looing in the commit,
One should think about a more generic event system,...
maybe an option that one can generate an event 'ip_change' and then one can connect handlers with this event...
This would be the pre-work to later on allow easy implementation of plugins and every one can install the things he like.
But this would definitely need some more thoughts and specially some architectual decissions.
@s-martin what do you think?

@s-martin
Copy link
Collaborator

s-martin commented May 2, 2020

I think a general event system with configurable sinks (e.g. mail, display, log) would be a good idea.
Personally I lack the necessary Python experience to implement such a feature.

@MiczFlor
Copy link
Owner

MiczFlor commented May 2, 2020

Hi @BerniPi @s-martin
I finished a version that reads out the IP address. I will push this to develop, have it tested on Pi3 and it works. While testing I found a few issues with the web UI settings page, which might have come from developing on the docker image. The shell script global write config needs to be run as root from the webUI. I will push this at the same time.

The Settings page has the option to switch it on and off. So if you move to a different Wifi, the process would be:

  • go to settings and switch it on
  • add new wifi
  • boot in new wifi
  • the IP is read out
  • go to settings and switch it off

I worked on installing the mail version, but have a mail server configured on the Pi would really make the install a nightmare :) for average users.

What I will do now: push my changes and then manually merge @BerniPi pull request. There will be a bunch of conflicts. So I do this now and test is on the Pi

@MiczFlor
Copy link
Owner

MiczFlor commented May 2, 2020

Ah... and another thing: the service startup sound will cease to exist. I created a startup-scripts.sh file which we can add on. This will be launched when booting. I will make the changes in @BerniPi pull request, too.

@MiczFlor
Copy link
Owner

MiczFlor commented May 3, 2020

Hi @BerniPi
just added the RFID option to the latest develop merge.

@s-martin s-martin added this to the 2.0 milestone May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants