node-fauxmo
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "node-fauxmo", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Make fake WeMo devices. Another Node.JS port of fauxmo, borrowing heavily from fauxmojs", | ||
@@ -28,3 +28,6 @@ "main": "src/index.js", | ||
"node-fauxmo", | ||
"arduino" | ||
"arduino", | ||
"homebridge", | ||
"homebridge-platform-wemo", | ||
"siri" | ||
], | ||
@@ -38,4 +41,5 @@ "author": "Lyas Spiehler", | ||
"dependencies": { | ||
"ip": "^1.1.5" | ||
"ip": "^1.1.5", | ||
"moment": "^2.23.0" | ||
} | ||
} |
# node-fauxmo | ||
Make fake WeMo devices! Another Node.JS port of fauxmo, borrowing heavily from fauxmojs. This library gives you the ability to easily control anything you'd like from your Alexa enabled devices. You can control an array of relays from a raspberry pi or even start, stop, and get the status of a service on your computer. I've added the ability to get the status of a "fake device" from an external source. Enjoy! | ||
Make fake WeMo devices! Another Node.JS port of fauxmo, borrowing heavily from fauxmojs. This library gives you the ability to easily control anything you'd like from your Alexa and Siri enabled devices. (Siri support requires [Homebridge](https://github.com/nfarina/homebridge) and [homebridge-platform-wemo](https://github.com/rudders/homebridge-platform-wemo)) You can control an array of relays connected to a raspberry pi or even start, stop, and get the status of a service on your computer. I've added the ability to get the status of a "fake device" from an external source. Enjoy! | ||
@@ -4,0 +4,0 @@ # Installation |
@@ -8,2 +8,3 @@ 'use strict'; | ||
const os = require('os'); | ||
var moment = require('moment'); | ||
@@ -21,3 +22,3 @@ let udpServer; | ||
'CACHE-CONTROL: max-age=86400', | ||
'DATE: Mon, 22 Jun 2015 17:24:01 GMT', | ||
'DATE: ' + moment.utc(new Date()).format("ddd, DD MMM YYYY HH:mm:ss") + ' GMT', | ||
'EXT:', | ||
@@ -29,4 +30,4 @@ 'LOCATION: http://' + ipaddr + ':' + devices[i].port + '/setup.xml', | ||
'X-User-Agent: redsonic', | ||
'ST: urn:Belkin:device:**', | ||
'USN: uuid:Socket-' + serial(devices[i]) + '::urn:Belkin:device:**' | ||
'ST: urn:Belkin:service:basicevent:1', | ||
'USN: uuid:Socket-' + serial(devices[i]) + '::urn:Belkin:service:basicevent:1' | ||
].join('\r\n') + '\r\n\r\n'); | ||
@@ -102,2 +103,3 @@ responses.push(resp); | ||
//console.log('Search request from ' + util.inspect(rinfo)); | ||
//console.log(search); | ||
} else { | ||
@@ -104,0 +106,0 @@ srcip = ipaddress; |
@@ -84,8 +84,101 @@ 'use strict'; | ||
<device> | ||
<deviceType>urn:MakerMusings:device:controllee:1</deviceType> | ||
<deviceType>urn:Belkin:device:controllee:1</deviceType> | ||
<friendlyName>` + devices[i].name + `</friendlyName> | ||
<manufacturer>Belkin International Inc.</manufacturer> | ||
<modelName>Emulated Socket</modelName> | ||
<modelNumber>3.1415</modelNumber> | ||
<manufacturerURL>http://www.belkin.com</manufacturerURL> | ||
<modelDescription>Belkin Plugin Socket 1.0</modelDescription> | ||
<modelName>Socket</modelName> | ||
<modelNumber>1.0</modelNumber> | ||
<serialNumber>` + serial(devices[i]) + `</serialNumber> | ||
<UDN>uuid:Socket-1_0-` + serial(devices[i]) + `</UDN> | ||
<macAddress>00000000000` + i + `</macAddress> | ||
<firmwareVersion>WeMo_WW_2.00.11143.PVT-OWRT-SNSV2</firmwareVersion> | ||
<iconList> | ||
<icon> | ||
<mimetype>jpg</mimetype> | ||
<width>100</width> | ||
<height>100</height> | ||
<depth>100</depth> | ||
<url>icon.jpg</url> | ||
</icon> | ||
</iconList> | ||
<serviceList> | ||
<service> | ||
<serviceType>urn:Belkin:service:WiFiSetup:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:WiFiSetup1</serviceId> | ||
<controlURL>/upnp/control/WiFiSetup1</controlURL> | ||
<eventSubURL>/upnp/event/WiFiSetup1</eventSubURL> | ||
<SCPDURL>/setupservice.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:timesync:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:timesync1</serviceId> | ||
<controlURL>/upnp/control/timesync1</controlURL> | ||
<eventSubURL>/upnp/event/timesync1</eventSubURL> | ||
<SCPDURL>/timesyncservice.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:basicevent:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:basicevent1</serviceId> | ||
<controlURL>/upnp/control/basicevent1</controlURL> | ||
<eventSubURL>/upnp/event/basicevent1</eventSubURL> | ||
<SCPDURL>/eventservice.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:firmwareupdate:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:firmwareupdate1</serviceId> | ||
<controlURL>/upnp/control/firmwareupdate1</controlURL> | ||
<eventSubURL>/upnp/event/firmwareupdate1</eventSubURL> | ||
<SCPDURL>/firmwareupdate.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:rules:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:rules1</serviceId> | ||
<controlURL>/upnp/control/rules1</controlURL> | ||
<eventSubURL>/upnp/event/rules1</eventSubURL> | ||
<SCPDURL>/rulesservice.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:metainfo:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:metainfo1</serviceId> | ||
<controlURL>/upnp/control/metainfo1</controlURL> | ||
<eventSubURL>/upnp/event/metainfo1</eventSubURL> | ||
<SCPDURL>/metainfoservice.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:remoteaccess:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:remoteaccess1</serviceId> | ||
<controlURL>/upnp/control/remoteaccess1</controlURL> | ||
<eventSubURL>/upnp/event/remoteaccess1</eventSubURL> | ||
<SCPDURL>/remoteaccess.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:deviceinfo:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:deviceinfo1</serviceId> | ||
<controlURL>/upnp/control/deviceinfo1</controlURL> | ||
<eventSubURL>/upnp/event/deviceinfo1</eventSubURL> | ||
<SCPDURL>/deviceinfoservice.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:smartsetup:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:smartsetup1</serviceId> | ||
<controlURL>/upnp/control/smartsetup1</controlURL> | ||
<eventSubURL>/upnp/event/smartsetup1</eventSubURL> | ||
<SCPDURL>/smartsetup.xml</SCPDURL> | ||
</service> | ||
<service> | ||
<serviceType>urn:Belkin:service:manufacture:1</serviceType> | ||
<serviceId>urn:Belkin:serviceId:manufacture1</serviceId> | ||
<controlURL>/upnp/control/manufacture1</controlURL> | ||
<eventSubURL>/upnp/event/manufacture1</eventSubURL> | ||
<SCPDURL>/manufacture.xml</SCPDURL> | ||
</service> | ||
</serviceList> | ||
<presentationURL>/pluginpres.html</presentationURL> | ||
</device> | ||
@@ -100,3 +193,4 @@ </root>` | ||
} else { | ||
console.log('Unhandled http ' + request.method + ' request ' + request.url); | ||
//console.log('Unhandled http ' + request.method + ' request ' + request.url); | ||
//console.log(request.headers); | ||
response.end('Hello Node.js Server!'); | ||
@@ -103,0 +197,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19198
442
2
+ Addedmoment@^2.23.0
+ Addedmoment@2.30.1(transitive)