pihome-shc / pihome

PiHome - Smart Heating, Ventilation and Air Conditioning (HVAC)
http://www.pihome.eu
Other
52 stars 25 forks source link

Button for wifi reset #417

Open sandreialexandru opened 3 years ago

sandreialexandru commented 3 years ago

I was thinking about adding a button to the RPi GPIO wich would put it into access point mode for the configuration of the home newtwork(reset button). Steps:

  1. Python script to put Raspberry Pi into access point mode when button is pushed so PiHOME settings cand be changed.
  2. Web UI to update SSID and password in wpa_supplicant.conf (maybe rewrite it completely) and restart the RPi. This is useful when router network settings are changed.

I have an idea about the python script but the web UI is php and not my area of expertise. We would need hostapd and the ISC DHCPD server. What do you think?

pihome-shc commented 3 years ago

yes my mobile had correct range of ip address with gateway 192.168.50.5

twa127 commented 3 years ago

is the hostapd service running eg

ps -aux | grep hostapd root 1481 0.0 0.3 4644 1628 ? Ss 19:12 0:00 /usr/sbin/hostapd -B -P /run/hostapd.pid /etc/hostapd/hostapd.conf root 5567 0.0 0.1 6728 536 pts/1 S+ 21:09 0:00 grep hostapd

twa127 commented 3 years ago

also found opening with safari on my phone was slow but if I waited it did open after about 60 seconds

pihome-shc commented 3 years ago

on iphone it took little longer to connect to ap as well and i dont know how long i waited before giving up, let me try again later and i'll update here.

pihome-shc commented 3 years ago

@twa127 today i installed PiHome on CentOS 7 on HP T620 Thin Client, i couldnt get pass the WiFi AP setup, so i had to make small change in index.php and set $eth_connected = 1; after line 62 to get passed this, i m thinking should we put something there to ignore ap mode all time?

twa127 commented 3 years ago

That's pushing the envelope :-) I've added a check for if the autohotspot service has been installed