My Automatic Service Manager is now able to receive real-time events through webhooks.
I think that this integration would potentially bring more ST users to Automatic and vice-versa. It’s sort of win-win situation for both platforms. ST support of websockets could also be a good solution in the long term.
Benefits of the direct integration with Automatic (instead of going thru IFTTT):
Less lag time to receive real time events (as IFTTT is an additional platform in the flow of events)
You can customize the fuel cost according to your local cost (whether in USD or other currencies)
@JDRoberts, if you use IFTTT, the delays between the different platforms (Automatic->IFTTT->ST and vice -versa) are too long, so a direct integration would be more efficient & useful for Home Automation scenarios.
Based on my experience, IFTTT is not meant to be used for real time event processing (not the base version of it).
See this thread in the Automatic Forum:
Also, with a direct integration to ST, you would be able, in smartapps, to subscribe to (quasi) real-time events coming from Automatic, such as "trip finished, ignition on/off, hard acceleration, hard brake, engine light on/off, etc).
If you are interested in the Automatic- SmartThings direct integration, please send an email to firstname.lastname@example.org, mention my name and the ticket number (#58340) , and ask to complete this integration ASAP.
Just to let everybody know, I got the following email from Automatic:
Adam Altman (Automatic)
Aug 5, 1:06 PM
This is Adam, Head of Product at Automatic. Thanks for taking the time to push on the request. While we’d like Automatic to work with as many external systems as possible, it’s not our core focus at the moment to expand the footprint by building integrations in-house in this area. So TLDR we’re not likely to make the requested proxy app. Instead, what we would do is encourage and support any independent dev or company who wanted to make and maintain a go-between service. The tools to do so are available. And we would be happy to promote it for them.
I’ll post this same text in the thread – just haven’t had the time to till now.
For those of you who are still interested in this integration, you can grab my latest Automatic code
at my github:
I have written a service manager (called MyAutomaticServiceMgr) to integrate with Automatic.
You can have the following information exposed to ST:
Today AvgTripConsumption in miles/US gallons (or km per liter)
Today AvgTripDistance in miles (or km)
Today AvgTripDuration in minutes
Today AvgTripFuelVolume in US gallons (or Liters)
Today totalDuration in minutes
Yesterday AvgTripConsumption in miles/US gallons (or km per liter)
Yesterday AvgTripDistance in miles (or km)
Yesterday AvgTripDuration in minutes
Yesterday AvgTripFuelVolume in US gallons (or Liters)
Yesterday totalDuration in minutes
Weekly AvgTripDuration in minutes
Weekly AvgTripFuelVolume in US gallons (or Liters)
Weekly totalDuration in minutes
Events for a given trip are generated for subscription in smartapps
Not all events should need to be updated automatically. I might be able to help with the real-time part, just let me know which events you would like to see update in real-time. I will check out your code and see what I need to make this happen.
My code is almost ready to process those real time events (I haven’t had the chance to test it, but for the most part, I think that it should work) as I can already process some of those events after the trip is completed (not in RT).
My Service Manager has already the procEvent() method where RT events data from Automatic will be posted to be processed by the Automatic Device Handler.
The problem is that Automatic is not able to support multiple ST connections and, on the other side, ST requires authentication from Automatic to post data, so a proxy app needs to be deployed outside of the ST platform to manage multiple ST connections talking with an ST-authenticated
Automatic real time event processor.
There is a node.js example app that one can reuse for this proxy-app at
AUTOMATICATOR (NODE.JS) uses Heroku as container.
Websockets are used in the node.js app to retrieve RT events from Automatic.
Webhooks would need to be used to post data to MyAutomaticServiceManager (after being ST authenticated).
P.S. I already talked to @slagle (Tim Slagle) about deploying it somewhere, but as we all know, there is no bandwidth on the ST side to work on such project at the moment (with HubV2 and all)…
Hello, today I created a smartapp that uses MyAutomatic Device for monitoring trip events, Speeding and Events scores (based on calculated values by Automatic’s algorithm)
Typical Use Case: Parents may want to closely monitor their kids’ car driving abilities.
The smartapp can detect any speeding, hard acceleration, hard brakes events after a trip has been completed and alerts parents of bad driving behaviors.
Parents may want to set a minimum Speeding Score or Events Score and if the kids’ scores go below these thresholds, the parents will be notified ASAP.
The monitoring could be even more tight during the wet/snow season. Based on weatherStation, it can automatically switch to a monitoring cycle interval in minutes instead of hours when it’s raining or snowing outside…
The MonitorAutomaticCar smartapp is now available at my store:
P.S. I haven’t tested all event scenarios yet, but the foundation is working fine.
I’d love to be able to add this device type as an open/close type of sensor, open = ignition on, close = ignition off, in order to trigger opening my driveway gate, garage, house locks, etc.
From reading your earlier posts, the realtime processing can’t be handled on ST’s end? And Automatic isn’t interested in communicating realtime events either? No other work around besides a third party running a server to process this info?