smar000 / jlr2mqtt Goto Github PK
View Code? Open in Web Editor NEWA simple mqtt wrapper around @ardevd's `jlrpy` library for accessing Jaguar Land Rover's Remote Car API
A simple mqtt wrapper around @ardevd's `jlrpy` library for accessing Jaguar Land Rover's Remote Car API
Previously i was using paho-mqtt version 1.5.0. In which i faced a problem if the keep-alive is set to 0. Then I referred to this link (I also had the same problem) [https://github.com//issues/2] #2. Then i tried with paho mqtt version 1.4. In which, It worked fine for non secure MQTT. Where as for secure MQTT, I got the following error
mqttc.connect(broker,` port=port, keepalive =0) #returns on_connect()
File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 839, in connect
return self.reconnect()
File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 994, in reconnect
sock.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 1077, in do_handshake
self._sslobj.do_handshake()
File "/usr/lib/python3.6/ssl.py", line 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLWantReadError: The operation did not complete (read) (_ssl.c:852)
If i set the keepalive > 0 it is working fine for MQTTs.
Could you please explain me what could be the cause of this following error?
The script only appears to check for the first vehicle status:
jlr_connection.vehicles[0]
This is called only a handful of times in the code. I have two vehicles on the same account, so to access my second vehicle I believe I must call:
jlr_connection.vehicles[1]
Could the script and configuration file be enhanced to allow me to pass this array index through via a config file setting?
Hello, Managed to install this but when i run it i get the error below. any ideas?
import jlr2mqtt.py
2020-03-22 17:46:55,276 - INFO - Connecting to mqtt server 192.168.1.5
Traceback (most recent call last):
File "", line 1, in
File "/home/pi/Desktop/jlr/jlr2mqtt.py", line 516, in
mqtt_client = initialise_mqtt_client(mqtt.Client(client_id=MQTT_CLIENTID))
File "/home/pi/Desktop/jlr/jlr2mqtt.py", line 102, in initialise_mqtt_client
mqtt_client.connect(MQTT_SERVER, port=1883, keepalive=0, bind_address="")
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 937, in connect
return self.reconnect()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
sock = self._create_socket_connection()
File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
File "/usr/lib/python3.7/socket.py", line 727, in create_connection
raise err
File "/usr/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
BlockingIOError: [Errno 115] Operation now in progress
This issue was originally discussed on the OH2 forum.
2020-04-30 11:06:18,650 - INFO - Connecting to mqtt server 127.0.0.1
Traceback (most recent call last):
File "jlr2mqtt.py", line 579, in <module>
mqtt_client = initialise_mqtt_client(mqtt.Client(client_id=MQTT_CLIENTID))
File "jlr2mqtt.py", line 108, in initialise_mqtt_client
mqtt_client.connect(MQTT_SERVER, port=1883, keepalive=0, bind_address="")
File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 937, in connect
return self.reconnect()
File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 1071, in reconnect
sock = self._create_socket_connection()
File "/usr/local/lib/python3.6/dist-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
File "/usr/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
BlockingIOError: [Errno 115] Operation now in progress
The above error occurs when using the local LAN IP and the localhost IP. Testing using the guide here confirms the mosquitto server is working properly and subscribe/publish works.
Python version: 3.6.9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.