-
Notifications
You must be signed in to change notification settings - Fork 242
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
Expose support for Routines and Modes #122
Comments
Hmm, that would be pretty cool. I don't use modes or routines right now, most of my automation is around manipulating devices that only work on SmartThings. If you're interested in contributing it, I'm happy to review a pull-request and give feedback. |
Somebody already made an extra Smartapp to add Smart Home Monitor modes: Maybe this can be used to add it here as well |
I wrote my own Home Automation system (github.com:mschwartz/RoboDomo) that interacts with SmartThings via MQTT-Bridge (thanks for this!) and with my TVs (direct/WiFi API) and Nest (directly with Nest.com/API), Harmony Hub/Remote via Harmony servers' API, etc. I wrote my own macros (scenes/routines, whatever you want to see them as). For example, Macro "Pause TV" (so you can go get a drink or to the restroom) tells Harmony to pause (that will pause any device Harmony knows about) and turns on the kitchen and bathroom lights. A related macro, "resume TV" tells harmony to play and turns off those lights. All my stuff is done via MQTT, similar to this MQTT-Bridge. A macro is simply an array or list of sequential topics/messages to send. Currently, I can use Alexa to control Harmony or SmartThings because there are already existing skills. What I'd love to be able to do is to create SmartThings skills that basically do nothing. If I can get MQTT messages that these "nothing" are to be run, I would trigger my own Macros. The amount of work for me would be minimal. I'd love to be the "help wanted," but I know virtually nothing about SmartThings programming. Given that you already have done this MQTT Bridge, it seems to me it might be a really easy thing to add. The messages are generated and sent to the bridge in the SmartThings cloud. If the activities/scenes messages are identifiable, your IDE program would simply relay to MQTT like a switch or whatever. |
Not sure how to add routines support to this yet, but I added support for hub modes here: https://github.com/raman325/smartthings-mqtt-bridge (I also added some error handling that will reset the state of a topic in case you attempt to publish an invalid message. The errors are logged in the IDE) |
Added support for routines as well. The message format for routines is slightly different from typical device states/attributes but I think it helps keep the messages more organized. Check out the new section in the README to see how to use it: https://github.com/raman325/smartthings-mqtt-bridge#routines |
This was so long ago, I don't remember how I intended to use it! 🤣 |
I needed it myself so that I could experiment with moving some of my automation logic into HA, and I figured it would be a fun challenge 🤷♂ |
A funny thing... I ended up moving my devices to a Hubitat hub, implemented my own MQTT bridge for it, and now use virtual devices to trigger my custom automations. The MQTT bridge for Hubitat took me a half hour to implement. FWIW, Hubitat runs groovy code that’s 99.9% compatible with SmartThings, but I’ve not had to install any custom groovy. The performance is impressive, since there’s no cloud involved. From motion sensor to light on is instant instead of seconds. I still have a small number of devices on the SmartThings hub, so I still use this bridge. I’m thankful that it exists. |
All device types seem to be exposed to MQTT, but not routines, scenes or modes. It would be really useful to be able to use MQTT output to trigger routines or scenes (functionally similar to momentary switches or buttons), as well as use MQTT input/output to work with Mode (
DYNAMIC_ENUM
).The text was updated successfully, but these errors were encountered: