Offline message after login on local network (no internet connection)

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!
Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
joran
Posts: 12
Joined: Friday 22 June 2018 0:13
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Offline message after login on local network (no internet connection)

Post by joran » Thursday 11 October 2018 23:37

SystemName" : "linux",
build_time" : "2018-06-23 16:24:51",
dzvents_version" : "2.4.6",
python_version" : "3.5.3 (default, Jan 19 2017, 14:11:04) \n[GCC 6.3.0 20170124]",
version" : "4.9700"
platform: raspberry pi 3

I have got a strange problem with domoticz:
I'm using domoticz to run some scrips using dzvents.
I would like to run it local as well as with an internet connection. The problem I ran into is that when there is no connection to internet I'm getting a offline message on the web-page. This message comes up after logging in on the login page. However all the scrips are still working IO's are still switching and timers still running.

I have tested this with a separate router without the internet cable plugged in. Then everything works fine. After that I shut down domoticz and turned the power off. I unplugged the internet cable from the router, the laptop and raspberry Pi 3 still connected to the router. Now I switched the power back on. Then when I logged in I got the offline message again. I reconnected the internet cable to the router and everything is back to normal.

This is very strange in my opinion. That is because everything should be running local, so no internet connection needed.
Another thing the caught my attention is that the web interface is very slow when running without an internet connection.
This setup has been working in an old version of domoticz but I can't recall the version number.

To "fix" this I disabled the login credentials rebooted and enabled them again. It works for now but I have had this problem in the past and had to make a new image. It's really importen for me that the system can run stable without a connection to the internet. Is there anyone who had the same problem and has a fix that lasts?

Thank you in advance!

joran
Posts: 12
Joined: Friday 22 June 2018 0:13
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: Offline message after login on local network (no internet connection)

Post by joran » Friday 12 October 2018 21:25

I'm still in need for a solution for this problem.
Last edited by joran on Tuesday 16 October 2018 11:24, edited 2 times in total.

joran
Posts: 12
Joined: Friday 22 June 2018 0:13
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: Offline message after login on local network (no internet connection)

Post by joran » Tuesday 16 October 2018 11:22

I have tried to look further into the problem and found the following:

The login problem was solved when is started using basic authorization as login method. But the slow web interface remains.
When there is a internet connection present the Domoticz dashboard calls a json url: http://192.168.2.250:8080/json.htm?type ... 1539637563

I found a description of this json command on the wiki:
Get all Favorite devices
/json.htm?type=devices&used=true&filter=all&favorite=1
This will return only devices that are tagged as Favorite.

This look like Domoticz is "refreshing" the dashboard every couple seconds, this sounds pretty normal so far.
The thing strange thing is that when there is nog internet connection only LAN the json command is called again but gets a different response and takes around 4.5 seconds instead of 14 milliseconds stalling the web-interface. It looks like some information is needed from the internet and Domoticz can't get it because there is no internet connection. Here are the responses on the json command:
With an internet connection
Spoiler: show
{
"ActTime" : 1539637592,
"AstrTwilightEnd" : "20:34",
"AstrTwilightStart" : "06:06",
"CivTwilightEnd" : "19:15",
"CivTwilightStart" : "07:26",
"DayLength" : "10:40",
"NautTwilightEnd" : "19:54",
"NautTwilightStart" : "06:46",
"ServerTime" : "2018-10-15 23:06:32",
"SunAtSouth" : "13:05",
"Sunrise" : "08:00",
"Sunset" : "18:40",
"app_version" : "4.9700",
"status" : "OK",
"title" : "Devices"}

With only LAN connection
Spoiler: show
{
"ActTime" : 1539637440,
"AstrTwilightEnd" : "20:34",
"AstrTwilightStart" : "06:06",
"CivTwilightEnd" : "19:15",
"CivTwilightStart" : "07:26",
"DayLength" : "10:40",
"NautTwilightEnd" : "19:54",
"NautTwilightStart" : "06:46",
"ServerTime" : "2018-10-15 23:04:00",
"SunAtSouth" : "13:05",
"Sunrise" : "08:00",
"Sunset" : "18:40",
"app_version" : "4.9700",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 11,
"Data" : "On",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 1,
"HardwareID" : 5,
"HardwareName" : "Dummy",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0001406B",
"Image" : "Water",
"IsSubDevice" : false,
"LastUpdate" : "2018-10-15 23:04:00",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 100,
"Name" : "Spoelen",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "On",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Switch",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Light/Switch",
"TypeImg" : "lightbulb",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "27"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 1,
"Data" : "On",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 1,
"HardwareID" : 2,
"HardwareName" : "SOM-Control",
"HardwareType" : "PiFace - Raspberry Pi IO expansion board",
"HardwareTypeVal" : 16,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "79",
"Image" : "WallSocket",
"IsSubDevice" : false,
"LastUpdate" : "2018-10-15 23:04:00",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 0,
"Name" : "Trommelmotor (OUT 1)",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "On",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Impuls",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Lighting 1",
"TypeImg" : "lightbulb",
"Unit" : 0,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "1"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 1,
"Data" : "On",
"Description" : "",
"DimmerType" : "none",
"Favorite" : 1,
"HardwareID" : 2,
"HardwareName" : "SOM-Control",
"HardwareType" : "PiFace - Raspberry Pi IO expansion board",
"HardwareTypeVal" : 16,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "79",
"Image" : "WallSocket",
"IsSubDevice" : false,
"LastUpdate" : "2018-10-15 23:04:00",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 0,
"Name" : "HD pomp (OUT 3)",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "On",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Impuls",
"SwitchType" : "On/Off",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Lighting 1",
"TypeImg" : "lightbulb",
"Unit" : 2,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "3"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 101,
"Data" : "5 min",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 5,
"HardwareName" : "Dummy",
"HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
"HardwareTypeVal" : 15,
"HaveTimeout" : false,
"ID" : "00082036",
"Image" : "Klok",
"LastUpdate" : "2018-10-15 23:04:00",
"Name" : "Interval laatste spoeling",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SensorType" : 1,
"SensorUnit" : "min",
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Custom Sensor",
"Timers" : "false",
"Type" : "General",
"TypeImg" : "Klok",
"Unit" : 1,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "36"
},
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "24.3 C",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 6,
"HardwareName" : "Temperatuur",
"HardwareType" : "1-Wire (System)",
"HardwareTypeVal" : 12,
"HaveTimeout" : false,
"ID" : "FFAF",
"LastUpdate" : "2018-10-15 23:02:51",
"Name" : "Temperatuur sensor",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "LaCrosse TX3",
"Temp" : 24.300000000000001,
"Timers" : "false",
"Type" : "Temp",
"TypeImg" : "temperature",
"Unit" : 175,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "38"
}
],
"status" : "OK",
"title" : "Devices"
}
This is why the interface is so slow, can somebody tell me how to fix this? Or why Domoticz is doing this?

User avatar
emme
Posts: 899
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Offline message after login on local network (no internet connection)

Post by emme » Tuesday 16 October 2018 11:51

I know this could be a wired question, but....
did you forward any port to the internet for that box?

NodeRed console (1880) for example?

I have a similar problem and I discovered I've been hacked (well... forwarding a port with NO user/pass control is more stupidity than exposure ;) ) with a bitcoin mining script

if you run htop (install it with sudo apt-get install htop if there is not) do you see an heavy load on the CPU?
ciao
M
The most dangerous phrase in any language is:
"We always done this way"

joran
Posts: 12
Joined: Friday 22 June 2018 0:13
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: Offline message after login on local network (no internet connection)

Post by joran » Tuesday 16 October 2018 13:56

Thank you for the reply. My Domoticz is only accessible on my network at home. No ports are forwarded.
The internet connection i'm referring to is the cable between my modem and router.

User avatar
emme
Posts: 899
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Offline message after login on local network (no internet connection)

Post by emme » Tuesday 16 October 2018 14:08

then check with Htop (or top) what's is consuming your CPU ;)
The most dangerous phrase in any language is:
"We always done this way"

Post Reply

Who is online

Users browsing this forum: Bing [Bot], differentieel and 4 guests