samuel_john64
Posts: 17
Joined: Wed Mar 15, 2017 9:55 am

sleekxmpp.xmlstream could not Connect Error

Wed Mar 15, 2017 10:28 am

im Receiving the error when i try to run my coding.what should i do to solve this error?

ERROR:sleekxmpp.xmlstream.xmlstream:Could not connect to 104.198.88.230:5222. Socket Error #110: Connection timed out


Coding

from time import sleep
import mcp3008
from controlmypi import ControlMyPi
import logging

def on_msg(conn, key, value):
pass

logging.basicConfig(level=logging.INFO)

p = [
[ ['G','moist','level',0,0,1023] ],
]

conn = ControlMyPi('soilmoisturemonitoring@xmpp.jp', 'soilmoisturemonitoring123', 'moisture', 'Moisture monitor', p, on_msg)
if conn.start_control():
try:
while True:
m = mcp3008.readadc(5)
conn.update_status({'moist':m})
sleep(30)
finally:
conn.stop_control()

User avatar
DougieLawson
Posts: 39301
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: sleekxmpp.xmlstream could not Connect Error

Wed Mar 15, 2017 10:33 am

Who owns that server at: 104.198.88.230 (which shows as an address somewhere in San Jose, CA, USA)? The server either isn't open to the public internet or doesn't have the right services running.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

samuel_john64
Posts: 17
Joined: Wed Mar 15, 2017 9:55 am

Re: sleekxmpp.xmlstream could not Connect Error

Wed Mar 15, 2017 4:09 pm

not sure the owner of the server seems i got the source code from online and i think the server links to this webside http://www.controlmypi.com/

User avatar
DougieLawson
Posts: 39301
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: sleekxmpp.xmlstream could not Connect Error

Wed Mar 15, 2017 5:25 pm

OK, that makes sense. The server wasn't running when your system tried to connect to it. That's probably a transient error.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Python”