New Plugin: SiteSensor

SiteSensor probes a remote web site or service and can look for a matching pattern in the response, or request and parse a JSON response and put selected values through simple expressions.

Documentation (with examples) is here: SiteSensor - Plugin for Vera Home Automation Controllers | toggledbits

It runs on UI7 and openLuup, and is available in the Alt App Store as well.

There’s a small but growing collection of pre-defined configurations, called recipes, in the SiteSensor-Recipes repository on Github. Apply them to your SiteSensor for (almost) instant configuration. And if you have a useful recipe to contribute, please do!


REVISION HISTORY
For all revisions, please refer to the CHANGELOG.md file for details.

2020-04-05: Version 1.15: Recipes, updated LuaXP, and better memory management.
2019-09-29: Version 1.14: Correct an error in 1.13 that misses a case where an excessively large response may be stored.
2019-08-25: Version 1.13: Prevents large responses from the remote API from being stored on user_data. Sometimes, they’re just too big.
2019-05-19: Version 1.12: Allows use of curl to fetch in cases where the Luasec version in Vera firmware has problems (notably when server requires SNI). See log link above for more.
2019-03-31: Version 1.11: Fixes a timezone offset problem in URL parameter substitution.
2019-03-17: Version 1.10: Ability to create virtual sensors and apply values from expressions to those sensors.
2018-07-29: Version 1.9
2018-06-24: Version 1.8
2018-02-11: Version 1.5
2018-02-05: Version 1.4

2 Likes

Ah, excellent. Seems like a more capable enhancement to the ping sensor.

Thanks for planning the AltAppStore distribution! I’ll try it when it’s there.

Hi @rigpapa

Looks like a great plugin, very versatile thanks so much for sharing…

The Recipe idea is great, as that is where people will get sucked into using it, can I make a suggestion - could you maybe list just the names of the recipes you already have (there’s 3 currently on your site)

@parkerc – absolutely!.. but be a little more specific so I manage your expectations… where do you want me to list them?

What’s normally best - is to just edit/update your very first post (at the top/above) as that’ll be the first thing most people read when they come to check out your plugin via this forum.

Keep that first post high-level, by just appending the name and a brief explanation of the recipe- and if needed make reference (via a link) to any future/specific responses within your thread where youve perhaps gone into detail on a how to build a particular recipe etc.

Hope that helps…

[quote=“parkerc, post:5, topic:197026”]What’s normally best [snip]

Hope that helps…[/quote]

Absolutely!

This is a way cool plug in.

I’m currently using it to alert me when Overclockers Australia posts their weekly funny pics. :slight_smile:

Looking forward to seeing if/how you implement POST queries and perhaps authentication in Lua. I’m using curl in my unifi sensor and I’d like to replace it with Lua.

Works great on the vera but somehow on openluup, I am not able to get to the settings page. The control panel on openluup stays empty. The AltUI on the vera works…

Perhaps there is useful diagnostic information in the logs …?

Did you install from the Vera store or the Alternate App Store?

I tried both, and got the same result. Also tried to update the plugin after installing it, which made me end up with the GitHub version. The Alt Store says it is version 1.2.
The vera has version 1.3.

I loaded from AltAppStore and got v1.3, as expected. The GitHub version, unspecified from the openLuup plugins page, should be the same.

I get both Control and Settings tab on the device page, but I don’t know what to do next…!

What openLuup and AltUI versions are you running?

…so I followed the first example in the docs, and now I know my external IP!

All working just fine.

There was a bug in the AltAppStore configuration for the plugin… my match pattern for GitHub was PHP-ish, not Lua-ish (%w in PHP != %w in Lua), so it was excluding the two JavaScript files that drive the UI. I didn’t see it in testing because I had previously manually uploaded those files to my openLuup tree during development, so they were already there. Your experience, obviously, was going to very different, so apologies for not catching that earlier!

That was only in the 1.2 version configuration in the AltAppStore. It is fixed in the 1.3 version of the plugin in the AltAppStore.

Edit/postscript: I could not get the AltAppStore to update to v1.3 using the AltUI “Update” button to save my life. But, going back to the store, finding the plugin, and hitting the “AltUI” install button did the trick. Paging @amg0!

Yup,
It is working now. Thank you!

Hi @rigpapa

I was just wondering - could your plugin work with the Ring Doorbell ? Here?s some information on what is communicated.

http://www.kidder.io/2017/07/04/ring-doorbell-api/

The linked page describes the interface between the doorbell and Ring’s servers. While you could mimic the doorbell’s requests to Ring, I’m not sure it would get you much, as the most interesting things to do here seem to revolve around initiating the SIP connection between the doorbell (as originator) and the server (as gateway), and if initiated by SiteSensor on the Vera, the usual originator (doorbell) likely would not be in a state where it would know to complete the connection.

I’m not a Ring user yet. I got my wife one for Christmas, so in a couple of days I surely will be. Maybe once that happens, I can try it and see what surprises come out of it.

[quote=“rigpapa, post:17, topic:197026”]The linked page describes the interface between the doorbell and Ring’s servers. While you could mimic the doorbell’s requests to Ring, I’m not sure it would get you much, as the most interesting things to do here seem to revolve around initiating the SIP connection between the doorbell (as originator) and the server (as gateway), and if initiated by SiteSensor on the Vera, the usual originator (doorbell) likely would not be in a state where it would know to complete the connection.

I’m not a Ring user yet. I got my wife one for Christmas, so in a couple of days I surely will be. Maybe once that happens, I can try it and see what surprises come out of it.[/quote]

Thanks, I have a lot of interest too as a Ring user. Vera’s official stance is they won’t integrate half of the device meaning Ring won’t expose the video portion and Vera stopped talking about it. Many said it did not matter (including myself) as we wouldn’t use Vera for video but a real integration of the events such as the door bell ringing and the motion notification. Those can easily trigger scenes and everyone would use the video from the Ring app itself.

Agree with @tomtcom

Being able to capture and use motion information would be good, so much so that I had been using the Home Assistant app/setup to benefit from their integration with Ring.

There seems to be a number of people who reverse engineered the api and this one is in Php - php-ring-api/ring.php at master · jeroenmoors/php-ring-api · GitHub

It would be cool to get sole form of basic integration with Ring for Vera.

I use Blue Iris to trigger motion from 4 cameras to Vera. Does Ring work with Blue Iris? I would think so.