Examples: Monday, today, last week, Mar 26, 3/26/04

OhmHour API

CadirCadir Posts: 8Administrator

For those of you that have extra devices to automate that OhmConnect does not connect to directly, you can use a couple of handy extensions.
First, on the bottom of the settings page is a URL that looks like ...verify-ohm-hour... which is personalized just to your account. When you open that URL it will indicate whether you are having an #OhmHour -- which would allow turning off additional devices. The format is
<?xml version="1.0" encoding="UTF-8"?>
<ohmhour>
<address>Service Address</address>
<active>True|False|None</active>
</ohmhour>

Active will be None if there are no upcoming #OhmHours -- otherwise it will be True or False reflecting when an #OhmHour is active.

Second, you can integrate with third party services such as IFTTT or Zapier. When OhmConnect sends an SMS or an email, that can be used to trigger recipes.

If you have other channels, let us know!

Comments

  • Steve ReedSteve Reed Posts: 111Member

    The XML URL works great with isy994 home controllers from Universal Devices, which can control Insteon and zWave devices.

    I have it set up to monitor the flag, but wait until the beginning of the hour to turn off devices, since OhmHour alerts trigger 15-20 minute before the event, and I don't want things turned off that early.

  • Kate from OhmConnectKate from OhmConnect Posts: 1,049Administrator

    @dstjohn99 wanted to make sure you saw this post, in case it's helpful to you!

  • dstjohn99dstjohn99 Posts: 371Member
    Thanks, it's on my to do list...
  • Daniel5Daniel5 Santa Rosa, CAPosts: 12Member

    Sorry to dig up an old post but I can't figure out how to integrate that URL with IFTTT. It doesnt seem it has a parser for JSON/XML

  • Kate from OhmConnectKate from OhmConnect Posts: 1,049Administrator

    @curtistongue any ideas?

  • santacruzsaversantacruzsaver Posts: 5Member

    @Daniel5 said:
    Sorry to dig up an old post but I can't figure out how to integrate that URL with IFTTT. It doesnt seem it has a parser for JSON/XML

    I think the original poster was suggesting that you use an email or SMS monitoring IFTTT applet with keywords for the ohmconnect notification email/sms which would allow you to act on it. It may have a delay but it shouldn't be too terrible.

    The URL is more useful if you're coding your own scripts/apps or if you have a smart home hub device that can monitor it and act on changes.

  • carl.lenoxcarl.lenox Posts: 1Member
    edited January 13

    This is a very useful post! I wrote a bit of Python to parse the XML which may be useful for posterity. Good luck!

    import xml.etree.ElementTree as ET
    import certifi
    import urllib3

    http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())

    r = http.request('GET', 'https://login.ohmconnect.com/verify-ohm-hour/XXXXXX')

    comment-# Put your specific URL found at the bottom of settings into the above

    data = r.data

    root = ET.fromstring(data)

    OC_state = root[1].text

    comment-# OC_state will be True, False, or None

  • Kate from OhmConnectKate from OhmConnect Posts: 1,049Administrator

    @carl.lenox what do you use this for?

  • Jason GoeckeJason Goecke Posts: 1Member

    Any chance OhmConnect will provide a callback/hook instead of a GET function? Would be much better to just trigger a script/IFTTT via that rather than email, SMS, or a GET.

  • cwiedcwied San MateoPosts: 76Member

    Or even simpler, just add an "OhmHour scheduled" trigger to the OhmConnect IFTTT triggers with ingredients for start and end time.

Sign In or Register to comment.