WiFi Direct Connection

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Easypeasy
Normal user
Posts: 17
Joined: 23 Jul 2017, 13:50

WiFi Direct Connection

#1 Post by Easypeasy » 24 Jul 2017, 15:20

Hi All,
I have just found ESP Easy.
My scheme is to fit temperature sensors (DHT22) in various rooms in my home, send the temperatures back to a base ESP located in the boiler, average them and control my central heating on a time schedule and temperature setpoint.
I am just testing the range of the Wifi of D1 mini I am using and the connection fails too often to be used between the planned base ESP and the router.
I do not need or require router access for this application, I just need to access the ESP from a smartphone or tablet to change the schedule or temperature setpoint.
I have searched the forum and Wiki for how to configure as a local direct Wifi Access point, (not connected via router) but unable to find it.
Can someone please enlighten me. :roll:

randytsuch
Normal user
Posts: 33
Joined: 05 Jun 2017, 05:32

Re: WiFi Direct Connection

#2 Post by randytsuch » 24 Jul 2017, 18:45

I'm not an expert, but I think basically asking an ESP to act as a router is asking a bit much of it. Even just to talk to other ESPs.

Maybe try the D1 mini pro? It has a better internal antenna, and a connection to add an external antenna if you need a better signal.
That may allow you to get a reliable connection with your router.

Or maybe use a Pi running Domoticz, Openhab or one of the other HA programs the ESP easy supports.
Domoticz/Pi would do the averaging, connection to phone/tab, and any complicated scripts. ESP easy is limited in what can be implemented in rules (the ESP Easy scripting method).

I'm pretty sure you can find programs to turn a Pi into a router too.

Randy

Easypeasy
Normal user
Posts: 17
Joined: 23 Jul 2017, 13:50

Re: WiFi Direct Connection

#3 Post by Easypeasy » 25 Jul 2017, 21:02

Thanks for the ideas Randy.
I do not want to use a server for control, I want all control to be stand alone.
We know that it enters AP mode for configuration, so I would have thought it should be possible after configuring the ESP to get back into AP mode to access the webpages via a browser, or am I missing something?

randytsuch
Normal user
Posts: 33
Joined: 05 Jun 2017, 05:32

Re: WiFi Direct Connection

#4 Post by randytsuch » 25 Jul 2017, 23:23

I think its more complicated than enabling the AP function that is active at initial configuration, but I really don't know, thats a question for the sw developers.

I also really don't see a difference between using a pi with domoticz vs using an ESP with ESP easy to do the actual heater control, but maybe that's just me.
I think you will run into limitations of the ESP to do what you want. Even if you can get the ESP to be your AP, then adding heater control on top of that sounds like too much.

Randy

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: WiFi Direct Connection

#5 Post by grovkillen » 25 Jul 2017, 23:29

Yeah, I agree. Don't make it do something like that when there's cheap wall plug routers out there:

300Mbps Mini Wifi Repeater Wi-Fi Range Extender Support Router,AP,repeater and WISP Mode with detachable EU US AU UK Wall Plug
http://s.aliexpress.com/2Qj6Rv2e
(from AliExpress Android)

You can still do the serverless thing if you want, just ditch the crazy idea of having ESP Easy crunch as a router.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

timg
New user
Posts: 2
Joined: 10 Feb 2017, 06:31

Re: WiFi Direct Connection

#6 Post by timg » 26 Jul 2017, 00:07

I agree, this is asking a lot of a $10 device. If you have great software skills, you might get an ESP8266 to be an access point for nodes. A MySensors ESP8266 gateway with remote radio sensor nodes might get through your wifi range issues. Sounds like a project though. ESPEasy software won't do it. It won't even average a bunch of individual wireless sensors. (Much easier with a RPi).

But... since you don't care about remote control or access may I suggest you consider a $100 wifi enabled thermostat and be done with it?

Tim

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: WiFi Direct Connection

#7 Post by toffel969 » 26 Jul 2017, 10:30

You can also try with a d1 pro mini with external antenna, that's what I did when two nodes had bad connection, and it works great. You just have to shift the smd link from the ceramic onboard to the pigtail connector, then connect the antenna.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

User avatar
iron
Normal user
Posts: 221
Joined: 24 Sep 2016, 08:37
Location: Veria, Greece
Contact:

Re: WiFi Direct Connection

#8 Post by iron » 26 Jul 2017, 11:28

A standalone AP functionality is needed in case you want to use the ESP as a controller in a location w/o internet.
I once had to compare 2 temperatures and turn on/off a circulator pump based on a simple rule. No internet no other nodes just a rule with the unit in AP mode just for management once every now and then.

What I consider important is the lack of executing rules when main AP-Router goes down (for any reason).
Main AP-Router failure forces the ESP to go into AP / configuration mode and the rules stop working in that time frame. PN532 NFC did not open my door and I actually had to use my spare key to get into my house :)
-D

Easypeasy
Normal user
Posts: 17
Joined: 23 Jul 2017, 13:50

Re: WiFi Direct Connection

#9 Post by Easypeasy » 26 Jul 2017, 16:20

Hi Iron,
This is exactly what I need, sounds like you suceeded.
iron wrote: 26 Jul 2017, 11:28 A standalone AP functionality is needed in case you want to use the ESP as a controller in a location w/o internet.
I once had to compare 2 temperatures and turn on/off a circulator pump based on a simple rule. No internet no other nodes just a rule with the unit in AP mode just for management once every now and then.

What I consider important is the lack of executing rules when main AP-Router goes down (for any reason).
Main AP-Router failure forces the ESP to go into AP / configuration mode and the rules stop working in that time frame. PN532 NFC did not open my door and I actually had to use my spare key to get into my house :)
Can you tell me how you configured ESP Easy to achieve what you did, including the rules.
As it is when I disconnect the router, the D1 mini falls back to AP mode, and I can connect to it with a WIFI device but the browser will not connect to the webserver pages.
I noticed here https://www.letscontrolit.com/forum/vie ... 286#p17282 that someone else was achieving access to webserver when in AP mode. So it can be done. :P

If rules are not being executed on router disconnection, a bug needs to be filed to the developers for fixing, that is definitely a feature you can do without.

Easypeasy
Normal user
Posts: 17
Joined: 23 Jul 2017, 13:50

Re: WiFi Direct Connection

#10 Post by Easypeasy » 28 Jul 2017, 12:01

I have just flashed the latest dev 11 version, and it changes to AP mode if the router is turned off.
That is good, as a default, but it would be a nice feature to be able to control AP or STA mode from the config or tools pages, then if poor Wifi signal is experienced, AP mode can be selected it will prevent cycling between the two modes. :idea:

As Iron pointed out the rules stop working during this switching period, not sure if it that is a real problem, a rule reboot routine may be required, if nobody knows the answer, ( but probably Iron does) guess I will have to test it with rules myself to find out.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: WiFi Direct Connection

#11 Post by manjh » 29 Jul 2017, 18:31

this may or may not work, but I think that once you have things running, you will think of ways to make this setup a little "smarter".
In your first post you mention collecting the temperatures and averaging them. Is it really that simple?
I can already think of a few extra requirements...
1. is each temperature equally important to all others? for instance, is the temperature in the spare bedroom as important as the temp in the living room?
2. does the time-of-day make any difference? For instance, you may want to heat up the living room in the morning, then let the temperature drop a little, and bring it up again in the evening.
3. would it be nice to have the temperature driven by the fact if people are present in a room?

Ideally, I would go for an ESP in every room to measure temperature and movement: a simple DS18B sensor, and a pir sensor. Not very expensive. Then in each room use a valve on the radiator with a remote controller. I've built one a long time ago, based on a Honeywell valve.

To get all of this working you will quickly need some processing power. A Raspberry-Pi would be sufficient. Use Domoticz and write some scripts. Can be monitored and controlled from Android using the app, or any browser on Windows or Mac.

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: WiFi Direct Connection

#12 Post by AndrewJ » 29 Jul 2017, 18:44

Hello manjh,
You mentioned that you had constructed a radiator valve with remote control, based on a Honeywell valve. I'd be very interested to know more if you would like to share.... ;)
Best wishes
Andrew

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: WiFi Direct Connection

#13 Post by manjh » 29 Jul 2017, 21:27

AndrewJ wrote: 29 Jul 2017, 18:44 Hello manjh,
You mentioned that you had constructed a radiator valve with remote control, based on a Honeywell valve. I'd be very interested to know more if you would like to share.... ;)
Best wishes
Andrew
It was a long time ago... I remember it was based on a "smart" Honeywell valve. But that's about it.
Will check if there is more info.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: WiFi Direct Connection

#14 Post by manjh » 30 Jul 2017, 18:31

There is some info in the Nodo project forum. It is mostly in Dutch.

http://www.nodo-domotica.nl/forum/viewt ... r20#p13100

and:

https://github.com/OpenHR20/OpenHR20
https://piontecsmumble.wordpress.com/20 ... roduction/

I played with one valve unit for a while, but decided it was not the solution for me.

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: WiFi Direct Connection

#15 Post by AndrewJ » 30 Jul 2017, 19:12

@manjh,
Many thanks for the links. It's given me some ideas already for future projects. I had not previously discovered the Nodo forum, there is a wealth of interesting stuff there, thank you! It's a challenge for my extremely small knowledge of Dutch, but fortunately there is always Google Translate!! ;)
Groetjes (hope I spelled it right!),
Andrew

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: WiFi Direct Connection

#16 Post by manjh » 31 Jul 2017, 22:35

AndrewJ wrote: 30 Jul 2017, 19:12 @manjh,
Many thanks for the links. It's given me some ideas already for future projects. I had not previously discovered the Nodo forum, there is a wealth of interesting stuff there, thank you! It's a challenge for my extremely small knowledge of Dutch, but fortunately there is always Google Translate!! ;)
Groetjes (hope I spelled it right!),
Andrew
Nodo project was a very nice one, but unfortunately not very acive any more. Still available for information. And you could build a Nodo without much problems, I think. The webshop probably still contains some of the parts.

Easypeasy
Normal user
Posts: 17
Joined: 23 Jul 2017, 13:50

Re: WiFi Direct Connection

#17 Post by Easypeasy » 01 Aug 2017, 13:49

manjh wrote: 29 Jul 2017, 18:31 this may or may not work, but I think that once you have things running, you will think of ways to make this setup a little "smarter".
In your first post you mention collecting the temperatures and averaging them. Is it really that simple?
I can already think of a few extra requirements...
1. is each temperature equally important to all others? for instance, is the temperature in the spare bedroom as important as the temp in the living room?
2. does the time-of-day make any difference? For instance, you may want to heat up the living room in the morning, then let the temperature drop a little, and bring it up again in the evening.
3. would it be nice to have the temperature driven by the fact if people are present in a room?

Ideally, I would go for an ESP in every room to measure temperature and movement: a simple DS18B sensor, and a pir sensor. Not very expensive. Then in each room use a valve on the radiator with a remote controller. I've built one a long time ago, based on a Honeywell valve.

To get all of this working you will quickly need some processing power. A Raspberry-Pi would be sufficient. Use Domoticz and write some scripts. Can be monitored and controlled from Android using the app, or any browser on Windows or Mac.
Hi Manjh,
Thank you for your comments.
My thoughts on PIR's for bedrooms is that they would not work, as heating is required before occupant arises from the bed, and I am not sure it would be suitable in a living room either, other than a kitchen where there is plenty of activity.
I have now in fact decided to make things smarter by making them dumber, it is my experience the more complicated things are the more there is to go wrong, so I will use one ESP situated in the boiler, with a DHT22 placed in the hallway (being the mean temperature area), then just use an Android phone browser to change time schedule, occupancy/holiday and temperature setpoint as required. It will be stand alone and not require any router communication. Basically a so called smart thermostat, for next to nothing. Simples.

manjh
Normal user
Posts: 516
Joined: 08 Feb 2016, 11:22

Re: WiFi Direct Connection

#18 Post by manjh » 01 Aug 2017, 21:41

Easypeasy wrote: 01 Aug 2017, 13:49
manjh wrote: 29 Jul 2017, 18:31 this may or may not work, but I think that once you have things running, you will think of ways to make this setup a little "smarter".
In your first post you mention collecting the temperatures and averaging them. Is it really that simple?
I can already think of a few extra requirements...
1. is each temperature equally important to all others? for instance, is the temperature in the spare bedroom as important as the temp in the living room?
2. does the time-of-day make any difference? For instance, you may want to heat up the living room in the morning, then let the temperature drop a little, and bring it up again in the evening.
3. would it be nice to have the temperature driven by the fact if people are present in a room?

Ideally, I would go for an ESP in every room to measure temperature and movement: a simple DS18B sensor, and a pir sensor. Not very expensive. Then in each room use a valve on the radiator with a remote controller. I've built one a long time ago, based on a Honeywell valve.

To get all of this working you will quickly need some processing power. A Raspberry-Pi would be sufficient. Use Domoticz and write some scripts. Can be monitored and controlled from Android using the app, or any browser on Windows or Mac.
Hi Manjh,
Thank you for your comments.
My thoughts on PIR's for bedrooms is that they would not work, as heating is required before occupant arises from the bed, and I am not sure it would be suitable in a living room either, other than a kitchen where there is plenty of activity.
I have now in fact decided to make things smarter by making them dumber, it is my experience the more complicated things are the more there is to go wrong, so I will use one ESP situated in the boiler, with a DHT22 placed in the hallway (being the mean temperature area), then just use an Android phone browser to change time schedule, occupancy/holiday and temperature setpoint as required. It will be stand alone and not require any router communication. Basically a so called smart thermostat, for next to nothing. Simples.
You are right, it sounds like a smart thermostat which would cost a small amount as well. I have automated a lot of function in my home, including the installation of an open-therm gateway so I can check and control my heating system from my Domoticz server.
But I also have a Remeha smart thermostat, and when I see the function that this little thing offers, I have no doubt that it would take a lot of work to even get close.
My motto is: DIY when it is not available as a ready-made solution or when it can be done a lot cheaper. In other cases, I will simply go for the ready-made... :)

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests