Web-scraping virtual switch (beta)

I'm using this, but just finished this version of the code this week, and it's my first-ever Hubitat driver. So far as I know nobody else is using it yet.

The purpose of this driver is to present a piece of information available on a public web page as the setting of a virtual switch in Hubitat. My exact situation was I wanted to know whether my city had declared a snow emergency (meaning different street parking rules), and the city shows that on some of their web pages.

You configure it with the URL to sample, how often to sample it, and regular expressions for either "on", "off", or both. (If you give just one, anything that doesn't match that one gets the other value.)

Given that you have to write your own regular expressions, and that the schedule is expressed as a crontab schedule, this is not trivially easy to use.

Will certainly attempt to help people having trouble!

The driver code is on github

6 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.