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

Kuksa val to cloud mqtt #696

Open
kulta4 opened this issue Oct 30, 2023 · 9 comments
Open

Kuksa val to cloud mqtt #696

kulta4 opened this issue Oct 30, 2023 · 9 comments

Comments

@kulta4
Copy link

kulta4 commented Oct 30, 2023

Hi,
I am trying the same as #15 but in my case I don't have this testclient I want to connect this kuksa val to cloud through mqtt. so how to fix this case i able to do till dbcfeeder to kuksa val (databroker). what should be the next step to connect to cloud? Thank you.

@SebastianSchildt
Copy link
Contributor

There is currently no "generic" component to do that, some discussion in this issue might help #684

Specifically for MQTT maybe some of the code here can be recyled https://github.com/SebastianSchildt/kuksa-tasmota-provider

It is all hardcoded to connect to a TASMOTA smart device, but it does show how to subscribe in KUKSA and then sending it to some MQTT topic

@kulta4
Copy link
Author

kulta4 commented Nov 1, 2023

There is currently no "generic" component to do that, some discussion in this issue might help #684

Specifically for MQTT maybe some of the code here can be recyled https://github.com/SebastianSchildt/kuksa-tasmota-provider

It is all hardcoded to connect to a TASMOTA smart device, but it does show how to subscribe in KUKSA and then sending it to some MQTT topic

Thank you for the update.
I have tried this but it doesn't show any signals received there. and this repo also doesn't have discription to follow.

@kulta4
Copy link
Author

kulta4 commented Nov 3, 2023

Hi SebastianSchildt,
While try to run the provide with kuksa databroker I have received an Error message can please help me to implement this.

There is currently no "generic" component to do that, some discussion in this issue might help #684

Specifically for MQTT maybe some of the code here can be recyled https://github.com/SebastianSchildt/kuksa-tasmota-provider

It is all hardcoded to connect to a TASMOTA smart device, but it does show how to subscribe in KUKSA and then sending it to some MQTT topic

Hi SebastianSchildt,
While try to run the provide with kuksa databroker I have received an Error message can please help me to implement this.

KUKSA Provider
In main
Vehicle.Body.Lights.Running.IsOn target is set to True
Traceback (most recent call last):
File "provider.py", line 59, in
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "provider.py", line 51, in main
await asyncio.gather(
File "provider.py", line 39, in serve_static_light
async with aiomqtt.Client(hostname=MQTT_HOST, port=MQTT_PORT) as client:
File "/home/kulta/.local/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 828, in aenter
await self.connect()
File "/home/kulta/.local/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 379, in connect
await loop.run_in_executor(
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/kulta/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 912, in connect
self.connect_async(host, port, keepalive,
File "/home/kulta/.local/lib/python3.8/site-packages/paho/mqtt/client.py", line 979, in connect_async
if port <= 0:
TypeError: '<=' not supported between instances of 'str' and 'int'

@SebastianSchildt
Copy link
Contributor

According to the error you likely used a string as port number? The orginal example has a number https://github.com/SebastianSchildt/kuksa-tasmota-provider/blob/08a218c943710c8f8a7d3b77ea05fd85b81f7b6d/provider.py#L26

@kulta4
Copy link
Author

kulta4 commented Nov 7, 2023

According to the error you likely used a string as port number? The orginal example has a number https://github.com/SebastianSchildt/kuksa-tasmota-provider/blob/08a218c943710c8f8a7d3b77ea05fd85b81f7b6d/provider.py#L26

if I have this code and the kuksa databroker running in my local and I try to connect the with c2e-hono-mqtt-adaptor which I have in AWS and deploy on Kubernetes. where and how can I get the received message from hono.

with this code I changed the MQTT IP as cluster IP of my c2e-hono-mqtt-adaptor and port. in this case the code is running and I got the update from kuksa databroker but the script is not keepalive for this I add the field keepalive=60 but it doesn't work the script is disconnected within 2seconds.

Traceback (most recent call last):
File "provider.py", line 59, in
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "provider.py", line 51, in main
await asyncio.gather(
File "provider.py", line 43, in serve_static_light
async with aiomqtt.Client(hostname=MQTT_HOST, port=MQTT_PORT) as client:
File "/home/kulta/.local/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 828, in aenter
await self.connect()
File "/home/kulta/.local/lib/python3.8/site-packages/asyncio_mqtt/client.py", line 396, in connect
raise MqttError(str(error)) from None
asyncio_mqtt.error.MqttError: timed out

@kulta4
Copy link
Author

kulta4 commented Nov 16, 2023

Hi there,
Any update on this above case?

@SebastianSchildt
Copy link
Contributor

Hi, I personally have no experience with Hono, I just used a local Mosquitto. Did you verify your MQTT Hono thingy is reachable at all, e.g. with MQTT Explorer or similar tools?

@kulta4
Copy link
Author

kulta4 commented Nov 16, 2023

Hi,
yes, the MQTT is reachable, but it doesn't receive any signals from databroker and unable to get it from hono. Do you have any other suggestion to connect this kuksa databroker to kafka or eclipse hono or eclipse ditto?

@Hariprasath-TE
Copy link

Hi, yes, the MQTT is reachable, but it doesn't receive any signals from databroker and unable to get it from hono. Do you have any other suggestion to connect this kuksa databroker to kafka or eclipse hono or eclipse ditto?

Hi kulta,
have you connected this kuksa databroker with eclipse hono?

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

3 participants