ESP8266 ESPEasy Firmware tests - UPDATE - Page 1
Forum section: electronics / general

author: TJ232
author_rank: Frequent Contributor
timestamp: December 03, 2016, 10:16:36 am
content: 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 BoardIn Part 2 will continue withDomoticzinterface setup for therMPDMv4 AC Dimmer Board.Happy breadboarding,TJ.

author: TJ232
author_rank: Frequent Contributor
timestamp: February 09, 2017, 07:48:43 am
content: 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 theMPDMv4 Universal AC Dimmer Board.You can find more details about ESP Easy firmware on theESP Easy WIKI page

author: Dielectric
author_rank: Regular Contributor
timestamp: February 10, 2017, 01:49:41 pm
content: 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.

author: TJ232
author_rank: Frequent Contributor
timestamp: February 11, 2017, 03:34:24 pm
content: Quote from: Dielectric on February 10, 2017, 01:49:41 pmBeauty!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?

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: February 12, 2017, 12:36:33 pm
content: 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.

author: bingo600
author_rank: Super Contributor
timestamp: February 12, 2017, 02:23:38 pm
content: Quote from: JacquesBBB on February 12, 2017, 12:36:33 pmUsing earth (y/g) wire for anything but earth/ground would be Illegal here in DK (According to the Mains (230v) regulations)/Bingo

author: TJ232
author_rank: Frequent Contributor
timestamp: February 12, 2017, 04:21:09 pm
content: 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:))

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: February 12, 2017, 05:04:44 pm
content: 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.

author: Dielectric
author_rank: Regular Contributor
timestamp: February 12, 2017, 07:36:05 pm
content: Quote from: TJ232 on February 11, 2017, 03:34:24 pmYes, ESPEasy. It really is fun, I'll probably structure whatever I want to do with an ESP around it from now onMQTT 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?

author: TJ232
author_rank: Frequent Contributor
timestamp: February 14, 2017, 11:51:59 am
content: Quote from: JacquesBBB on February 12, 2017, 05:04:44 pmI 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.

author: TJ232
author_rank: Frequent Contributor
timestamp: February 14, 2017, 11:59:33 am
content: Quote from: Dielectric on February 12, 2017, 07:36:05 pmDid 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:mosquitto_sub -h localhost -v -t test/topicSend message from server:Code:mosquitto_pub -h localhost -t test/topic -m "Whatever test msg you want to send to ESP"UPDATE - Lunch break funBasic testing - ESPEasy + MQTT + RPI2 mosquitto:- start your mosquitto server :Code:sudo service mosquitto restart- upload ESPEasy on your ESP8266 :Code: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:192.168.1.36- set in ESPEasy config page:Code: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:WIFI : Connecting... 1WIFI : Connected!INIT : I2CINIT : SPI not enabledMQTT : Connected to brokerSubscribed to: /ESP871/#INIT : Boot OKINIT : Normal boot- subscribe also from RPi console :Code:mosquitto_sub -d -t /ESP871/#- from another console keep an eye on log file :Code:tail -f /var/log/mosquitto/mosquitto.log- 3rd console, let's publish something:Code: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:SW : GPIO 5 Set to 1SW : GPIO 5 Set to 0I hope it helps as a starting point to your own tests.