-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add MQTT/cmd line command for getting device list #84
Comments
You can do that, but you need to read the code to see what it's doing. Look at cmd_line/device.py and util.py to see how they work. The send() command in util adds a session ID to the MQTT message (which you will see if you subscribe to all and watch them) and then it subscribes to a session topic to get messages back. The server sees the session ID and sends the "output" messages to that topic so the command line tool can display them. NOTE: I don't consider these output messages to part of the API. They could change format and type in the future. If you want the device list, we should add a specific command to return it (which has nothing to do with refreshing anything. There could be commands to get specific things (device lists, device db's, device states, etc) that get returned as a JSON packet. |
I have a command that will reply w/ the device list. Here is the current output.
I could try and add an option to remove the leading "commanding..." and trailing "complete" messages if that would make it easier to parse. Let me know. |
Fixed per previous comment. |
When I issue the refresh all command via the command line I get an output in mqtt with the output
insteon/command/+/+/#
but when I initiate it via the mqtt command I don't get the same output. I was hoping to be able to build some logic into node red to parse the device list.The text was updated successfully, but these errors were encountered: