ESP8266 NodeMCU 1.0 + RF 433MHz transmitter + wireless outlet + Blynk

Hello, there is very fast and impresive project for home IoT. One night during normal browsing I find arduino library for controll 433MHz wireless outlet which is laying around for few years without usefull task. After few minutes I completed all need parts from drawer and put all together. Afer half of hour I had functional 2ch android controlled sockets. Good think to implement to project is Wifimanger library for easy SSID/pass change without reprogram ESP. In this fast project I omited it…

https://github.com/sui77/rc-switch

https://github.com/tzapu/WiFiManager

http://www.ebay.com/itm/433Mhz-WL-RF-Transmitter-Receiver-Module-Link-Kit-for-Arduino-ARM-MCU-Wireless-/380717845396?hash=item58a48d4b94:g:x9cAAMXQigBSMp4X

Screenshot_2016-03-17-23-38-26

20160317_230920

/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
*   Downloads, docs, tutorials: http://www.blynk.cc
*   Blynk community:            http://community.blynk.cc
*   Social networks:            http://www.fb.com/blynkapp
*                               http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* This example runs directly on ESP8266 chip.
*
* You need to install this for ESP8266 development:
*   https://github.com/esp8266/Arduino
*
* Change WiFi ssid, pass, and Blynk auth token to run 🙂
*
**************************************************************/

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

//——– rcswitch——
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = „dlaskjdlaskjdlasdjjasld“; //insert here your token generated by Blynk

void setup()
{
Serial.begin(9600);
Blynk.begin(auth, „Internet“, „Secretpass123“); //insert SSID…

mySwitch.enableTransmit(4);  //D2 on NodeMCU module

}

void loop()
{
Blynk.run();
}

//——-rcswitch——
BLYNK_WRITE(0) {  //virtual pin 0
mySwitch.switchOn(„01111“, „10000“);
}

BLYNK_WRITE(1) {
mySwitch.switchOff(„01111“, „10000“);
}

BLYNK_WRITE(2) {
mySwitch.switchOn(„01111“, „01000“);
}

BLYNK_WRITE(3) {
mySwitch.switchOff(„01111“, „01000“);
}

MCU controlled constant power load – battery discharger arduino + ESP8266

There is my DIY discharging device. Design is inspired from site (big thanks):

Building a Constant Current/Constant Power Electronic Load

I added ACS712 current measure module and ESP8266 for mail alert, when discharge is complete and result report via blynk mail widget.

Another improvement is paralel cables for precise measure load volage.

Update: uploaded arduino sketch with my library folder, wireless AC socket for charger controll is added! look at photo!

20160318_234219

20160318_234237

ESP8266_load load_libraries

 

 

Alcoma ASD + Wine + USB serial

Pokud potrebujete provozovat ASD Clienta pod linuxem ve Wine, zde je navod:

So, here is what I did to make it work. First of all, unless you want to run Wine each time as root, add yourself to the dialout group, so you can access serial ports without root permissions. This can be done from Terminal:

sudo adduser <your_username> dialout

You should log off and back in for the changes to take effect. This affects not only Wine, but all other Linux application that need serial port access.

The first step is to make the necessary symbolic links. Again, in Terminal:

ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
ln -s /dev/ttyS0 ~/.wine/dosdevices/com2

Adapt these commands for your situation. The first one is needed if you use a serial to USB adapter while the second one is for hardware motherboard ports. Add a symbolic link for each of the available serial ports. This command actually gives access to serial ports from Wine. And any Windows software where you can manually edit the serial port will work with only this. However many Windows apps allow user to select a port from a detected ports list. And they will detect nothing in Wine.

Now you need to add a Wine registry key as stated on Strangen0tes blog. Although you could use Wine’s regedit, it is easier to launch a text editor and add the required registry key(s). In Terminal:

gedit ~/.wine/system.reg

What you should add here is not clearly known, so you should try with the following options from Wine Wiki until you find something that works.

This is the common option that works with most applications:

[Hardware\\Devicemap\\Serialcomm] 1231984861
"Serial0"="COM1"

The other one is:

[Hardware\\Devicemap\\Serialcomm] 1131331688
"COM1"="COM1"

Both worked for me. Yet there may be apps that don’t read this registry key when looking for serial ports.

The association between COMx and /dev/ttyX is made in the symbolic link you made earlier.