tydom2mqtt icon indicating copy to clipboard operation
tydom2mqtt copied to clipboard

Tydom2MQTT error "Incoming payload : None Error : type object 'HTTPResponse' has no attribute 'from_httplib'"

Open l-Seiya-l opened this issue 2 years ago • 2 comments

Hi! Since yesturday, i have the following issue, according to the log :

STARTING TYDOM2MQTT
Dectecting environnement......
/data/options.json detected ! Hassio Addons Environnement : parsing options.json....
{'TYDOM_MAC': '001A2502AXXX', 'TYDOM_IP': '192.168.1.40', 'TYDOM_PASSWORD': 'XXX', 'TYDOM_ALARM_PIN': 123456, 'TYDOM_ALARM_HOME_ZONE': 1, 'TYDOM_ALARM_NIGHT_ZONE': 2, 'MQTT_HOST': 'localhost', 'MQTT_USER': 'XXX', 'MQTT_PASSWORD': 'XXX', 'MQTT_PORT': 1883, 'MQTT_SSL': False, 'log_level': 'info'}
Initialising TydomClient Class
Setting local mode context.
Starting main loop_task
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Attempting MQTT connection...
MQTT host :  localhost
MQTT user :  XXX
##################################
Subscribing to :  +/tydom/#
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
TYDOM WEBSOCKET CONNECTION INITIALISING....                     
Building headers, getting 1st handshake and authentication....
Upgrading http connection to websocket....
Attempting websocket connection with tydom hub.......................
Host Target :
192.168.1.40
Tydom Client is connected to websocket and ready !
Requesting 1st data...
>>>>>>>>>> Sending to tydom client..... GET /info
##################################
##################################
>>>>>>>>>> Sending to tydom client..... POST /refresh/all
>>>>>>>>>> Sending to tydom client..... GET /configs/file
>>>>>>>>>> Sending to tydom client..... GET /devices/data
<<<<<<<<<< Receiving from tydom_client...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
receiveMessage error
RAW :
b'HTTP/1.1 200 OK\r\nServer: Tydom-001A2502A840\r\nUri-Origin: /info\r\nContent-Type: application/json\r\nTransfer-Encoding: chunked\r\nTransac-Id: 0\r\n\r\n1\r\n{\r\n18\r\n"productName": "TYDOM1",\r\n16\r\n"mac": "001A2502A840",\r\n11\r\n"config": "prod",\r\n12\r\n"bddEmpty": false,\r\nF\r\n"bddStatus": 0,\r\n10\r\n"apiMode": true,\r\n1C\r\n"mainVersionSW": "03.08.18",\r\n1C\r\n"mainVersionHW": "00.00.01",\r\n14\r\n"mainId": "6700103",\r\n1C\r\n"mainReference": "21800010",\r\n1B\r\n"keyVersionSW": "01.04.33",\r\n1B\r\n"keyVersionHW": "00.00.01",\r\n1E\r\n"keyVersionStack": "04.00.50",\r\n1B\r\n"keyReference": "21800011",\r\n38\r\n"bootReference": "P21800012", "bootVersion": "01.00.03",\r\nF\r\n"TYDOM.dat": 4,\r\n11\r\n"config.json": 4,\r\nE\r\n"mom.json": 1,\r\n11\r\n"gateway.dat": 5,\r\nF\r\n"bdd.json": 92,\r\n13\r\n"collect.json": 10,\r\n12\r\n"groups.json": 57,\r\n13\r\n"mom_api.json": 18,\r\n14\r\n"scenario.json": 77,\r\n11\r\n"site.json": 311,\r\n12\r\n"bdd_mig.json": 1,\r\n13\r\n"info_mig.json": 0,\r\n13\r\n"info_col.json": 1,\r\n13\r\n"absence.json": 15,\r\n12\r\n"anticip.json": 5,\r\n12\r\n"trigger.json": 0,\r\n12\r\n"bioclim.json": 0,\r\n16\r\n"data_config.json": 0,\r\n26\r\n"urlMediation": "mediation.tydom.com",\r\n15\r\n"pltRegistered":true,\r\n19\r\n"updateAvailable": false,\r\n17\r\n"passwordEmpty": false,\r\nF\r\n"maintenance":{\r\n28\r\n"id": "ffffffffffffffffffffffffffffffff"\r\n2\r\n},\r\nB\r\n"geoloc": {\r\n15\r\n"longitude": 1399740,\r\n14\r\n"latitude": 43467514\r\n2\r\n},\r\nA\r\n"clock": {\r\n25\r\n"clock": "2023-07-18T11:02:36+02:00",\r\n10\r\n"source": "ntp",\r\nF\r\n"timezone": 60,\r\n14\r\n"summerOffset": "ON"\r\n2\r\n},\r\nC\r\n"moments": {\r\nC\r\n"suspend": {\r\n7\r\n"to": 0\r\n3\r\n}},\r\nF\r\n"local_claim":{\r\n12\r\n"status": "CLOSE",\r\n24\r\n"lastAccess": "2014-01-01T00:00:00Z"\r\n2\r\n},\r\nC\r\n"weather": {\r\n28\r\n"outTempSrc":{"devId":null,"epId":null},\r\n27\r\n"weatherSrc":{"devId":null,"epId":null}\r\n2\r\n},\r\nE\r\n"protocols": [\r\n71\r\n{"protocol":"X3D", "available":true, "installed":true, "ready":true, "status":"running", "installStatus":"idle"},\r\n3B\r\n{"protocol":"ZIGBEE", "available":true, "installed":false},\r\n27\r\n{"protocol":"X3DV", "available":false},\r\n2C\r\n{"protocol":"PltService", "available":false}\r\n1\r\n]\r\n1\r\n}\r\n0\r\n\r\n'
Incoming payload :
None
Error :
type object 'HTTPResponse' has no attribute 'from_httplib'
Exiting to ensure systemd restart....
Starting /opt/tydom2mqtt/main.py

If you have an idea about this issue, i'll take it.
Note that have installed a 3.x version of the app to change the password but previously, i was on the latest version of the app on my iphone... I thought it would be ok with the previous app but nothing changed...

Thanks for your help!

l-Seiya-l avatar Jul 18 '23 09:07 l-Seiya-l

Hi,

Your startup log doesn't seem to be printed by a recent version of tydom2mqtt 🤔 .

It should look something like:

2023-09-02 11:09:46,396 - Starting tydom2mqtt
2023-09-02 11:09:46,397 - Validating configuration ({
    "deltadore_login": null,
    "deltadore_password": "",
    "log_level": "INFO",
    "mqtt_host": "mosquitto",
    "mqtt_password": "",
    "mqtt_port": 1883,
    "mqtt_ssl": false,
    "mqtt_user": null,
    "tydom_alarm_home_zone": 1,
    "tydom_alarm_night_zone": 2,
    "tydom_alarm_pin": "",
    "tydom_ip": "192.168.68.51",
    "tydom_mac": "XXX",
    "tydom_password": "E********v"
}

2023-09-02 11:09:46,398 - The configuration is valid
2023-09-02 11:09:46,399 - tydom.TydomClient    - INFO    - Configure local mode (192.168.68.51)
2023-09-02 11:09:46,407 - mqtt.MqttClient      - INFO    - Connecting to mqtt broker (host=mosquitto, port=1883, user=, ssl=False)
2023-09-02 11:09:46,417 - tydom.TydomClient    - INFO    - Connecting to tydom
2023-09-02 11:09:47,616 - mqtt.MqttClient      - INFO    - Connected to mqtt broker
2023-09-02 11:09:47,662 - mqtt.MqttClient      - INFO    - status message received (topic=homeassistant/status, message=online)
2023-09-02 11:09:47,662 - tydom.TydomClient    - WARNING - Cannot send message to Tydom because no connection has been established yet
2023-09-02 11:09:48,785 - tydom.TydomClient    - INFO    - Connected to tydom
2023-09-02 11:09:48,785 - tydom.TydomClient    - INFO    - Setup tydom client
...

Can you upgrade to the latest version (fmartinou/tydom2mqtt:3.3.1 at this time) and confirm then if the error is still present or gone?

Thank you.

fmartinou avatar Sep 02 '23 11:09 fmartinou

Thanks for your answer. You are right. I still was on the beta version of the app… i did not notice that i had to install an other version of the app i thought automatic update would work… sorry for your time! And thanks again.

l-Seiya-l avatar Sep 02 '23 11:09 l-Seiya-l