openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 251 forks source link

Cannot Connect after rebooting #305

Closed ARC-AJANDA closed 6 years ago

ARC-AJANDA commented 6 years ago

Hello; I want to setup a basic home automation to my house, and I bought a rasberry pi 3 for that. I put the image of openHABian v1.4 to my 32gb sd card and I am able to setup the server to my rasberry pi. I can connect it over web browser with my-rasberrypi-ip:8080 and over putty. I open putty. do my configurations. setup masquito mqtt. then I open mqttfx and can connect to rasberry with its own ip adress. Then I go back to my web browser and bind mqtt with rasberry pi. I go back to putty. create a few switches. open web browser and see the switches that I created there. Everything is alright till here. But when U unplag the rasberry pi or reboot is by typing sudo reboot over putty. I cannot connect it again. Web browser gives me an error "ERR_CONNECTION_TIMED_OUT" and also putty gives me this error; "Network Error:Connection Timed Out".. I have been trying for last 2 weeks. I am new with rasberry pi. Please can anyone help me with this issue. I cannot connect again to rasberry pi after I unplug it or reboot it.

ThomDietrich commented 6 years ago

Hello, this is an unusual problem. My first guess would be changing IP addresses. Did you check your network router for the RPi? It should reappear in it's DHCP lease list after the reboot. If you can't find the device after reboot try connecting a display to it. This error is most probably not related to openHABian but to your network or hardware or to the base raspbian.

ARC-AJANDA commented 6 years ago

Hi, Thanks for replying me. Yes it appears there. I have checked and did everything again and again many times. I re-installed the openHABian at least 10 times. I intall it to my rasberry pi I can open over web browser with my-rasberrypi-ip:8080. I do everything. But when I reboot it. I cant open it again. Green light flashes many times and only red led remains after a while. I left it after reboot and came back one day after cause I thought maybe rebooting takes time. But no. Nothing has changed. I am able to see the rasberry pi on my router. I checked it again ad yes. I can see it. But I cant open it over my web browser or putty. Connection timed out error every time.

ARC-AJANDA commented 6 years ago

I will try re-installing everything again today. And check if I see it on the rooter DHCP list. What can I do to solve it if it doesnt reappear on the rooter again, can you help me with that?

ARC-AJANDA commented 6 years ago

Hello. I started everything from the beginning and re-installed openhabian again. I could connect over google chrome and putty. And after I have updated and upgrated the system, I installed mqtt and typed sudo reboot. After the reboot. I checked the rooter and it was there under the DHCP list. I unplagged rooter and the rp3. And plugged again. Waited for 5 mins and plugged them again. I could see the rp3 again under dhcp list. I tried to open web interface but it gave me ERR_CONNECTION_REFUSED error. And I tried to connect with putty and it worked. I could connect with putty but cannot connect over my web browser. What should I do?

ARC-AJANDA commented 6 years ago

Can anyone please help me with this? Cause I cannot solve it.

ThomDietrich commented 6 years ago

Hey, I'm sorry you are seeing issues, this is definitely not related to openHABian.

Here's my suggestion how to solve this issue and how to hopefully end with a fully working system.

  1. openHABian is based on Raspbian. Let's go with Raspbian to have that possibility out of the question. Download the latest Raspbian Stretch Lite image from here and flash it, boot it, connect via SSH.
  2. As soon as you are seeing the ssh console, type sudo reboot. This way you'll probably rule out a lot of possible causes.
  3. When the system is back up, initiate a fill sudo apt update and sudo apt upgrade followed by sudo reboot
  4. After the system is up once again you should be safe to install openHABian on top of the Raspbian system following: http://docs.openhab.org/installation/openhabian.html#manual-setup

If there are any issues along the way there are two probable causes: A defective RPi or a defective SD card.

A general remark: This kind of issues should ideally be discussed in the openHAB community forum. There you'll reach more people with potential advice.

Good luck!

ARC-AJANDA commented 6 years ago

Hello. I have tried everything suggested by you and over the internet. Nothing worked. I changed the sd card twice. and the third sd card worked. My problem was a defective SD card. I solved it now. Everything is working as expected. Thanks @ThomDietrich for helping. :))

ThomDietrich commented 6 years ago

@ARC-AJANDA congrats!!