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

WebServer:8080 thread seems to have ended unexpectedly #70

Open
boggiz opened this issue May 9, 2024 · 0 comments
Open

WebServer:8080 thread seems to have ended unexpectedly #70

boggiz opened this issue May 9, 2024 · 0 comments

Comments

@boggiz
Copy link

boggiz commented May 9, 2024

Hello,
I currently upgraded from 2023.1 to 2024.4 because problems with Python & Paho MQTT.
Some of them are resolved but not this one :

`import sys
sys.path.append('/usr/local/lib/python3.9/dist-packages/')
import DomoticzEvents as DE # voir https://www.domoticz.com/wiki/Python_Events
import requests # https://fr.python-requests.org/en/latest/user/quickstart.html
from requests.auth import HTTPBasicAuth
from paho.mqtt import client as mqtt

Broker = "192.168.0.45"
PortaBroker = 11883
KeepAliveBroker = 60
clientID = "Boggiz"

CodePG = DE.user_variables["NewCodePG"]

if DE.changed_device_name == "Test Python" and DE.Devices["Test Python"].n_value_string == "On":
client = mqtt.Client(clientID) #create new instance

rc= client.connect(Broker,PortaBroker,KeepAliveBroker) #connect to broker
if  rc != 0: print("[E-STATUS] Connection au Broker. Resultat de la Connection: " + str(rc))

if CodePG == '' : CodePG = 'Re-Init'  # si ESP recoit ce message il renverra un nouveau code sans ouvrir la porte!

client.publish("home/domoticz/PG/Dz2PG", CodePG, qos=0, retain=False)    #publish message

# initialisation de la User Variable avant reception du nouveau code
url= "http://192.168.0.45:18080/json.htm?type=command&param=updateuservariable&vname=NewCodePG&vtype=string&vvalue=" 
CLE64 = {"Authorization" : "Basic RG9tb0JvZ2dpejpEUyFhZnMhYWZ5MTk1MA=="}
rc = requests.get(url, headers= CLE64)
if rc != 0: print("[E-INIT User Variable] erreur: " + str(rc))`

This code works fine, the user variable is correctly initialized but a minute later, Domoticz froze with the error above (title).
An idea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant