n8henrie / fauxmo

Emulated Belkin WeMo devices that work with the Amazon Echo
https://n8henrie.com/2016/02/fauxmo-home-automation-with-the-amazon-echo-raspberry-pi-and-homeassistant/
Other
376 stars 78 forks source link

Echo Dot, NOW not discovering fauxmo #105

Closed mocallins closed 4 years ago

mocallins commented 4 years ago

My Issue

SD card got corrupted. Relmage with known working configured image. Reinstalled Fauxmo as per README.md instruction, including in venv

WHYT

Intentionally corrupted config.json and it did indeed hickup and fail.


Please make sure you've taken these steps before submitting a new issue:

{
    "FAUXMO": {
        "ip_address": "auto"
    },
    "PLUGINS": {
      "CommandLinePlugin": {
        "path": "/home/pi/.venv/lib/python3.7/site-packages/fauxmo/plugins/",
        "DEVICES": [
          {
            "name": "echopi",
            "on_cmd": "uptime",
            "off_cmd": "sudo shutdown -r -t 3 now",
            "state_cmd": "uptime"
          }
        ]
      }
    }
}
n8henrie commented 4 years ago

What happens after that in the debug log? That's all the output during setup -- is there any output after that, when you ask Alexa to discover devices?

mocallins commented 4 years ago
{
    "FAUXMO": {
        "ip_address": "auto"
    },
    "PLUGINS": {
      "CommandLinePlugin": {
        "path": "/home/pi/.venv/lib/python3.7/site-packages/fauxmo/plugins/",        
        "DEVICES": [
          {
            "name": "echopi",
            "on_cmd": "uptime",
            "off_cmd": "sudo shutdown -r -t 3 now",
            "state_cmd": "uptime"
          }
        ]
      }
    }
}
mocallins commented 4 years ago
2020-09-09 14:30:58 fauxmo:42       INFO     Fauxmo v0.5.0
2020-09-09 14:30:58 fauxmo:43       DEBUG    3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0]
2020-09-09 14:30:58 fauxmo:51       INFO     Using config: config.json
2020-09-09 14:30:58 fauxmo:25       DEBUG    Attempting to get IP address automatically
2020-09-09 14:30:58 fauxmo:40       DEBUG    Using IP address: 192.168.0.27
2020-09-09 14:30:58 fauxmo:112      DEBUG    plugin_vars: {}
2020-09-09 14:30:58 fauxmo:115      DEBUG    device config: {'name': 'echopi', 'on_cmd': 'uptime', 'off_cmd': 'sudo shutdown -r -t 3 now', 'state_cmd': 'uptime'}
2020-09-09 14:30:59 asyncio:1403     INFO     <Server sockets=[<socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 52563)>]> is serving
2020-09-09 14:30:59 fauxmo:134      DEBUG    Started fauxmo device: {'name': 'echopi', 'plugin': <fauxmo.plugins.commandlineplugin.CommandLinePlugin object at 0xb5f80d70>}
2020-09-09 14:30:59 fauxmo:136      INFO     Starting UDP server
2020-09-09 14:30:59 asyncio:1259     DEBUG    Datagram endpoint remote_addr=None created: (<_SelectorDatagramTransport fd=8 read=idle write=<idle, bufsize=0>>, <fauxmo.protocols.SSDPServer object at 0xb5f80ab0>)
2020-09-09 14:31:17 asyncio:1729     INFO     poll took 18462.969 ms: 1 events
2020-09-09 14:31:17 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 14:31:17 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: ssdp:all
MAN: "ssdp:discover"
MX: 3

2020-09-09 14:31:17 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:17 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 8f2ce389-9453-4f7e-b31b-c1d333a78f8d\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: ssdp:all\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::ssdp:all\r\n\r\n'
2020-09-09 14:31:17 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 14:31:17 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

2020-09-09 14:31:17 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:17 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 1f777618-ff33-453a-9cd1-0b4fd80a2e0a\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 14:31:17 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 14:31:17 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: ssdp:all
MAN: "ssdp:discover"
MX: 3

2020-09-09 14:31:17 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:17 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 8bc00262-123c-4aa7-a252-f6e3b2dd99df\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: ssdp:all\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::ssdp:all\r\n\r\n'
2020-09-09 14:31:17 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 14:31:17 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

2020-09-09 14:31:17 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:17 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 25508af7-ed7b-4ad4-b309-c2a3836244de\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 14:31:17 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 14:31:17 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: ssdp:all
MAN: "ssdp:discover"
MX: 3

2020-09-09 14:31:17 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:17 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 987e9d6e-a3e1-4e5f-8e37-a52d65736449\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: ssdp:all\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::ssdp:all\r\n\r\n'
2020-09-09 14:31:17 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 14:31:18 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

2020-09-09 14:31:18 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:18 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: e93d3e50-64fc-4f75-9fe3-4b3bead9d5c3\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 14:31:18 asyncio:1733     DEBUG    poll 550.635 ms took 17.635 ms: 1 events
2020-09-09 14:31:18 asyncio:159      DEBUG    <Server sockets=[<socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 52563)>]> got a new connection from ('192.168.0.13', 37913): <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 52563), raddr=('192.168.0.13', 37913)>
2020-09-09 14:31:18 fauxmo:43       DEBUG    Connection made with: ('192.168.0.13', 37913)
2020-09-09 14:31:19 fauxmo:55       DEBUG    Received message:
GET /setup.xml HTTP/1.1
Host: 192.168.0.27:52563
Accept: */*
Content-Type: application/json

2020-09-09 14:31:19 fauxmo:57       INFO     setup.xml requested by Echo
2020-09-09 14:31:19 fauxmo:103      DEBUG    Fauxmo response to setup request:
HTTP/1.1 200 OK
CONTENT-LENGTH: 946
CONTENT-TYPE: text/xml
DATE: Wed, 09 Sep 2020 19:31:19 GMT
LAST-MODIFIED: Sat, 01 Jan 2000 00:01:15 GMT
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: Fauxmo
CONNECTION: close

<?xml version="1.0"?><root><specVersion><major>1</major><minor>0</minor></specVersion><device><deviceType>urn:Belkin:device:controllee:1</deviceType><friendlyName>echopi</friendlyName><manufacturer>Belkin International Inc.</manufacturer><modelName>Emulated Socket</modelName><modelNumber>3.1415</modelNumber><UDN>uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a</UDN><serviceList><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:metainfo:1</serviceType><serviceId>urn:Belkin:serviceId:metainfo1</serviceId><controlURL>/upnp/control/metainfo1</controlURL><eventSubURL>/upnp/event/metainfo1</eventSubURL><SCPDURL>/metainfoservice.xml</SCPDURL></service></serviceList></device></root>
2020-09-09 14:31:45 asyncio:1729     INFO     poll took 25558.298 ms: 1 events
2020-09-09 14:31:45 fauxmo:344      DEBUG    Received data below from ('192.168.0.136', 14678):
2020-09-09 14:31:45 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
MX: 5
ST: upnp:rootdevice
MAN: "ssdp:discover"
User-Agent: UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
Connection: close
Host: 239.255.255.250:1900

2020-09-09 14:31:45 fauxmo:420      DEBUG    Sending response to ('192.168.0.136', 14678) with mx 5.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:45 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 03da653c-9bfa-4c8b-af2b-a1415addd15c\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 14:31:45 fauxmo:344      DEBUG    Received data below from ('192.168.0.136', 14678):
2020-09-09 14:31:45 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
MX: 5
ST: upnp:rootdevice
MAN: "ssdp:discover"
User-Agent: UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
Connection: close
Host: 239.255.255.250:1900

2020-09-09 14:31:45 fauxmo:420      DEBUG    Sending response to ('192.168.0.136', 14678) with mx 5.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 19:31:45 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:52563/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: c5538c0d-f4f8-4219-8ac0-8c592e7b42f4\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 14:31:47 asyncio:1737     INFO     poll 1913.946 ms took 1917.188 ms: timeout
2020-09-09 14:31:48 asyncio:1729     DEBUG    poll took 517.327 ms: 1 events
2020-09-09 14:31:48 asyncio:159      DEBUG    <Server sockets=[<socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 52563)>]> got a new connection from ('192.168.0.136', 60608): <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 52563), raddr=('192.168.0.136', 60608)>
2020-09-09 14:31:48 fauxmo:43       DEBUG    Connection made with: ('192.168.0.136', 60608)
2020-09-09 14:31:48 fauxmo:55       DEBUG    Received message:
GET /setup.xml HTTP/1.1
User-Agent: UPnP/1.0 DLNADOC/1.50 Platinum/1.0.5.13
Host: 192.168.0.27:52563

2020-09-09 14:31:48 fauxmo:57       INFO     setup.xml requested by Echo
2020-09-09 14:31:48 fauxmo:103      DEBUG    Fauxmo response to setup request:
HTTP/1.1 200 OK
CONTENT-LENGTH: 946
CONTENT-TYPE: text/xml
DATE: Wed, 09 Sep 2020 19:31:48 GMT
LAST-MODIFIED: Sat, 01 Jan 2000 00:01:15 GMT
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: Fauxmo
CONNECTION: close

<?xml version="1.0"?><root><specVersion><major>1</major><minor>0</minor></specVersion><device><deviceType>urn:Belkin:device:controllee:1</deviceType><friendlyName>echopi</friendlyName><manufacturer>Belkin International Inc.</manufacturer><modelName>Emulated Socket</modelName><modelNumber>3.1415</modelNumber><UDN>uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a</UDN><serviceList><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:metainfo:1</serviceType><serviceId>urn:Belkin:serviceId:metainfo1</serviceId><controlURL>/upnp/control/metainfo1</controlURL><eventSubURL>/upnp/event/metainfo1</eventSubURL><SCPDURL>/metainfoservice.xml</SCPDURL></service></serviceList></device></root>
mocallins commented 4 years ago

What happens after that in the debug log? That's all the output during setup -- is there any output after that, when you ask Alexa to discover devices?

Sorry i got a better version of the log, has some weirtd charaters in there. This more complete log, is after Echo says it could not find any new devices.

mocallins commented 4 years ago

IP address ending .136 is another device i was going to run this on, if it was capable (rPi running OSMC (Kodi))

.27 is the device with the info you asked about.

mocallins commented 4 years ago

.13 is Echo Dot

n8henrie commented 4 years ago

Fauxmo seems to be responding properly (2020-09-09 14:31:17 fauxmo:420 DEBUG Sending response to ('192.168.0.13', 50000) with mx 3.0:), I'm not sure why your Dot isn't replying with the devices.

Do you have any firewalls running?

n8henrie commented 4 years ago

You're missing port from your device config: https://github.com/n8henrie/fauxmo/blob/master/src/fauxmo/plugins/commandlineplugin.py

How is that evening running? Seems like it should crash since port is a positional arg...

n8henrie commented 4 years ago

Also, as of fauxmo v0.5.0, commandline plugin is included with Fauxmo, so you shouldn't need path (I need to fix this in the documentation).

mocallins commented 4 years ago

Fauxmo seems to be responding properly (2020-09-09 14:31:17 fauxmo:420 DEBUG Sending response to ('192.168.0.13', 50000) with mx 3.0:), I'm not sure why your Dot isn't replying with the devices.

Do you have any firewalls running?

No

mocallins commented 4 years ago

Also, as of fauxmo v0.5.0, commandline plugin is included with Fauxmo, so you shouldn't need path (I need to fix this in the documentation).

I can easily try that.

mocallins commented 4 years ago

You're missing port from your device config: https://github.com/n8henrie/fauxmo/blob/master/src/fauxmo/plugins/commandlineplugin.py

How is that evening running? Seems like it should crash since port is a positional arg...

I thought port was optional.

n8henrie commented 4 years ago

U thought port was optional.

Looks like you're right. It's required to instantiate a device, but in fauxmo.py I put in a fallback: device["port"] = int(device.get("port", 0)) or get_unused_port().

mocallins commented 4 years ago

Also, as of fauxmo v0.5.0, commandline plugin is included with Fauxmo, so you shouldn't need path (I need to fix this in the documentation).

I can easily try that.

Tried, made no difference.

n8henrie commented 4 years ago

The debug output is immediately before that, which is why it isn't showing up above.

I wonder if it could be having trouble there in this case. Can you try using a fixed available port?

mocallins commented 4 years ago

The debug output is immediately before that, which is why it isn't showing up above.

  • [ ] TODO: I should probably move that after the port is configured.

I wonder if it could be having trouble there in this case. Can you try using a fixed available port?

Yep, just a sec

mocallins commented 4 years ago
[.venv] echopi:~> .venv/bin/fauxmo -vvv
2020-09-09 17:09:02 fauxmo:42       INFO     Fauxmo v0.5.0
2020-09-09 17:09:02 fauxmo:43       DEBUG    3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0]
2020-09-09 17:09:02 fauxmo:51       INFO     Using config: config.json
2020-09-09 17:09:02 fauxmo:25       DEBUG    Attempting to get IP address automatically
2020-09-09 17:09:02 fauxmo:40       DEBUG    Using IP address: 192.168.0.27
2020-09-09 17:09:02 fauxmo:112      DEBUG    plugin_vars: {}
2020-09-09 17:09:02 fauxmo:115      DEBUG    device config: {'name': 'echopi', 'port': '49020', 'on_cmd': 'uptime', 'off_cmd': 'sudo shutdown -r -t 3 now', 'state_cmd': 'uptime'}
2020-09-09 17:09:02 asyncio:1403     INFO     <Server sockets=[<socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 49020)>]> is serving
2020-09-09 17:09:02 fauxmo:134      DEBUG    Started fauxmo device: {'name': 'echopi', 'plugin': <fauxmo.plugins.commandlineplugin.CommandLinePlugin object at 0xb6023bf0>}
2020-09-09 17:09:02 fauxmo:136      INFO     Starting UDP server
2020-09-09 17:09:02 asyncio:1259     DEBUG    Datagram endpoint remote_addr=None created: (<_SelectorDatagramTransport fd=8 read=idle write=<idle, bufsize=0>>, <fauxmo.protocols.SSDPServer object at 0xb6023cd0>)
mocallins commented 4 years ago

2020-09-09 17:09:26 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 22:09:26 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:49020/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 656c907c-7308-4c9c-9426-364b959e245d\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: ssdp:all\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::ssdp:all\r\n\r\n'
2020-09-09 17:09:26 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 17:09:26 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

2020-09-09 17:09:26 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 22:09:26 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:49020/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: b1681143-8daa-4054-913a-fc977594f1e4\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 17:09:27 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 17:09:27 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: ssdp:all
MAN: "ssdp:discover"
MX: 3

2020-09-09 17:09:27 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 22:09:27 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:49020/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 07b10433-eeef-42d7-8e19-1448af6f6ab2\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: ssdp:all\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::ssdp:all\r\n\r\n'
2020-09-09 17:09:27 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 17:09:27 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

2020-09-09 17:09:27 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 22:09:27 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:49020/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: ab42b926-9194-4574-ba5a-4e561c01f598\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 17:09:27 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 17:09:27 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: ssdp:all
MAN: "ssdp:discover"
MX: 3

2020-09-09 17:09:27 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 22:09:27 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:49020/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: 6da66a3d-17fd-4c01-9d29-7eade28bc130\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: ssdp:all\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::ssdp:all\r\n\r\n'
2020-09-09 17:09:27 fauxmo:344      DEBUG    Received data below from ('192.168.0.13', 50000):
2020-09-09 17:09:27 fauxmo:345      DEBUG    M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST: upnp:rootdevice
MAN: "ssdp:discover"
MX: 3

2020-09-09 17:09:27 fauxmo:420      DEBUG    Sending response to ('192.168.0.13', 50000) with mx 3.0:
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=86400\r\nDATE: Wed, 09 Sep 2020 22:09:27 GMT\r\nEXT:\r\nLOCATION: http://192.168.0.27:49020/setup.xml\r\nOPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01\r\n01-NLS: a7c536f7-0179-43c4-84fd-c0b75d5eacce\r\nSERVER: Fauxmo, UPnP/1.0, Unspecified\r\nST: upnp:rootdevice\r\nUSN: uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a::upnp:rootdevice\r\n\r\n'
2020-09-09 17:09:28 asyncio:1733     DEBUG    poll 1923.900 ms took 531.081 ms: 1 events
2020-09-09 17:09:28 asyncio:159      DEBUG    <Server sockets=[<socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 49020)>]> got a new connection from ('192.168.0.13', 54619): <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.0.27', 49020), raddr=('192.168.0.13', 54619)>
2020-09-09 17:09:28 fauxmo:43       DEBUG    Connection made with: ('192.168.0.13', 54619)
2020-09-09 17:09:28 fauxmo:55       DEBUG    Received message:
GET /setup.xml HTTP/1.1
Host: 192.168.0.27:49020
Accept: */*
Content-Type: application/json

2020-09-09 17:09:28 fauxmo:57       INFO     setup.xml requested by Echo
2020-09-09 17:09:28 fauxmo:103      DEBUG    Fauxmo response to setup request:
HTTP/1.1 200 OK
CONTENT-LENGTH: 946
CONTENT-TYPE: text/xml
DATE: Wed, 09 Sep 2020 22:09:28 GMT
LAST-MODIFIED: Sat, 01 Jan 2000 00:01:15 GMT
SERVER: Unspecified, UPnP/1.0, Unspecified
X-User-Agent: Fauxmo
CONNECTION: close

<?xml version="1.0"?><root><specVersion><major>1</major><minor>0</minor></specVersion><device><deviceType>urn:Belkin:device:controllee:1</deviceType><friendlyName>echopi</friendlyName><manufacturer>Belkin International Inc.</manufacturer><modelName>Emulated Socket</modelName><modelNumber>3.1415</modelNumber><UDN>uuid:Socket-1_0-4dd3f46e-4528-38ec-837b-60949148db5a</UDN><serviceList><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:metainfo:1</serviceType><serviceId>urn:Belkin:serviceId:metainfo1</serviceId><controlURL>/upnp/control/metainfo1</controlURL><eventSubURL>/upnp/event/metainfo1</eventSubURL><SCPDURL>/metainfoservice.xml</SCPDURL></service></serviceList></device></root>
2020-09-09 17:09:29 asyncio:1737     INFO     poll 1325.431 ms took 1327.676 ms: timeout

^C2020-09-09 17:11:24 asyncio:1729     INFO     poll took 114807.305 ms: 1 events
2020-09-09 17:11:24 fauxmo:157      DEBUG    Shutdown starting...
2020-09-09 17:11:24 fauxmo:160      DEBUG    Shutting down server 0...
2020-09-09 17:11:24 asyncio:607      DEBUG    Close <_UnixSelectorEventLoop running=False closed=False debug=True>
[.venv] echopi:~>
mocallins commented 4 years ago

Moved your debug statement at line 116 or so: just as a test. And removed my port # from cinfig.json

2020-09-09 19:06:45 fauxmo:119 DEBUG device config: {'name': 'echopi', 'on_cmd': 'uptime', 'off_cmd': 'sudo shutdown -r -t 3 now', 'state_cmd': 'uptime', 'port': 42045}

n8henrie commented 4 years ago

Huh, not sure. Looks like Fauxmo is acting properly from what I can tell, not sure why your Echo isn't responding. They're obviously on the same network and able to communicate.

There are problems with multiple Amazon accounts trying to use the same devices -- is yours the only account in question?

Were the devices removed from the Alexa app after your SD card crashed?

mocallins commented 4 years ago

Huh, not sure. Looks like Fauxmo is acting properly from what I can tell, not sure why your Echo isn't responding. They're obviously on the same network and able to communicate.

There are problems with multiple Amazon accounts trying to use the same devices -- is yours the only account in question?

Were the devices removed from the Alexa app after your SD card crashed?

No, only 1 account.

I have removed them all, and rediscovered.

I was looking through some of your closed issues, I'm assuming all those things have been corrected.

n8henrie commented 4 years ago

I'm assuming all those things have been corrected.

No, definitely not all. If there were changes made, they've been documented in the issue.

Many of them are similar issues that seem to go away on their own, and I have no idea why.

mocallins commented 4 years ago

Hmmmm well shoot, lol but the branches , besides dev have been merged into master.

n8henrie commented 4 years ago

I just tried a copy of your CommandLinePlugin device and it worked fine (I had to discover devices twice for it to be picked up).

Not sure if this could be because you're on a different firmware. Will keep investigating.

mocallins commented 4 years ago

I just tried a copy of your CommandLinePlugin device and it worked fine (I had to discover devices twice for it to be picked up).

Not sure if this could be because you're on a different firmware. Will keep investigating.

Cool thanks

Hey does pip install all of the dependancies from the .txt file. Seems last time installed it, i saw all that get installed as well, this time it didn't seem like it, or maybe i just didn't pay attention.

n8henrie commented 4 years ago

There are no third party dependencies.

mocallins commented 4 years ago

There are no third party dependencies.

No I meant what's in requirements-dev.txt, or is that just for development.

n8henrie commented 4 years ago

Just for dev. Running tests, building docs, uploading wheels, etc.

mocallins commented 4 years ago

Well Nate, you were right, it just started working on its own. The weird part was my Echo Dot, stopped today, not being able to access the internet. No i dea why, i was on there all day, with my computer. So troubleshot all of that, had to reset my cablemodem. Got Echo Dot back on with the Alexa app, smh. Weirdest thing was, when i got it back online, i went and checked alexa.amazon.com, it had discovered the rPi running Fauxmo about 6 times, so freakin weird, and the ones it had discovered were the ones i had in the 3 node config.json. Something really odd there, idk.

I guess we can go ahead and close this. Thanks for everything.

n8henrie commented 4 years ago

Thanks for the followup. This has been my experience a number of times; wish I had a better idea of how to troubleshoot it!

mocallins commented 4 years ago

I think you did right, all you really can control is fauxmo.Who knows what was going  on with the Echo Dot. Thanks for the patience, I appreciate it.

On Monday, September 14, 2020, 10:16:42 PM CDT, Nathan Henrie <notifications@github.com> wrote:  

Thanks for the followup. This has been my experience a number of times; wish I had a better idea of how to troubleshoot it!

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.