My HA route

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

My HA route

#1 Post by Backbone » 25 Oct 2015, 08:14

I like to place here my route to what should be my best DIY HA project using EASY ESP.

Small house where I like to measure temp-humidity-powerusage and switch several 433 mHz power outlets.
I am in a try and error process and now can show temps in Domoticz (DMZ) and switch the 433 mHz power outlets.

But I got stuck on the powerusage to be displayed in DMZ.
I like to achieve the following to be displayed in Domoticz (DMZ).
1] Energy used per day in kilowatts
2] Energy used per day in Euro's
3] The same value as on the kWh meter.
The isKRA electricity meter shows 1 pulse per watt/hour so 1000 pulses is 1 kWh.
I use the same LDR sesnor board as described by others also with a LDR
http://www.ebay.nl/itm/380773705323?_tr ... EBIDX%3AIT
I use and ESP8266-01 with EASY ESP and set it as pulsecounter.
I gave it a fake iDX number to see what happens in the EASY ESP control panel.
It shows value1 and value2 but I have no idea what the meaning is for both values.
Why two values? Which is which? :-)

What virtual devices do I have to use in DMZ to display 1,2 and 3?
Can someone help me in the right direction so others might benefit from my try and error?

Paco
Attachments
Knipsel.JPG
Knipsel.JPG (81.79 KiB) Viewed 19412 times

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#2 Post by Backbone » 25 Oct 2015, 09:28

Ok one problem solved.
Found out the R39 version has different front end then the R20 version.
So I installed R39 version on this node.
Still unsure how the counters work and what time means.

Paco
Attachments
Knipsel.JPG
Knipsel.JPG (84.38 KiB) Viewed 19407 times

rtenklooster
Normal user
Posts: 320
Joined: 15 Apr 2015, 14:17

Re: My HA route

#3 Post by rtenklooster » 25 Oct 2015, 12:33

The wiki is telling you how to accomplish 1.
2 / 3 doesn't have anything to do with the esp part, you could ask that on the domoticz forum.
I know in domtoticz you can fill in the KhW price, but haven't seen this value being used anywhere. Maybe in reports or something Don't know that.
See this page for more information: [url]http://www.esp8266.nu/index.php/PulsCounter[/url]
Richard - Groningen (NL) - Image

danibilabibah
New user
Posts: 4
Joined: 24 Oct 2015, 19:56

Re: My HA route

#4 Post by danibilabibah » 25 Oct 2015, 16:25

[attachment=0]domCost.png[/attachment]
maybe this setup page at domoticz what you mean for number 2 and 3
Attachments
domCost.png
domCost.png (127.43 KiB) Viewed 19383 times

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#5 Post by Backbone » 25 Oct 2015, 19:50

@ Dani thanks for the info.

@ Martinus I looked in the Wiki but.....
Does the total count can be reset?
Does it reset at 24.00 hour by itself?
What does the Time mean?

Sorry for the questions.......

Paco
Attachments
Knipsel.JPG
Knipsel.JPG (53.67 KiB) Viewed 19368 times

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#6 Post by Backbone » 07 Nov 2015, 15:09

:?:

After uploading several ESP826-01 and 201's I wanted to reflash a 201.
It flashes OK in 1.6..5
I reboot the power and remove the pin 0.
The blue led flashes once and then once again but then stops.
Then I use the serial monitor at 115200 and NL& CR and reboot the power.
Where in previous situations I got hte first line rubbish then the next lines where nicely filled with the boot up sequence.

Now the reboot sequence and all after is not displayed.

Reinstalled Arduino 1.6..5 and EASY ESP 39 but same problem.
Replaced the USB to serial for a Ch340 version.........same problem.

Is there a sketch to send to clear the ESP memory and EEprom?

Dang,

Paco

rmtucker
Normal user
Posts: 57
Joined: 04 Oct 2015, 17:14

Re: My HA route

#7 Post by rmtucker » 07 Nov 2015, 15:49

https://dl.dropboxusercontent.com/u/588 ... syTool.ino

press 'e' to erase
press 's' to show contents

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#8 Post by Backbone » 07 Nov 2015, 19:52

rmtucker,

Thanks for the sketch.
The file uploaded OK according to the IDE to the 201.
But then the serial monitor still does not connect as the first println lines are not shown either.
I think this unit has died even it accepts a flash.
On the other hand all other ESP -01's are giving espcomm open failed even brandnew ones.
Tried two different OS XP and W7 unistall and install IDE.
Tried different USB ports two different USB to TTL units.
I am out of options.

Paco

rmtucker
Normal user
Posts: 57
Joined: 04 Oct 2015, 17:14

Re: My HA route

#9 Post by rmtucker » 07 Nov 2015, 20:14

"I reboot the power and remove the pin 0."
I assume you removed the pin 0 then rebooted otherwise it is in flashing mode?

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#10 Post by Backbone » 07 Nov 2015, 21:11

Yes the correct routine.
Remove pin 0 wire then reboot.
Also use the reset pin at power up and then removed it to see if this helps.

Just thought I found it for the ESP-01 the power supply was the problem, but no way.
An already flashed ESP01 when I hook it to the IDE in my FLASH bread board and start serial monitor also do not respond or can be flashed.
So there is something strange going on.
have to trouble shoot more.....:-(

Paco

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#11 Post by Backbone » 15 Nov 2015, 08:18

OK, some problems disappeared for unknown reason.
Serial monitor is working again and was caused by a bad power supply unit!
All is running fine now even so called fried 201 units :-)
I have to stay away from GPIO-09 to be assigned as this causes for all ESP-201 units I have to get problems with showing in browser (Chrome and IE) and reset problems to be shown clearly in the serial monitor.
see: http://www.esp8266.nu/forum/viewtopic.php?f=6&t=258

Sofar 3 x 201 and 2 x 01 running.

Paco
Last edited by Backbone on 19 Nov 2015, 21:28, edited 1 time in total.

Martinus

Re: My HA route

#12 Post by Martinus » 15 Nov 2015, 10:50

[quote="Backbone"]I have to stay away from GPIO-09 to be assigned as this causes for all ESP-201 units I have to get problems with showing in browser (Chrome and IE) and reset problems to be shown clearly in the serial monitor.
[/quote]

You can use GPIO-9 and GPIO-10 ONLY if your board supports this. I think that the ESP-201 does NOT.

A bit of background on this subject:

The ESP8266 chip communicates with the flash chip using IO lines. Earlier boards use 4 lines and program the chip using QIO mode (quad IO). A board like the NodeMCU 1.0 uses 2 lines and DIO mode (dual IO). So this board has two extra GPIO lines for general purpose.

If you use GPIO-9 or GPIO-10 on a board that uses these lines to communicate with the flash chip, you will get in trouble...

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#13 Post by Backbone » 15 Nov 2015, 18:40

Hi Martinus,

Thanks for the explanation.
Only GPIO-09 causes problems on the 201.
As you can see the GPIO-10 is in use without problems.
Just for other users if they ran into trouble and do not have to invent the wheel again.

[attachment=0]89.JPG[/attachment]

Paco
Attachments
89.JPG
89.JPG (75.33 KiB) Viewed 18802 times

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#14 Post by Backbone » 19 Nov 2015, 21:39

My esp-01 boards for simple temp only or temp+hum

[attachment=0]IMG_8377.jpg[/attachment]


Paco
Attachments
IMG_8377.jpg
IMG_8377.jpg (95.52 KiB) Viewed 18793 times
Last edited by Backbone on 19 Nov 2015, 21:41, edited 1 time in total.

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#15 Post by Backbone » 19 Nov 2015, 21:40

For the basement where my heating unit is located I am building an ESP-201 base unit.
Left hand side row of connectors for all DS18B20 sensors.
An extra 4 relay board is seperate.
This relay board will switch four seperate zone valves.
DMZ will control the relays by HTTP command line of the GPIO.
Antenna is hacked from a defective wireless router.


[attachment=0]IMG_8379.jpg[/attachment]
Attachments
IMG_8379.jpg
IMG_8379.jpg (106.78 KiB) Viewed 18793 times

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#16 Post by Backbone » 07 Dec 2015, 21:42

OK,

I have a sauna unit that is not connected to the house but in my garden.
The infrared sauna has a control panel and control box.
To switch on the sauna I have to push a momentary power button once.
One push is on and other push is off.

Then I have to push two other momentary buttons to switch on two rows of lamps at full power.
Those switches can not be pushed at once!

I like to know when the sauna is at a certain setpoint and send an email or tweet or what ever you like to use once only.

I hacked the control panel and found the connections for the 3 seperate switches.
I made a debug version with a ESP201 to control three relays to perform the push button actions with delay of one second each and remote control works fine by using the following ESPEasy output options.

Short pulses from http://www.esp8266.nu/index.php/GPIO
To send a pulse to a certain pin:
http://<ESP IP address>/control?cmd=Pulse,<pin>,<state>,<duration>
Example to send an active high pulse on GPIO 2 for 500 mSeconds:
http://<ESP IP address>/control?cmd=Pulse,2,1,500

There is no return signal YET but there are leds in the control panel which light up when each function is activated.
So I might use three opto couplers to measure the LED outputs and feed these into the ESP201 to know their EXACT status too in DMZ.

Now in DMZ "virtual sensors" have NO WORKING notification function.
This idea was proposed by Martinus and I had to give it a try in code form as a simple work around.
So in in a lua script or blocky you might get a work around.

First make in DMZ setup, more options, user variables a integer variable of your choice.
In this example I used "saunatempok" and set it to 0 as standard value..........sauna_temp_ok would have been a better description... :D
Further I have a button called "Sauna aan" which is an virtual ON/OFF button which switch on two relays by .
I made also a virtual thermostat setpoint called "Thermostaat sauna". Hacked off in the right handside of the picture.
and finaly we have the ESP EASY or EASY ESP DS18B20 sensor that in DMZ is a virtual temperature sensor "Temp sauna".

Now we set "Sauna aan = 1" (sauna = switched on) and my sauna heaters are switched on.
We only get an email confirmation if we meet certain values which are fitted in the AND function.
So the function just waits if the sauna temp passed the thermostat set point.
As the variable is zero and all other functiosn are valid we send an email that we have reach the desired temp.
Together with sending the email we set the variable to 1 which prevents a resend of the email as the function is not valid anymore.
As soon as we switch off the sauna by "Sauna aan = 0" we also reset the variable for a next session.

EDIT: in the blocky I had to change "Sauna aan = 0" to "Sauna aan = ON" or "Sauna aan = OFF"
Normally in programming 0 = OFF and 1 = ON but in this Blocky it is not.
After the change the fucntion is working fine.

Paco
variable1.JPG
variable1.JPG (85.49 KiB) Viewed 18764 times
Last edited by Backbone on 10 Dec 2015, 20:12, edited 2 times in total.

Backbone
Normal user
Posts: 106
Joined: 06 Oct 2015, 22:12

Re: My HA route

#17 Post by Backbone » 07 Dec 2015, 21:44

For some reason I can only attach ONE attachment per reply. Think this is moderated setting.

Paco
sauna roomplan.JPG
sauna roomplan.JPG (88.78 KiB) Viewed 18764 times

Post Reply

Who is online

Users browsing this forum: No registered users and 63 guests