What did you build/automated today (with pictures)?

Continuing my esp8266 journey I build a simple mqtt infrared remote with integrated touch button for my decentralized ventilation system. The remote has three mqtt topics which are connected to the channels of an openhab generic mqtt thing. One for the fan unit mode, one for the fan level and one for the button. The button can discern short and long presses.


I know my soldering is not pretty :see_no_evil:

The button is under the grey part. On a short touch it turns the kitchen light on and off and if you hold it for a second the fan unit is beeing switched to exhaust mode. Together with the nodemcu/dht22 humidity sensor value of my last project it also switches the fan mode depending on the humidity, presence of somebody home or into night mode.
Best regards Johannes

5 Likes

Pretty nifty.
While there is a massive array of things one can buy off the shelf and plug in to home automation, it’s these DIY things I truly enjoy.

Solder not pretty? Can’t argue if it works :smile:

2 Likes
  1. automated doorbell based on motion sensor at front door ‘knocks door’ in xiaomi gateway in kitchen and sends a screen grab from the webcam at the front door via pushover - thus appearing on my Apple Watch

  2. Scrape weather data from accuweather at regular intervals, if rain / snow is forecast in the next 10 minutes and any windows (controlled by a simple group), Alexa announces which ones are open and what sort of weather is expected and for how long. A push notification is also sent to my phone. Given I have several Velux windows that are manual, this has saved me from coming home to soggy floors several tiles (my neighbours have keys to my house, sometimes I’m tempted to send them a push notification)

  3. when motion is detected in key areas around the house that don’t normally get traffic, Alexa announces the motion and the wall mounted screen in the kitchen switches to a web feed of that camera for 30 seconds

4 Likes

I bet the community would love a tutorial on this. For some areas, Accuweather is more accurate than OpenWeatherMap or DarkSky and Wunderground has closed their free API.

2 Likes

To be honest, it’s literally as ugly as can be.
I just curl the minutecast page targeting my home address and drop some old school regex on top of it. (2 lookups - one for alert, one for don’t alert) My rule then simply checks if either my alert or no alert regex is matched. If neither does - it pings me a push notification saying the current forecast xyz is unknown - allowing me to fine tune it a little more.
If one of the known patterns are met, it does whatever I expect it to do (like send a note to Alexa)

I’ll dig out what I have when I have some time.

2 Likes

Have you seen my old Wunderground tutorial? And I had the advantage of an API.

Curl and REGEX is perfectly fine and it might help some some users how they can scrape websites that they may not have considered possible. I’m actually not aware of any web scraping tutorials on the forum yet so it would fill a gap.

1 Like

Hi Rich

Do you remember that you helped with break apart a BBC weather RSS feed?

It looks like the BBC don’t only service the UK, so is it worth looking at that for “latest observations” & “3 day forecasts” in your area?

As an example, here’s the RSS URL for New York city.

https://weather-broker-cdn.api.bbci.co.uk/en/observation/rss/5128581

All the instructions for the BBC RSS service are here - RSS Feeds from BBC Weather - BBC Weather

All you need to do is get the number code from the end of the URL once you’ve searched for your area / location on this page - New York - BBC Weather

@bulletprooffool I would like to see some photos of mentioned screen and displays and images on the watch and… well, everything :slight_smile:

I actually don’t have that much of a problem with OpenWeatherMap myself. I really only care about the current temp and current humidity and current cloudiness in my home automation so the rest isn’t important to me. But others might need more.

The big thing is it would be nice to have a web scraping tutorial on the forum. The fact that it’s Accuweather is less important.

1 Like

Ok, will try.

I use accuweather because the minutecast live’ info is eerily accurate around my house (it really is crazy how spot on it is around London!)

For now, the scrape is literally an exec binding job like this:
/usr/bin/wget -U Mozilla/5.0 -q www.accuweather.com/en/gb/london/w1u-1/minute-weather-forecast/53870_pc -O -

The Mozilla header is because my request started getting denied without that. I try not to poll the update too frequently, I’m downloading the full web page each time.
They do have an API… but I’m too cheap to pay…

With a simple regex transform as follows:

REGEX(..div.class…mc.summary…[^<]

([\w| ]).) - to extract the strong that shows what the current short term forecast is

The output is bound to an item which I track to run a rule.
The rules parses the text field, and makes decisions any time the value changes:(with a lock, to prevent too many updates within a certain period and a check to make sure I only get alerted during certain hours… don’t wake me :stuck_out_tongue_winking_eye:

I’m on a phone right now, so fetching my poorly written rule is painful, but it’s just some if statements contains regex matches like:

BAD WEATHER NOW:
transform(“REGEX”, “(?=.?\brain|Rain|snow|Snow\b)(?=.?\b(ending|least|break|continue)\b)[^\t]+”, GetRainForecast_Output.state.toString) !== null)

//BAD WEATHER DUE IN UNDER 10 MINUTES
(transform(“REGEX”, ‘(?=.?\b([0-9])\b)(?=.?\brain|Rain|snow|Snow\b)(?=.*?\b(starting)\b)[^\t]+’, GetRainForecast_Output.state.toString) !== null)

//MORE THAN 9 MINUTES AWAY
(transform(“REGEX”, “(?=.?\brain|Rain|snow|Snow\b)(?=.?\b(starting)\b)[^\t]+”, GetRainForecast_Output.state.toString) !== null)

Also I have a check for ‘no precipitation’
And finally one if none of the above lookups are met, triggering an alert that a non standard value appeared in the output - so I can amend the regex lookups.

As you can see, it’s pretty crappy old poorly written regex (I was struggling with getting my head around the openhab regex transform, so didn’t actually focus on the regex itself)

I’ll post it properly when I have time

2 Likes

In two days, Itead will be selling the Sonoff Mini that is also meant to build into a wall socket. Cheaper than the Shelly

Do you know if the firmware on this will allow us to drop tasmota without soldering?

[cough]pictures-topic[cough] :slight_smile:

5 Likes

Great. I’m gonna check that out

1 Like

Thanks! Post it as a separate thread in Tutorials and Solutions and it will get more notice.

ALL REGEX are crappy and poorly written. These are just fine and honestly, refreshingly easy to read.

1 Like

not right now I don’t. hopefully soon

ok so bought allot of 433 door/window sensor, but even with the cheap price its seems overkill to put on each window (two some for some windows)
how can we improve? :slight_smile:

i found out that you can connect a bunch of them to the same sensor
the addon is something like 0.50 cents
, so where i have a number of windows, that i don’t really open something like roof windows, it can be really helpful for alream systems ,it will help me for sure
cheers

Same enhancement done here but I opted for a mechanical switch and attached a short screw and a roller. Here is a picture. Working well for over a year

3 Likes

Finally some tiles over the kitchen bench:


Got plenty of buttons on the wall now. :slight_smile:

8 Likes

This is insane. In EU those are 20€ each. Above are approx +100 of those. 2k€? You must have a cheaper source … tell me please.