Losing connection to Domoticz ?

Moderator: leecollings

Post Reply
User avatar
Winjas
Posts: 5
Joined: Sunday 25 June 2017 9:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Kent UK
Contact:

Losing connection to Domoticz ?

Post by Winjas »

Hi

Newbie here just in first couple of days of initial test setup.
I have Domoticz running on Rpi3 with a Arduino Uno as MySensors gateway via USB (with nrf24 radio). As my initial test setup i have a DHT22 temp+humidity node setup on another Uno with nrf24. My Rpi3 has static ip setup and dynamic dns / port forwarding etc running on my home router.

So i have temp node in bedroom upstairs and rpi/gw downstairs next to my router. When i power everything up, all works perfectly, temp node is showing temp+humidity and updating every minute or so on Domoticz. Remote access even working ok if i drive into town and use my iphone (Pilot app).

Problem ive had, after 2-3hrs when i check Domoticz i get "unable to connect to server, retry", even on home PC (local network). All the LEDs on the MySensors gateway are still lit up and on the radios, if i SSH into my Rpi3, the Pi is still online and working fine. It seems for some reason the Domoticz server on the Pi has stopped and/or crashed ? If i reboot the Rpi3 then all works again fine?

Any ideas please good folks?
---
PS: I am sure its possible to have BOTH Domoticz server and the MySensors gateway running on the same Rpi (with radio attached) but ive had no joy getting that to work, hence i used a usb Uno gateway. Any guides on getting it all on the Rpi ?
Lebo2d9
Posts: 139
Joined: Tuesday 06 September 2016 20:39
Target OS: Raspberry Pi / ODroid
Domoticz version: L stab
Location: Belgium
Contact:

Re: Losing connection to Domoticz ?

Post by Lebo2d9 »

Maybe your power management for your wifi is active.

You can check this with the command "iwconfig"

You should see something like this:


Spoiler: show
wlan0 IEEE 802.11bgn ESSID:"publicwifi"
Mode:Managed Frequency:2.437 GHz Access Point: 00:21:69:61:A1:1C
Bit Rate=54 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:2 Invalid misc:19 Missed beacon:0

lo no wireless extensions.

eth0 no wireless extensions.


If your power management is on then you need to adapt your network settings with

sudo nano /etc/network/interfaces


Spoiler: show
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d


auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
Domoicz on RPI3 (wifi) directly connected 3x ds18b20 for CV temp, Evohome (9 zone), 1 remote 220V switch based on ESP-12. RFXtrx433E, 16x AMST-606, 5 Somfy RTS motors
Domoticz on RPI3(wifi) as slave for terraruim control
More to come
User avatar
Winjas
Posts: 5
Joined: Sunday 25 June 2017 9:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: Kent UK
Contact:

Re: Losing connection to Domoticz ?

Post by Winjas »

Lebo2d9 wrote:Maybe your power management for your wifi is active.
Thanks Lebo for such a detailed answer, much appreciated.
Strangely it appears to be working fine again currently! Since i made the original post its all been online running for 33hrs without issue, so i shall keep an eye on it.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest