Author Topic: ESP8266 ESPEasy Firmware tests - UPDATE  (Read 5884 times)

0 Members and 1 Guest are viewing this topic.

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
ESP8266 ESPEasy Firmware tests - UPDATE
« on: December 03, 2016, 10:16:36 am »
Hi Everybody,

I have released Part 1 of the ESP Easy Firmware related Series, original Article can be found here: ESP Easy Part 1: Firmware upload and simple PWM tests with MPDMv4 AC Dimmer Board



In Part 2 will continue with Domoticz interface setup for ther MPDMv4 AC Dimmer Board.

Happy breadboarding,
TJ.
« Last Edit: February 09, 2017, 07:49:47 am by TJ232 »
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 
The following users thanked this post: thm_w, jct

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: ESP8266 ESPEasy Firmware tests - UPDATED - P2
« Reply #1 on: February 09, 2017, 07:48:43 am »
Part 2 of the ESPEasy Series.

This time we will go further and complete a full ESP8266 / Domoticz Dimmer setup on a RPi2 Board using the MPDMv4 Universal AC Dimmer Board.

You can find more details about ESP Easy firmware on the ESP Easy WIKI page

ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #2 on: February 10, 2017, 01:49:41 pm »
That looks super cool, can't wait for a spare hour or two to fool with it. 

I've got a half-dozen ESPs looking for a purpose in life, and I just started fooling around with MQTT and Node Red just because.  Now you've got me shopping for a Razberry board so I can hook Domoticz to my existing z-wave stuff.

edit:  OK, I stole some time at lunch.  This is too much fun.  I've got an ESP12 with a button on it, reporting a toggled status message through Node-Red, Mosquitto, and the node-dashboard webpage generator thingy.  Node-Red and Mosquitto are running on a C.H.I.P. board so every bit of this is running through WiFi.  The closest thing to code that I've written is adding the switchcmd tag to a text display box after I parse the MQTT payload to JSON.

Next task is loading the node-red-contrib-alexa module so I can have Alexa tell me if the button is open or closed.
« Last Edit: February 10, 2017, 07:12:48 pm by Dielectric »
 

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #3 on: February 11, 2017, 03:34:24 pm »
That looks super cool, can't wait for a spare hour or two to fool with it. 

I've got a half-dozen ESPs looking for a purpose in life, and I just started fooling around with MQTT and Node Red just because.  Now you've got me shopping for a Razberry board so I can hook Domoticz to my existing z-wave stuff.

edit:  OK, I stole some time at lunch.  This is too much fun.  I've got an ESP12 with a button on it, reporting a toggled status message through Node-Red, Mosquitto, and the node-dashboard webpage generator thingy.  Node-Red and Mosquitto are running on a C.H.I.P. board so every bit of this is running through WiFi.  The closest thing to code that I've written is adding the switchcmd tag to a text display box after I parse the MQTT payload to JSON.

Next task is loading the node-red-contrib-alexa module so I can have Alexa tell me if the button is open or closed.

Beauty! :)
Looking forward to hear more about your alexa integration.
By the way, what firmware are you using on the ESP8266 side? ESPEasy? How stable is your MQTT communication?
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline JacquesBBB

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #4 on: February 12, 2017, 12:36:33 pm »
My advice is that you should never use yellow/green wires for anything else than ground.

This is even more true for a video that wants to be didactical.
 
The following users thanked this post: janoc, newbrain

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #5 on: February 12, 2017, 02:23:38 pm »
My advice is that you should never use yellow/green wires for anything else than ground.

This is even more true for a video that wants to be didactical.

Using earth (y/g) wire for anything but earth/ground would be Illegal here in DK (According to the Mains (230v) regulations)

/Bingo
 
The following users thanked this post: JPortici

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #6 on: February 12, 2017, 04:21:09 pm »

Same strict MAINS wiring rules and regulations are in place also here.

As been just a quick bench test in a controlled environment and as been short on brown wire, just used a 10 cm wrong color one between Dimmer board and lightbulb.

<joke mode on>I really hope I will survive and will be not arrested over night by the MAINS secret service. Their undercover agents looks to be , including here. LOL.
</joke mode off>

I was expecting any other comments but that wire color thing:))

 
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline JacquesBBB

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #7 on: February 12, 2017, 05:04:44 pm »
The fact that you use a Y/G wire for a life wire in your workshop, knowing  the regulations and potential hazard is your problem,
but as you are posting this video  on the web, where it can be seen by thousands of people,

you should expect that someone will remind that this is very dangerous, and should always be avoided. 
I had indeed in my house some (old) wiring of the kind,
with Y/G wire  in a plug for a life wire, and it led to a short circuit.
 

Offline Dielectric

  • Regular Contributor
  • *
  • Posts: 127
  • Country: 00
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #8 on: February 12, 2017, 07:36:05 pm »

Beauty! :)
Looking forward to hear more about your alexa integration.
By the way, what firmware are you using on the ESP8266 side? ESPEasy? How stable is your MQTT communication?

Yes, ESPEasy.  It really is fun, I'll probably structure whatever I want to do with an ESP around it from now on :)

MQTT messages from the ESP to my CHIP are working fine, but I haven't finished making stuff go the other way since I'm blindly poking things in Node-Red and ESPEasy.  I'm not sure how to create the message properly into the MQTT server for the ESP to pick up the topic.  If you've got a pointer, I'm all eyes/ears.  It's quite possible that I haven't found the right manual to read yet.

I got sidetracked on the Alexa thing because I didn't have my Amazon dev login info handy.  Maybe today?
 

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #9 on: February 14, 2017, 11:51:59 am »
The fact that you use a Y/G wire for a life wire in your workshop, knowing  the regulations and potential hazard is your problem,
but as you are posting this video  on the web, where it can be seen by thousands of people,

you should expect that someone will remind that this is very dangerous, and should always be avoided. 
I had indeed in my house some (old) wiring of the kind,
with Y/G wire  in a plug for a life wire, and it led to a short circuit.

I am not doing any kind of wiring agains the rules and regulations. Never. As a good practice. All my MAINS wiring is OK and by the book.

We are talking here about a 10cm temporary wire between the board output and the lighbulb socket ON the test bench.

Yes, you all have right, is was wrong color, explained above why, was changed, all OK, 100% survivors around.

ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 

Offline TJ232Topic starter

  • Frequent Contributor
  • **
  • Posts: 331
  • Country: 00
  • www.esp8266-projects.org
    • ESP8266 Projects
Re: ESP8266 ESPEasy Firmware tests - UPDATE
« Reply #10 on: February 14, 2017, 11:59:33 am »

Beauty! :)
Looking forward to hear more about your alexa integration.
By the way, what firmware are you using on the ESP8266 side? ESPEasy? How stable is your MQTT communication?

Yes, ESPEasy.  It really is fun, I'll probably structure whatever I want to do with an ESP around it from now on :)

MQTT messages from the ESP to my CHIP are working fine, but I haven't finished making stuff go the other way since I'm blindly poking things in Node-Red and ESPEasy.  I'm not sure how to create the message properly into the MQTT server for the ESP to pick up the topic.  If you've got a pointer, I'm all eyes/ears.  It's quite possible that I haven't found the right manual to read yet.

I got sidetracked on the Alexa thing because I didn't have my Amazon dev login info handy.  Maybe today?

Did not had the chance to try MQTT with ESPEasy firmware but will do it.

As server I have used mosquitto on RPI2, just subscribe your ESP to a topic and if all OK you should be able to receive and send messages on the MQTT Server like:

Create topic:
Code: [Select]
mosquitto_sub -h localhost -v -t test/topic
Send message from server:
Code: [Select]
mosquitto_pub -h localhost -t test/topic -m "Whatever test msg you want to send to ESP"

UPDATE - Lunch break fun :)

Basic testing - ESPEasy + MQTT + RPI2 mosquitto:

- start your mosquitto server  :
Code: [Select]
sudo service mosquitto restart
- upload ESPEasy on your ESP8266 :
Code: [Select]
version 147_RC8
- reboot ESP8266

- connect with a terminal on your serial to receive ESP8266 board debug messages

- configure your WIFI on your ESP8266 and connect to network :
Code: [Select]
192.168.1.36
- set in ESPEasy config page:
Code: [Select]
http://192.168.1.36/config     - a unique name  for your ESP8266 : ESP871
     - protocol  : OPENHAB MQTT
     - Controller IP/port : 192.168.1.16 1883

- save config and reboot ESP board

- you should see in the Serial Terminal something like:
Code: [Select]
WIFI : Connecting... 1
WIFI : Connected!
INIT : I2C
INIT : SPI not enabled
MQTT : Connected to broker
Subscribed to: /ESP871/#
INIT : Boot OK
INIT : Normal boot

- subscribe also from RPi console :
Code: [Select]
mosquitto_sub -d -t /ESP871/#
- from another console keep an eye on log file :
Code: [Select]
tail -f /var/log/mosquitto/mosquitto.log
- 3rd console, let's publish something:
Code: [Select]
mosquitto_pub -d -t /ESP871/gpio/5 -m "1"
mosquitto_pub -d -t /ESP871/gpio/5 -m "0"

If you have a LED connected at GPIO5 you should see the result as a ON/OFF command on your LED.

Also in the Serial terminal window you will see:
Code: [Select]
SW   : GPIO 5 Set to 1
SW   : GPIO 5 Set to 0

I hope it helps as a starting point to your own tests.




 

« Last Edit: February 14, 2017, 02:03:53 pm by TJ232 »
ESP8266 Projects - www.esp8266-projects.org
MPDMv4 Dimmer Board available on Tindie: https://www.tindie.com/stores/next_evo1/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf