syberteck / esp8266-smart-plug Goto Github PK
View Code? Open in Web Editor NEWAlexa compatible esp8266 or sonoff firmware.
Alexa compatible esp8266 or sonoff firmware.
Hey,
I have a Echo 2nd Gen and already tried a several of libs and implementations but none wants to work.
I tried this with a NodeMCU, but no success :( . First at all, i had to delete the Serial.println in the Switch constructor. The NodeMCU doesn't like to it and reboot when you try to make a Serial.println, before the baud rate of the Serial was set.
After fixing, i tried to discover the test device, but no device was found by the Echo.
Did you already tested it with a NodeMCU, WeMos D1 mini or a plain ESP8266?
Here is my log:
`Sending response to 192.168.178.45
Port : 3962
Response sent !
Got UDP Belkin Request..
Sending response to 192.168.178.102
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 192.168.178.102
Port : 50000
Response sent !
########## Responding to setup.xml ... ########
Sending :urn:Belkin:device:controllee:1smart plugBel
kin International Inc.Socket3.1415Belkin Plugin Socket 1.0</modelDescrip
tion>
uuid:Socket-1_0-38323636-4558-4dda-9188-cda0e62ba145-80221517K01017690urn:Belkin:service:basicevent:1urn:Belkin:serviceId:basicevent1/upnp/control/basicevent1<
/controlURL>/upnp/event/basicevent1/eventservice.xml
Got UDP Belkin Request..
Sending response to 192.168.178.102
Port : 50000
Response sent !
Got UDP Belkin Request..`
Hi! I have very recently bought an amazon echo plus (gen. 2). I've just tried it with a Wemos D1 mini and it doesn't work.
The code compilled and uploaded fine.
When I run discover devices from echo it doen't find any and the serial output of the wemos shows:
`Switch 1 turn off ...
Turning off relay
Connecting to WiFi
Connecting ..........
Connected to ciscosb23211
IP address: 10.185.9.121
Begin multicast ..
Udp multicast server started at 239.255.255.250:1900
WebServer started on port:
80
Adding switches upnp broadcast responder
Adding switch : smart plug index : 0
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 34798
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 34798
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 44288
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 44288
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 41134
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 41134
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.1
Port : 1900
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 38899
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 38899
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 55662
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 55662
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 40928
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 40928
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 60109
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 60109
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 52593
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 52593
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 52593
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 52593
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.1
Port : 1900
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 58120
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 58120
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 45608
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 45608
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 40793
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 40793
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 54763
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 54763
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 36094
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 36094
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.120
Port : 50000
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.1
Port : 1900
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 51957
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 51957
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 60883
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 60883
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 55873
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 55873
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 44691
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 44691
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 44691
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.109
Port : 44691
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 58027
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.106
Port : 58027
Response sent !
Got UDP Belkin Request..
Sending response to 10.185.9.112
Port : 1024
Response sent !
`
Amazon echo is 10.185.9.120
wemos is 10.185.9.121
and the others are devices like camera, 3d printing server etc...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.