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

[network] Issue 6495 #6851

Merged
merged 3 commits into from Feb 11, 2020
Merged

[network] Issue 6495 #6851

merged 3 commits into from Feb 11, 2020

Conversation

clinique
Copy link
Contributor

Recreating PR for issue #6495 and adressing two potential NPE

Signed-off-by: Gaël L'hopital <gael@lhopital.org>

Conflicts:
	bom/openhab-addons/pom.xml
	bom/openhab-core-index/pom.xml
	bom/pom.xml
	bom/runtime-index/pom.xml
	bom/test-index/pom.xml
	bundles/org.openhab.binding.airquality/pom.xml
	bundles/org.openhab.binding.airvisualnode/pom.xml
	bundles/org.openhab.binding.allplay/pom.xml
	bundles/org.openhab.binding.amazondashbutton/pom.xml
	bundles/org.openhab.binding.amazonechocontrol/pom.xml
	bundles/org.openhab.binding.ambientweather/pom.xml
	bundles/org.openhab.binding.astro/pom.xml
	bundles/org.openhab.binding.atlona/pom.xml
	bundles/org.openhab.binding.autelis/pom.xml
	bundles/org.openhab.binding.avmfritz/pom.xml
	bundles/org.openhab.binding.bigassfan/pom.xml
	bundles/org.openhab.binding.bluetooth.bluegiga/pom.xml
	bundles/org.openhab.binding.bluetooth.bluez/pom.xml
	bundles/org.openhab.binding.bluetooth.blukii/pom.xml
	bundles/org.openhab.binding.bluetooth.ruuvitag/pom.xml
	bundles/org.openhab.binding.bluetooth/pom.xml
	bundles/org.openhab.binding.boschindego/pom.xml
	bundles/org.openhab.binding.bosesoundtouch/pom.xml
	bundles/org.openhab.binding.buienradar/pom.xml
	bundles/org.openhab.binding.chromecast/pom.xml
	bundles/org.openhab.binding.cm11a/pom.xml
	bundles/org.openhab.binding.coolmasternet/pom.xml
	bundles/org.openhab.binding.daikin/pom.xml
	bundles/org.openhab.binding.darksky/pom.xml
	bundles/org.openhab.binding.deconz/pom.xml
	bundles/org.openhab.binding.denonmarantz/pom.xml
	bundles/org.openhab.binding.digiplex/pom.xml
	bundles/org.openhab.binding.digitalstrom/pom.xml
	bundles/org.openhab.binding.dlinksmarthome/pom.xml
	bundles/org.openhab.binding.dmx/pom.xml
	bundles/org.openhab.binding.doorbird/pom.xml
	bundles/org.openhab.binding.dscalarm/pom.xml
	bundles/org.openhab.binding.dsmr/pom.xml
	bundles/org.openhab.binding.dwdunwetter/pom.xml
	bundles/org.openhab.binding.elerotransmitterstick/pom.xml
	bundles/org.openhab.binding.enocean/pom.xml
	bundles/org.openhab.binding.enturno/pom.xml
	bundles/org.openhab.binding.evohome/pom.xml
	bundles/org.openhab.binding.exec/pom.xml
	bundles/org.openhab.binding.feed/pom.xml
	bundles/org.openhab.binding.feican/pom.xml
	bundles/org.openhab.binding.folding/pom.xml
	bundles/org.openhab.binding.foobot/pom.xml
	bundles/org.openhab.binding.freebox/pom.xml
	bundles/org.openhab.binding.fronius/pom.xml
	bundles/org.openhab.binding.fsinternetradio/pom.xml
	bundles/org.openhab.binding.ftpupload/pom.xml
	bundles/org.openhab.binding.gardena/pom.xml
	bundles/org.openhab.binding.globalcache/pom.xml
	bundles/org.openhab.binding.gpstracker/pom.xml
	bundles/org.openhab.binding.groheondus/pom.xml
	bundles/org.openhab.binding.harmonyhub/pom.xml
	bundles/org.openhab.binding.hdanywhere/pom.xml
	bundles/org.openhab.binding.hdpowerview/pom.xml
	bundles/org.openhab.binding.helios/pom.xml
	bundles/org.openhab.binding.heos/pom.xml
	bundles/org.openhab.binding.homematic/pom.xml
	bundles/org.openhab.binding.hpprinter/pom.xml
	bundles/org.openhab.binding.hue/pom.xml
	bundles/org.openhab.binding.hydrawise/pom.xml
	bundles/org.openhab.binding.hyperion/pom.xml
	bundles/org.openhab.binding.iaqualink/pom.xml
	bundles/org.openhab.binding.icloud/pom.xml
	bundles/org.openhab.binding.ihc/pom.xml
	bundles/org.openhab.binding.innogysmarthome/pom.xml
	bundles/org.openhab.binding.ipp/pom.xml
	bundles/org.openhab.binding.irtrans/pom.xml
	bundles/org.openhab.binding.jeelink/pom.xml
	bundles/org.openhab.binding.keba/pom.xml
	bundles/org.openhab.binding.km200/pom.xml
	bundles/org.openhab.binding.knx/pom.xml
	bundles/org.openhab.binding.kodi/pom.xml
	bundles/org.openhab.binding.konnected/pom.xml
	bundles/org.openhab.binding.kostalinverter/pom.xml
	bundles/org.openhab.binding.lametrictime/pom.xml
	bundles/org.openhab.binding.leapmotion/pom.xml
	bundles/org.openhab.binding.lghombot/pom.xml
	bundles/org.openhab.binding.lgtvserial/pom.xml
	bundles/org.openhab.binding.lgwebos/pom.xml
	bundles/org.openhab.binding.lifx/pom.xml
	bundles/org.openhab.binding.linuxinput/pom.xml
	bundles/org.openhab.binding.lirc/pom.xml
	bundles/org.openhab.binding.logreader/pom.xml
	bundles/org.openhab.binding.loxone/pom.xml
	bundles/org.openhab.binding.lutron/pom.xml
	bundles/org.openhab.binding.mail/pom.xml
	bundles/org.openhab.binding.max/pom.xml
	bundles/org.openhab.binding.mcp23017/pom.xml
	bundles/org.openhab.binding.melcloud/pom.xml
	bundles/org.openhab.binding.meteoblue/pom.xml
	bundles/org.openhab.binding.meteostick/pom.xml
	bundles/org.openhab.binding.miele/pom.xml
	bundles/org.openhab.binding.mihome/pom.xml
	bundles/org.openhab.binding.miio/pom.xml
	bundles/org.openhab.binding.milight/pom.xml
	bundles/org.openhab.binding.millheat/pom.xml
	bundles/org.openhab.binding.minecraft/pom.xml
	bundles/org.openhab.binding.modbus/pom.xml
	bundles/org.openhab.binding.mqtt.generic/pom.xml
	bundles/org.openhab.binding.mqtt.homeassistant/pom.xml
	bundles/org.openhab.binding.mqtt.homie/pom.xml
	bundles/org.openhab.binding.mqtt/pom.xml
	bundles/org.openhab.binding.nanoleaf/pom.xml
	bundles/org.openhab.binding.neato/pom.xml
	bundles/org.openhab.binding.neeo/pom.xml
	bundles/org.openhab.binding.neohub/pom.xml
	bundles/org.openhab.binding.nest/pom.xml
	bundles/org.openhab.binding.netatmo/pom.xml
	bundles/org.openhab.binding.network/pom.xml
	bundles/org.openhab.binding.networkupstools/pom.xml
	bundles/org.openhab.binding.nibeheatpump/pom.xml
	bundles/org.openhab.binding.nibeuplink/pom.xml
	bundles/org.openhab.binding.nikobus/pom.xml
	bundles/org.openhab.binding.nikohomecontrol/pom.xml
	bundles/org.openhab.binding.ntp/pom.xml
	bundles/org.openhab.binding.nuki/pom.xml
	bundles/org.openhab.binding.oceanic/pom.xml
	bundles/org.openhab.binding.omnikinverter/pom.xml
	bundles/org.openhab.binding.onebusaway/pom.xml
	bundles/org.openhab.binding.onewire/pom.xml
	bundles/org.openhab.binding.onewiregpio/pom.xml
	bundles/org.openhab.binding.onkyo/pom.xml
	bundles/org.openhab.binding.opengarage/pom.xml
	bundles/org.openhab.binding.opensprinkler/pom.xml
	bundles/org.openhab.binding.openuv/pom.xml
	bundles/org.openhab.binding.openweathermap/pom.xml
	bundles/org.openhab.binding.orvibo/pom.xml
	bundles/org.openhab.binding.paradoxalarm/pom.xml
	bundles/org.openhab.binding.pentair/pom.xml
	bundles/org.openhab.binding.phc/pom.xml
	bundles/org.openhab.binding.pioneeravr/pom.xml
	bundles/org.openhab.binding.pixometer/pom.xml
	bundles/org.openhab.binding.pjlinkdevice/pom.xml
	bundles/org.openhab.binding.plclogo/pom.xml
	bundles/org.openhab.binding.plugwise/pom.xml
	bundles/org.openhab.binding.powermax/pom.xml
	bundles/org.openhab.binding.pulseaudio/pom.xml
	bundles/org.openhab.binding.pushbullet/pom.xml
	bundles/org.openhab.binding.regoheatpump/pom.xml
	bundles/org.openhab.binding.rfxcom/pom.xml
	bundles/org.openhab.binding.rme/pom.xml
	bundles/org.openhab.binding.robonect/pom.xml
	bundles/org.openhab.binding.rotel/pom.xml
	bundles/org.openhab.binding.rotelra1x/pom.xml
	bundles/org.openhab.binding.russound/pom.xml
	bundles/org.openhab.binding.samsungtv/pom.xml
	bundles/org.openhab.binding.satel/pom.xml
	bundles/org.openhab.binding.seneye/pom.xml
	bundles/org.openhab.binding.sensebox/pom.xml
	bundles/org.openhab.binding.serialbutton/pom.xml
	bundles/org.openhab.binding.shelly/pom.xml
	bundles/org.openhab.binding.siemensrds/pom.xml
	bundles/org.openhab.binding.silvercrestwifisocket/pom.xml
	bundles/org.openhab.binding.sinope/pom.xml
	bundles/org.openhab.binding.sleepiq/pom.xml
	bundles/org.openhab.binding.smaenergymeter/pom.xml
	bundles/org.openhab.binding.smartmeter/pom.xml
	bundles/org.openhab.binding.snmp/pom.xml
	bundles/org.openhab.binding.solaredge/pom.xml
	bundles/org.openhab.binding.solarlog/pom.xml
	bundles/org.openhab.binding.somfytahoma/pom.xml
	bundles/org.openhab.binding.sonos/pom.xml
	bundles/org.openhab.binding.sonyaudio/pom.xml
	bundles/org.openhab.binding.sonyprojector/pom.xml
	bundles/org.openhab.binding.spotify/pom.xml
	bundles/org.openhab.binding.squeezebox/pom.xml
	bundles/org.openhab.binding.synopanalyzer/pom.xml
	bundles/org.openhab.binding.systeminfo/pom.xml
	bundles/org.openhab.binding.tado/pom.xml
	bundles/org.openhab.binding.tankerkoenig/pom.xml
	bundles/org.openhab.binding.telegram/pom.xml
	bundles/org.openhab.binding.tellstick/pom.xml
	bundles/org.openhab.binding.tesla/pom.xml
	bundles/org.openhab.binding.toon/pom.xml
	bundles/org.openhab.binding.tplinksmarthome/pom.xml
	bundles/org.openhab.binding.tradfri/pom.xml
	bundles/org.openhab.binding.unifi/pom.xml
	bundles/org.openhab.binding.urtsi/pom.xml
	bundles/org.openhab.binding.valloxmv/pom.xml
	bundles/org.openhab.binding.vektiva/pom.xml
	bundles/org.openhab.binding.velbus/pom.xml
	bundles/org.openhab.binding.vitotronic/pom.xml
	bundles/org.openhab.binding.volvooncall/pom.xml
	bundles/org.openhab.binding.weathercompany/pom.xml
	bundles/org.openhab.binding.weatherunderground/pom.xml
	bundles/org.openhab.binding.wemo/pom.xml
	bundles/org.openhab.binding.wifiled/pom.xml
	bundles/org.openhab.binding.windcentrale/pom.xml
	bundles/org.openhab.binding.xmltv/pom.xml
	bundles/org.openhab.binding.xmppclient/pom.xml
	bundles/org.openhab.binding.yamahareceiver/pom.xml
	bundles/org.openhab.binding.yeelight/pom.xml
	bundles/org.openhab.binding.zoneminder/pom.xml
	bundles/org.openhab.binding.zway/pom.xml
	bundles/org.openhab.extensionservice.marketplace.automation/pom.xml
	bundles/org.openhab.extensionservice.marketplace/pom.xml
	bundles/org.openhab.io.homekit/pom.xml
	bundles/org.openhab.io.hueemulation/pom.xml
	bundles/org.openhab.io.imperihome/pom.xml
	bundles/org.openhab.io.javasound/pom.xml
	bundles/org.openhab.io.mqttembeddedbroker/pom.xml
	bundles/org.openhab.io.neeo/pom.xml
	bundles/org.openhab.io.openhabcloud/pom.xml
	bundles/org.openhab.io.transport.modbus/pom.xml
	bundles/org.openhab.io.webaudio/pom.xml
	bundles/org.openhab.persistence.mapdb/pom.xml
	bundles/org.openhab.transform.bin2json/pom.xml
	bundles/org.openhab.transform.exec/pom.xml
	bundles/org.openhab.transform.javascript/pom.xml
	bundles/org.openhab.transform.jinja/pom.xml
	bundles/org.openhab.transform.jsonpath/pom.xml
	bundles/org.openhab.transform.map/pom.xml
	bundles/org.openhab.transform.regex/pom.xml
	bundles/org.openhab.transform.scale/pom.xml
	bundles/org.openhab.transform.xpath/pom.xml
	bundles/org.openhab.transform.xslt/pom.xml
	bundles/org.openhab.voice.googletts/pom.xml
	bundles/org.openhab.voice.mactts/pom.xml
	bundles/org.openhab.voice.marytts/pom.xml
	bundles/org.openhab.voice.picotts/pom.xml
	bundles/org.openhab.voice.pollytts/pom.xml
	bundles/org.openhab.voice.voicerss/pom.xml
	bundles/pom.xml
	features/openhab-addons-external/pom.xml
	features/openhab-addons/pom.xml
	features/pom.xml
	itests/org.openhab.binding.astro.tests/pom.xml
	itests/org.openhab.binding.avmfritz.tests/pom.xml
	itests/org.openhab.binding.feed.tests/pom.xml
	itests/org.openhab.binding.hue.tests/pom.xml
	itests/org.openhab.binding.max.tests/pom.xml
	itests/org.openhab.binding.nest.tests/pom.xml
	itests/org.openhab.binding.ntp.tests/pom.xml
	itests/org.openhab.binding.systeminfo.tests/pom.xml
	itests/org.openhab.binding.tradfri.tests/pom.xml
	itests/org.openhab.binding.wemo.tests/pom.xml
	itests/org.openhab.io.hueemulation.tests/pom.xml
	itests/org.openhab.persistence.mapdb.tests/pom.xml
	itests/pom.xml
	pom.xml
…tential issues corrections

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
@clinique
Copy link
Contributor Author

Replaces PR #6631

@TravisBuddy
Copy link

Travis tests were successful

Hey @clinique,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
@clinique clinique requested a review from J-N-K January 20, 2020 16:05
@TravisBuddy
Copy link

Travis tests were successful

Hey @clinique,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@Hilbrand Hilbrand changed the title Issue 6495 [network] Issue 6495 Jan 22, 2020
@Hilbrand Hilbrand added the bug An unexpected problem or unintended behavior of an add-on label Jan 22, 2020
@martinvw
Copy link
Member

@J-N-K can you take care of this one?

Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left one more comment inside. Sorry for the delay

} else if (SpeedTestError.SOCKET_TIMEOUT.equals(testError)) {
timeouts--;
if (timeouts <= 0) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Max timeout count reached");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can the user reset this counter? I'm thinking of e.g. a network connection problem which takes half a day or so.

Or maybe a setting of configuration.maxTimeouts=0 disables timeouts at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling the thing is an option no ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. But what do you think of the timeout-counter disable?

@J-N-K
Copy link
Member

J-N-K commented Feb 11, 2020

We can add a disable later if needed.

@J-N-K J-N-K merged commit dd8ab93 into openhab:2.5.x Feb 11, 2020
boehan pushed a commit to boehan/openhab-addons that referenced this pull request Feb 15, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
andibraeu pushed a commit to andibraeu/openhab-addons that referenced this pull request Feb 17, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
@kaikreuzer kaikreuzer added this to the 2.5.2 milestone Feb 19, 2020
leluna pushed a commit to leluna/openhab2-addons that referenced this pull request Mar 21, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
Signed-off-by: leluna <hengrui.jiang@googlemail.com>
Hans-Reiner pushed a commit to Hans-Reiner/openhab2-addons that referenced this pull request Apr 11, 2020
Fixes openhab#6495

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
Signed-off-by: Hans-Reiner Hoffmann <hans-reiner.hoffmann@gmx.de>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request May 29, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
@clinique clinique deleted the Issue_6495 branch June 5, 2020 11:14
LoungeFlyZ pushed a commit to LoungeFlyZ/openhab2-addons that referenced this pull request Jun 8, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
J-N-K pushed a commit to J-N-K/openhab-addons that referenced this pull request Jul 14, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Fixes openhab#6495 

Signed-off-by: Gaël L'hopital <gael@lhopital.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants