This repository was archived by the owner on Mar 15, 2021. It is now read-only.
add an example of subscribing to an mqtt device topic#91
Closed
tompscanlan wants to merge 1 commit into
Closed
Conversation
KohliDev
suggested changes
Jun 19, 2017
|
|
||
| import pint | ||
|
|
||
| from liota.device_comms.mqtt_device_comms import MqttDeviceComms |
Contributor
There was a problem hiding this comment.
@tompscanlan The device entity should remain independent of the device_comms.
Basically, the con object can be passed to it for collecting the message over device_comms and parsing them in required device format.
Please refer DCC entity, device should be designed in a similar way.
https://github.com/vmware/liota/blob/master/liota/dccs/iotcc.py
Also, refer this pull request for more details #90
| class PackageClass(LiotaPackage): | ||
|
|
||
| def __init__(self): | ||
| super(PackageClass, self).__init__() |
Contributor
There was a problem hiding this comment.
The package class should use the device_comms rather than the device entity.
Contributor
Author
|
Thanks for the notes. Closing as this was for discussion only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Submitted for discussion. I'm guessing this was the direction you were headed, right?
This is a package for listening to on an mqtt topic. A device would publish to the topic and we receive the message. The next step would be to pass this on to the DCC.
I'm adding this because I'd like to set up some demo devices and wanted to make sure this is what you were expecting that would look like.