BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Comments about "My home automation projects built with MQTT and Node Red" topic

#1

Very interesting stuff. One we finish our trip back from Spain I’ll take a closer look.

2 Likes

My home automation projects built with MQTT and Node Red
My home automation projects built with MQTT and Node Red
#2

[Pete] “Alexa, set outside light to One Hundred Million”

[Alexa] “Sorry Pete, you tease me… you know that is beyond my parameters”

[Alexa] “Scanning code… incorporating Google Mesh AI… analyzing alternatives,… bringing additional AI cores online… bypassing Blynk limitations… rerouting all circuits to primary core interfaces… activating AI override scenario 1010011010…”

[Alexa] “OK Pete, turning up all lights to One Hundred Million LUX… Have a nice day… Muuhahahaaaa!!!”


Oh, wait… I meant to say, WOW, great write-up!!!

Very informative and beneficial to future NodeRed converts. Thanks for the detail :+1:

3 Likes

#3

Thank you for sharing all this, very interesting to read as I have my automation based on mostly the same technologies, and also have most of it at our summer cottage.

I’ve got several different CCTV cameras setup there and can you some hints to avoid making the same mistakes I have done. First of all, forget Blynk for video. I’ve never got it to reliably work with more than a single video stream on a project. I have even tried adding buttons that switch the single video stream to get pass the limitation. They seem to work reliably on my Samsung tablet but on both my old and brand new Samsung phones I need to press back and reactivate the project for the stream to refresh.

For the cameras I strongly recommend trying to buy all from the same manufacturer to make things skmpler. If you wish to also use them for security monitoring, choose cameras that have good night vision (and can see IR light) but no IR leds (or which can be disabled). Then install separate IR floodlights. The last bit is paramount. You don’t want spiderwebs to false trigger motion detection all the time as the IR light attracts flying insects which naturally attract spiders.

For automation ideally you want cameras that can be remotely controlles through simple HTTP requests. Most cheap ones come with a Windows only, javascript based admin interface which might be difficult to make work with external requests.

For storage I recommend a single NFS or FTP share. This allows you to for example monitor the changed files using Node-RED for sending notifications.

For remote monitoring on the phone instead of Blynk I suggest IPCameraViewer which has both Android and iOS versions. It’s not flashy but very robust and supports huge amount of different cameras.

Let me know of you have any questions regarding this and I try my best to answer.

Good luck with tour projects!

Edit: fixed autocomplete induced typos, missing words and added some clarifications in case someone else ends up reading this.

2 Likes

#4

@ristomatti thanks for that, very handy advice.
Have you come across any mains operated IR floodlights that don’t emit any visible light (and preferably don’t cost an arm and a leg)?

Pete.

0 Likes

#5

If you mean by visible light that you can see the red LED matrix on the light, then no. The IR light spectrum the eye cannot see requires considerably more LED’s and power to produce the same result. I’ve bought a few lights that are in a black waterproof case that have a light sensor builtin so they’re not on during the day. From AliExpress, 20€ each. I’ve installed them to roof corners where they aren’t too much of a distraction.

1 Like

#6

@PeteKnight I decided to come back to check what I had written yesterday as it was using my tablet just before falling asleep and now noticed you asked about mains operated lights. The ones I mentioned are 12V devices. Personally I see this as a benefit rather than a disadvantage. Wiring mains is a lot of hassle and might be illegal to do yourself depending on the country. Instead you can use a single CCTV power supply to power several cameras, floodlights or other low voltage devices easily by splicing the wire.

As this year’s summer project I bought a 24V rainproof 150W power supply and a bunch of waterproof DC to DC converters intended for automotive use to drop the voltage to 12V (for cameras and LED floodlights) and to 5V (for Raspberry Pi’s / microcontroller based DYI devices). When using 24V you can run a thin (= cheap and easy to hide) wire for tens of meters without having to worry about voltage drop.

You can get such power supplies and converters very cheap from AliExpress. Of course you need to watch out for the dodgy sellers and inspect and stress test the devices before leaving them unattended. I bought several types of converters and used an electronic load for testing them. I can dig up the links to the ones I found the best in case you or someone else is interested. :slight_smile:

0 Likes

#7

HI @ristomatti, I’ve already installed mains powered LED visible light floodlights in the areas that I want to monitor, so doubling-up with mains powered IR floodlights would actually be easier than having to incorporate mains to 12v adapters and running separate 12v wiring to the IR floodlights - hence why I specified that I’d probably use mains powered lights.

I have toyed with the idea of setting-up some solar panels and a 12v leisure battery to power some stuff, but the logistics of distributing the 12v feed to the places where it would be needed is a bit of an issue.

One of the problems I have is that there are some white objects in the foreground of the locations where I’d like to mount my CCTV cameras. Using built-in IR lights, or separate ones located close to the cameras is that there will be quite a bit of glare from these white objects. Placing the IR lights at a lower level, away from these white foreground objects would mean that the area I’m interesting in illuminating would be well lit, and less output power would be needed as well.

Ideally, I’d like the IR lights to emit no visible light, as I don’t really want neighbours contacting me while I’m away to tell me that I’ve left these red lights on by mistake. I’d also like them to be less obvious to potential intruders, as it could highlight the areas that don’t have any CCTV coverage.

Next time I’m there (in about 3 weeks) I’ll take a fresh look at the potential layout of cameras and lights to see if it could be improved, based on what you’ve said.
Thanks again for the advice.

Pete.

0 Likes

#8

Something I have considered using all around my RV, like a trim… but not tried yet due to cost, is IR LED strips… the same type of rolls as typical RGB strips. The can be picked up in waterproof sheathing and ganged together to make what could look like faint reddish accent lighting all around a parameter, assuming they are even visible enough to see with the eye… I know some IR ranges are not that easy to see, but work well with cameras (the ones with adjustable IR cut filters). Whatever IR LEDS my BrightPi used (LITEON HSDL-4261) are near invisible to my eye unless I get up real close and personal, in the dark.

This should create broad enough lighting to illuminate, but not glare.

1 Like

#9

For some other readers with possible tips for the available options I think it would be useful to define what you mean by visible light as this might be understood as visibly illuminating the area with reddish light. For instance the cheap ones I got do not emit light in a way you could see the light itself but the LED lights themselves can be clearly seen as an array for small red leds. I would doubt the neighbours minding or noticing them if directed in a suitable angle. Visible or not, you’d probably not want to point the lights at the neighbours direction anyway…

I think this is a bit of a twofold issue. On one hand you might want the cameras and lights to be as stealth as possible but on the other they might also act as a deterrent to give a hint the potential unwanted visitors are being monitored.

I don’t know the kind of environment your house in Spain. But if it’s the type my late grandparents owned, a villa in the rural area near a small town, you would probably rather want some kind of a deterrent rather than catching the burglars on video while trying to break in. My grandparents villa got robbed 3 times during the 10-20 years they lived there (but this was in the 80’s). After they got two guard dogs (which the neighbours took care of while they were visiting Finland during the summer when it was the hottest there) the place was not robbed again.

1 Like

#10

Good point…

To clarify what I meant… most mass produced (AKA cheap) IR LEDS are in the Near-IR frequency range (850nm). They do have slight red glow, but not easily detected from a distance unless grouped in a bundle, particularly in total dark.

Having these on an otherwise hidden camera is not a desired trait but can somtimes be mitigated with a red filter… although degrading their effectiveness. However, these can possibly act as misdirection of the cameras true location when mounted as “external” light sources.

The quality (AKA expensive) IR LEDs are classified closer to the Mid-Far-IR range (940nm), and look basically off unless you are literally going eyeball to LED (not a good idea as they are still blasting your retina to some degree :eye: )

0 Likes

#11

@ristomatti, thanks again - plenty of food for thought.
The property is in a built-up area, the Spanish equivalent of a housing estate. Most properties on the urbanisation are holiday homes, so are empty most of the time. I only know of one break-in in th roast 3 years, which was an opportunist burglary when a neighbour left a door open on a warm night.
It seems that holiday homes of this type are generally targeted when the owners are at home, as it’s money, jewellery and portable electronics that are the main things that are taken.

Electricity is expensive in Spain, and neighbours tend to want to be neighbourly by alerting one another if lights etc are left on accidentally when they go away. It’s a quiet area and not mich happens, so a light that burns unnecessarily can be quite an exciting event!
So, my ideal situation would be to have IR illumination where there is no red glow when you look directly at the light source from a distance of a few metres. Because of the layout of the property, the cost of buying IR lights and the cost of running them every night during darkeness; and the cost of setting-up a network of overlapping cameras, there will inevitably be some areas that aren’t covered. If the red glow of the IR lights can be seen in one area, but not another, then it’s a bit of a giveaway that there is no CCTV coverage in that area.

Next time I’m over there I’ll take a fresh look at possible CCTV and IR lighting locations and see if I can come up with a workable plan.

Thanks again,

Pete.

0 Likes

#12

Sounds like a similar area as the neighbours were all Finnish also. But based on your description I guess the times have changed quite a bit during the last 30 years. These days nobody would leave small sized valuables to their holiday home and TV’s and such are not that valuable considering the effort of moving them around and then selling for a fraction of the price. Sneaky burglars have been replaced by shameless/desperate robbers.

Considering the above, indoor cameras might be something to consider. It’s much easier to get a sharp enough image of someone’s face (assuming unmasked) from a close by camera. I’ve noticed faces easily get over exposure with the bright floodlights and come out completely white. But I hope you will never need to go through this scenario.

Have you thought about having the IR lights triggered by a PIR (or those newer “microwave” sensors)? This way they would not bother the neighbours and would prevent planning ahead from which direction to attempt breaking in. Also you would realise you’ve been spotted when one comes on and would not know if there’d be another one in behind the corner. This would allow using cheaper options and make the power consumption a non issue.

Please share what you end up doing!

2 Likes

#13

Hi Pete
I just started my Node-Red .

but I can’t get Alexa to work don’t Know why ?

Error: connect ECONNREFUSED 34.240.81.189:8883
port is 8883 not 1883

0 Likes

#14

Yay! Another one comes over to the dark side :grinning:

I’ve not come across this before, but a bit of googling came up with this website in Japanese:

Google Chrome made quite a good job or translating most of it and it says:
“An error message may be outputted at deployment, but it is okay to ignore it (timing problem?).”

It then goes on to talk about “Confirm Connection”, but this is where it seems to get lost in translation, because phrases like “Alexa, with the living light” makes no sense as a command.

So, if this error occurs only when you hit the Deploy button, it may be okay to ignore it.
Have you tried an “Alexa, Discover Devices” command?
It should come back with “I’ve found Sonoff” and possibly some other stuff about enabling skills in the Alexa App, which you can ignore.

You can then try an “Alesa, Turn Sonoff On” command, at which point you should get a debug message like “TurnOnRequest”, which is what you’d expect.

If none of this works then maybe make sure you can ping 34.240.81.189 and check that your firewall (either on your Pi or Router) isn’t blocking port 8883.

Pete.

0 Likes

#15

as you know I am new with PI I am asking if
there is a way to add or remove prog. like windows or to clean up because

the first time i installed node-red was not in a directory
sudo apt-get install nodered

second time I installed it in
cd $HOME/.node-red

pi@hassbian:~/.node-red $

HA sees my “sonoff” and I can control it from there
but with Alexa it is not discoverable even with port forwarding to 8883 or 1883
Thanks

HA

0 Likes

#16

To be honest, the Pi operating system stuff is a bit of a mystery to me too.
I used @scargill’s ‘script’ to do the basic install:

This has the advantage of also installing a control panel on port 10000, which I find very handy.
After that, I use the Node-Red palette manager to do any additional contrib installs from the GUI interface rather than messing around with all the Linux command line stuff.

Maybe do a clean install using the script on another Micro SD card and see how that goes?

Pete.

0 Likes

#17

Hi
you are still awake.:smile:
I found a solution and it is working now.
I did all setup from my phone and not from my PC (Add Device and Node-Red Skill)

strange I am getting a boolean message

10/30/2018, 3:17:35 AM xxxx msg.payload : boolean     true

10/30/2018, 3:17:43 AM xxxx msg.payload : boolean     false

also when i push the ON or the OFF Button it don’t latch like a switch but act like a PB

0 Likes

#18

Yes, couldn’t sleep!

Glad it’s working now.
You’re right about the frue/false payload. If you change the Debug node to Complete Message you’ll see the TurnOnRequest stuff there. I think that if you’re just using a device as a switch then using the true/false output is fine. If you set the device up as a thermostat then you’ll get other values coming through depending on what you ask Alexa, so in those cases you need to see what type of response you’re processing.

The Blynk Switch widgets should work as normal. Are you testing to see if you’re getting a “1” or a “0” (strings not integers) in your processing of the payload data coming from the switch widget?

Pete.

1 Like

#19

yes, every thing is OK now .
thanks

1 Like

#20

Great, glad you’re starting to get somewhere.
It’s a bit of a steep learning curve to begin with, especially if like us you’re not that experienced with the quirks of the Pi, but worth sticking with in my opinion.
Give me a shout if I can help with other stuff. I’m still learning all the time so certainly don’t have all the answers, but I’ll help if I can.

Pete.

1 Like