RF 433 Mhz on virtual pin doesn't want to send (with scheduling)

I am ALWAYS gentle :innocent:

Actually this sounds interesting, and RF 433 MHz was the general topic of your OP, so add to this as you feel necessary, but also feel free to create a new “Projects made with Blynk” topic with lots of details if you chose.

As someone pointed out elsewhere: “The art of getting good answers lies in asking good questions!” :nerd_face:

The most important goal of my project was scheduling and some form of online interface. Blynk, and @Costas code, made that (surprisingly) easy even with limited programming experience. Interfacing a receiver on a second MCU makes it a challenge! :grin:

I’ll probably end up with a bunch of non Blynk related Q’s, but that’s what books are for :slight_smile: Hopefully I can make post in the “Projects made with Blynk.” section soon - unless you start a “Projects I’m working on” subsection first hehe.

Not sure if this is what you are refering too… but have you looked at this library for sharing data between Arduinos? Not sure how well it works for ESP.

I haven’t looked into specific libraries yet, but that looked interesting. For the moment I’m just using the built-in UART to get a better understanding of how I can parse and make use of the data. The data sent over to the master looks something like this 1912830,1,15,0,-1, and the day before yesterday I didn’t know what heck strtok, atol, atoi, atof was. So you see where the real challenge lays! :upside_down_face:

I quickly found out that when the master sends a command, the slave pics it up and sends it back to the master to be resent and… doh Need to address that problem first, then figure out if I should use UART, I2C or SPI.

No sure if we are still dealing with the original OP issue, but I switched your topic back to “Need help…” for the time being :wink:

Hello friends, I have received your reply.

I have sent an e-mail to Nodemcu’s manufacturer’s engineer (I purchased the company’s product)
The advice given by their engineers is
Use dual power solutions, or power isolation.
I chose the power isolation scheme.
Because it is the fastest and most effective.
Also, please note that I purchased this 433m module does not have the serial transceiver function, it only 4 logic control.
If you use the 433m module with serial transceiver function, please pay more attention to the interference from the circuit.

This sounds far too complicated to me!
If the power plug that you’re trying to control is within range of Wi-Fi then the simplest solution is to use an ESP/NodeMCU device to talk directly to Blynk and control the relays - or simply use a Sonoff S20 if you don’t want to build your own power switch with built-in ESP8266.

If the power plug isn’t within Wi-Fi range then use a powerline Wi-Fi adaptor to give you Wif-Fi where you need it.

If you then need the ability to use a 433Mhz handheld transmitter as well as the Blynk app to turn the power sockets on an off then have another ESP or Arduino+Ethernet device in a convenient location with a 433Mhz receiver attached to it. When you receive a signal from the 433Mhz handheld transmitter the ESP tells the Blynk cloud server to turn the power sockets on or off.

Pete.

I understand that my solution seems complicated, but there are some things to consider. The thread is getting long, so to summarize what I want to achieve with my remote controlled plugs:

  1. Scheduling.
  2. An online interface.
  3. Co-operation with physical remotes.

But there is a snag - It has to work even if it gets disconnected from internet!

Therefore, I cannot use the receiver as a bridge that only sends updates through Blynk. Same goes for Eventor and scheduled tasks. I do appreciate your feedback and took a closer look at what Sonoff has to offer. Lo and behold, they have a neat little product called “Sonoff RF Bridge 433”! :smiley: It requires internet, are probably not compatible with my plugs, and the app doesn’t change status set by remote controllers. So not quite right for me. But the first commercial product I’ve seen that has those features (and not costing $300).

The schematic for the device can be found on ITEAD’s webpage and that is interesting. Their solution [for my problem] is to use a C8051 MCU that handles all Rx/Tx for 433Mhz (presumably, it’s wired like that) and the ESP do all the other stuff.

[Back to me] So, in order to cope with both transmitter and receiver, using two MCU’s seems like a good idea!

Okay, would it be acceptable to have devices connected to a Wi-Fi network that remains up and running when the internet connection goes down?
If so, you could use Sonoff/ESP8266/NodeMCU devices connected to the Wi-Fi network, then use MQTT to communicate between the devices.

It’s possible to do a serverless MQTT implementation, but I use a Raspberry PI to run Mosquitto and Node-Red. Mosquitto is the MQTT broker and Node-Red is a sort of drag and drop development environment that can process MQTT messages and can also communicate with Blynk (if the internet is up of course).
Node-Red gives a basic user interface that can be accessed via a web page on the local network and gives the ability to control your devices if the internet is down.
Setting-up the RPi server is easy using Peter Scargill’s (@scargill) script and I’ve been running mine for over a year without the need for any manual intervention.

Pete.

I use to work with i2c between 2 nano. I’m happy with this method. Easy and reliable.

I might have been a little bit vague about my needs… And you can - apparently not - read my mind hehe :wink: Even worse is when people don’t “practice what they preach”:

My bad!

Anyhow… The online interface doesn’t need to be up 24/7, the important thing is that scheduling works independently of internet. If I get some connection issues while at home I can simply use the remote or even the buttons on the plugs themselves. But with Murphy’s law and all that, any connection issues will probably happens when I’m not at home and during the schedules grace period.

My current setup works (as regarding to 1 & 2), it just needs some minor code changes and cleanup. If I can get the remotes to co-op it’s just a bonus and not “mission critical”. But to keep the main loop() as clean as possible (with current hardware) and keep Blynk happy, a second MCU is my only real option. And that’s what I’m fiddling with now!

I didn’t know that a serverless MQTT was possible and I’ll keep that in mind for upcoming projects! :+1: But I’ll stick to my dumb, old school switches for the moment :slight_smile:

/D

One solution is to have a Local Server… thus while the link is dependent on the local network, it is not dependent on the internet.

That thought has crossed my mind a thousand times or so :smiley: If I had chosen to use a local server, basically all my goals could have been reached without much effort I guess. I could even reuse my Tellstick USB transmitter and one of many interfaces found on eg. GitHub. But that still doesn’t solve the problem with both receiving and transmitting.

So why can’t I stop wailing about this and take the easy way out?

Telldus is popular company in Sweden that sells home automation products (like my now defunct Tellstick). They have a 433Mhz gateway capable of both rx and tx, scheduling, events, app interface etc - with a retail price of $135!

Don’t get me wrong, I really do appreciate that people takes interest and give me tips and suggestions for (other) possible solutions. But wouldn’t it be GREAT to drum up a $8 solution with some Blynk energy for the same basic functions?

That’s why I’m wailing :rofl:

Could you explain in more detail the receiving part of your project. I can understand transmitting an RF signal to your sockets but not the receiving,

And you just want to use Arduino’s, right?

@Costas - Presumably he wants to replicate the 433Mhz hub - receiving signals from various transmitters and applying some logic before transmitting a signal to one or more devices that have a receiver built in to them?

@distans - I also have a requirement for a 433Mhz transmitter/receiver capability for my home automation project at our holiday home in Spain. We have what the Spanish call “Toldos”, which are canopies on the outside of the windows that can be used to provide shade when it’s sunny. These use a tubular motor to operate them and have a 433Mhz receiver built-in. Each Toldo has its own handheld transmitter and we have three of these in total.
I want to be able to use Blynk and/or a Nextion touch screen to control these canopies. I also want to be able automatically to retract the blinds if it gets too windy, or if it starts to rain, to help preserve the life of the material that they’re made of. At the same time, I want the original handheld controllers to be able to use, as they are convenient in some situations.

In addition, I have some outside lights that are operated by PIR sensors, but I’ve added a Sonoff to the circuit to be able to override the PIRs and put the lights on for 1 hour by using a button in Blynk. I’d like to add a handheld 433Mhz fob (garage door opener) to this setup so that pushing one button on the fob will put the lights on for an hour, pressing the other button will cancel the timer and revert to standard PIR operation. This will allow visitors to control the lights without them having to install Blynk on their phone.

I could use a variety of other technologies for the outside light issue, but I’m stuck with 433Mhz for the canopies, so need to get a 433Mhz transmission working at the very least. Ideally I’d also want to be able to know when the handheld transmitters have been used to extend one or more of the canopies, so that I know if they need to be retracted. (They have built-in limit switches so sending a retract command won’t do any damage, but I’d like to understand their position in more detail if I can). So a 433Mhz receiver that can pick-up the commands from the handheld controllers would also be needed.

I’ve ordered a variety of 433Mhz transmitters and receivers from AliExpress and eBay, and these should have arrived by the time I get out to Spain again in early November. There’s a couple of other threads on Hera and other forums about poor range and interference issues with the regular cheap 433Mhz tx/rx kit that most of the Chinese suppliers are selling, so I want to have a variety of hardware to choose from when it comes to trying to get my system working.

For my solution I’ll be using MQTT and Node-Red as I want to combine data from multiple sources (windspeed, ambient light and rainfall sensors on the roof, temperature sensors in various rooms of the house, input from the Nextion touch screen etc) with data from 433Mhz receiver. I also want to use a timer finction to retract the canopies at sunset, and as I already use Peter Scargill’s ‘big timer’ in Node-Red for other home automation tasks around the house I’ll use that for this as well.
I’ll let you know how how I get on, but I’d also appreciate knowing more about what you manage to achieve with your experimentation - especially with regard to the range and reliability of the 433Mhz kit you’re using.

Pete.

@PeteKnight is the place in Spain a house or apartment and what would you say is the distance from a dead centre of the property to the Toldos (with the distance being the same for all 3 Toldos)?

What is the type and thickness of walls and the average number of walls, again from the centre of the property to the outside of the property.

Hi @Costas it’s a house, but all of the Toldos are on the upper floor, which is our living area. Two are in the living room and less than 4m apart with clear air between. The 3rd is in a bedroom which is about 8m from the nearest place in the living room where I could position a 433Mhz transmitter. Walls are brick, with some reinforced concrete pillars dotted around for good measure.

The downstairs seating area, where people would sit to operate the outside lights is about 5m below the living room area and directly below one of the Toldos.

I get excellent Wi-Fi reception through the house and outdoor area as I have a couple of wireless access points in addition to my router, so I guess I could have 433Mhz transmitters and receivers dotted around the house by linking them to ESP8266s and wiring them into the mains supplly, but I’d prefer not to do that unless I have to. I suppose I might also run into issues with ineterference between the devices if I’m not careaful.

Any thoughts on how successful this setup would be and any reccomendations on 433Mhz hardware?

Pete.

@PeteKnight I think this is what I would do but i’m a cheapskate :slight_smile:

3 cheap “WeMos” type boards and the sub $1 RF transmitters, WITH aerials.
A Pi Zero W local server.
Project also running on Blynk cloud server.
Leave a cheap $40 Android in the property for any guests to use.
Do away with the RF handsets.
The local server can send you messages regarding the status of each Toldos.

1 Like

@Costas - Thanks for that.
I’m not 100% sold on the idea of a cheap tablet for controlling the outside lights. There’s a good chance that drinks will get spilled on it or that kids will mess around with it, hence the idea of a simple garage door opener style remote. It might still get drinks spilled on it, but cheaper to replace and it doesn’t need to be charged up.
I could locate a 433Mhz receiver and Wemos near the seating area without too much hassle, so I could overcome the range issue.
What sort of range do you get indoors with brick walls?

Pete.

I was thinking cheap phone not tablet, the sort of thing modern kids wouldn’t go anywhere near.

A programmable RF key fob could be used in place of the Android phone and local server but then you wouldn’t get the remote updates of the Toldos’ that you were looking for.

We have a modest sized 3 bedroom apartment all on one level so we don’t have any problems with range. We run the transmitters off the 5V feed on the WeMos but they will accept 12V if you need the extra range.

1 Like