GithubHelp home page GithubHelp logo

Comments (5)

andrewsayre avatar andrewsayre commented on August 19, 2024

Thanks for sharing this! You may also be interested to know there is a new SmartThings native integration in Home Assistant that uses this API

from smartthings-mqtt-bridge.

mschwartz avatar mschwartz commented on August 19, 2024

That's where I probably found out about the new API.

That said, I'm not much of a fan of any of the existing solutions like HA.

In fact, that this is now native in HA is kind of contrary to my desired architecture. Which is microservices, each doing MQTT protocol and obscuring the oddities of the API/protocols beneath. For everything.

The advantages are numerous. But start with the ability to have cron jobs.

My Nest thermostat doesn't let me turn on the heat from 6AM to 9AM due to a "rush hour" program I joined with the gas company. A cron job runs at 5:45 and turns on the heat; the cron task just runs the mqtt commandline command to do it.

Cheers

from smartthings-mqtt-bridge.

mschwartz avatar mschwartz commented on August 19, 2024

Looking at the API and their cli example, I don’t see how it’s feasible for the MQTT bridge.

There’s no notification or event API, no EventSource or WebSocket.

The cli example has an “all devices status” method, but it enumerates all devices (1 request), then makes one request per device to get each device status.

The rate limiter they put on requests means an unacceptable latency in update to a UI when a switch is turned on or off. Depending on how many things on your hub. I have ~30. A fan switch and dimmer for two ceiling fans, dimmers on 10 lights. Several motion sensors. Two multifunction sensors, two garage door sensors, etc. maybe 1/3 of my switches are z wave, the rest the stock non smart kind.

I will look at the HA implementation to see what they do.

Until then, this bridge software is definitely the way to go. If HA has big latency, this bridge is a better way to go. IMO.

from smartthings-mqtt-bridge.

andrewsayre avatar andrewsayre commented on August 19, 2024

Take a look here https://smartthings.developer.samsung.com/docs/guides/smartapps/basics.html

There is a mechanism to receive webhooks, which is part of the new SmartApp/Automation construct. This is what the HASS integration uses in conjunction with the API.

from smartthings-mqtt-bridge.

mschwartz avatar mschwartz commented on August 19, 2024

Yeah, I saw that already. The problem is I don't want to open an HTTP port on my home LAN to support the web hooks.

This is one of the sillier things I've seen in all the cloud IoT services. I have an Amazon Echo in my house. To add/create commands through Amazon, I have to open an HTTP port. Now for this new API, same thing.

  1. Instead of simplifying things, that server at the open HTTP port has to be secured and made more and more complex as more cloud services want to post to it (e.g. provide SmartApp and Alexa, and whatever future, web hooks).
  2. I have an Echo and ST Hub on my LAN already. They can talk to every device on my LAN, as long as I don't have firewall rules blocking them. Why don't THEY do the HTTP to my webhook server behind my firewall from the device? The Echo and ST Hub are already communicating with their respective clouds...
  3. THIS bridge does exactly what #2 says should be done. To configure, I put the MAC address and local LAN IP in the configuration dialogs, not some public IP with an open http port.

I might be pretty good about hardening and securing a server I expose to the hacker infested internet, but not a lot of "regular" users are.

from smartthings-mqtt-bridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.