Comments (17)
Hey @bdudle1, which MAC address did you use? It should be the MAC address of the host, not the docker container. Can you give me an output of ifconfig
from your host?
from smartthings-mqtt-bridge.
@stjohnjohnson Thank you so much for the response. I've tried the mac of my linux VM running Ubuntu (and mqtt), the docker container, and the host machine that runs the VM.
Here's a screenshot of my current device config in ST IDE. By the way, do you know why it goes to "inactive" for me after a day?
http://i.imgur.com/lSthAwH.png
Here's ifconfig from my ubuntu machine (running hass, mqtt, and mqtt-bridge in docker containers):
docker0 Link encap:Ethernet HWaddr 02:42:ca:b7:fe:9d
inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
inet6 addr: fe80::42:caff:feb7:fe9d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4609471 errors:0 dropped:0 overruns:0 frame:0
TX packets:11170741 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1030144364 (1.0 GB) TX bytes:16214637086 (16.2 GB)
eth0 Link encap:Ethernet HWaddr 00:15:5d:0a:05:02
inet addr:10.10.10.101 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::8aca:ddb8:25:46f0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35598055 errors:0 dropped:395 overruns:0 frame:0
TX packets:14978022 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51334992148 (51.3 GB) TX bytes:3681848763 (3.6 GB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:64858 errors:0 dropped:0 overruns:0 frame:0
TX packets:64858 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:5694128 (5.6 MB) TX bytes:5694128 (5.6 MB)
veth0173673 Link encap:Ethernet HWaddr ea:1f:aa:0f:af:97
inet6 addr: fe80::e81f:aaff:fe0f:af97/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12057 errors:0 dropped:0 overruns:0 frame:0
TX packets:23107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:873061 (873.0 KB) TX bytes:1633038 (1.6 MB)
veth8add0e8 Link encap:Ethernet HWaddr 5e:1a:77:af:6a:74
inet6 addr: fe80::5c1a:77ff:feaf:6a74/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21342 errors:0 dropped:0 overruns:0 frame:0
TX packets:14430 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1551803 (1.5 MB) TX bytes:1224352 (1.2 MB)
from smartthings-mqtt-bridge.
Interesting, I haven't tested VMs. So the problem is that SmartThings ignores all messages from IP/Mac addresses it doesn't recognize.
Can you show me the contents of events.log
from the bridge?
from smartthings-mqtt-bridge.
Is there any log on the Hub or ST that shows incoming/dropped messages?
It's pretty slim because i deleted it recently. The last couple events are from me trying to turn off the switch using hass:
2016-11-18T19:03:23.487Z - info: Starting SmartThings MQTT Bridge - v1.3.3
2016-11-18T19:03:23.489Z - info: Loading configuration
2016-11-18T19:03:23.497Z - info: Loading previous state
2016-11-18T19:03:23.499Z - info: Perfoming configuration migration
2016-11-18T19:03:23.501Z - info: Saving current state
2016-11-18T19:03:23.503Z - info: Connecting to MQTT at mqtt://10.10.10.101
2016-11-18T19:03:23.583Z - info: Configuring autosave
2016-11-18T19:03:23.585Z - info: Configuring API
2016-11-18T19:03:23.719Z - info: Listening at http://localhost:8080
2016-11-18T19:03:23.728Z - info: Incoming message from MQTT: smartthings/MPS Backdoor/acceleration = inactive
2016-11-18T19:03:23.728Z - info: Skipping duplicate message from: smartthings/MPS Backdoor/acceleration = inactive
2016-11-18T19:03:23.729Z - info: Incoming message from MQTT: smartthings/MPS Frontdoor/acceleration = inactive
2016-11-18T19:03:23.729Z - info: Skipping duplicate message from: smartthings/MPS Frontdoor/acceleration = inactive
2016-11-18T19:03:23.729Z - info: Incoming message from MQTT: smartthings/MPS Backdoor/temperature = 73
2016-11-18T19:03:23.729Z - info: Skipping duplicate message from: smartthings/MPS Backdoor/temperature = 73
2016-11-18T19:03:23.729Z - info: Incoming message from MQTT: smartthings/MPS Frontdoor/temperature = 68
2016-11-18T19:03:23.730Z - info: Skipping duplicate message from: smartthings/MPS Frontdoor/temperature = 68
2016-11-18T19:03:23.732Z - info: Incoming message from MQTT: smartthings/Motion Sensor/temperature = 67
2016-11-18T19:03:23.732Z - info: Skipping duplicate message from: smartthings/Motion Sensor/temperature = 67
2016-11-18T19:03:23.739Z - info: Incoming message from MQTT: smartthings/Outlet/power = 0
2016-11-18T19:03:23.740Z - info: Skipping duplicate message from: smartthings/Outlet/power = 0
2016-11-18T19:03:23.740Z - info: Incoming message from MQTT: smartthings/Motion Sensor/motion = inactive
2016-11-18T19:03:23.740Z - info: Skipping duplicate message from: smartthings/Motion Sensor/motion = inactive
2016-11-18T19:03:23.741Z - info: Incoming message from MQTT: smartthings/MPS Backdoor/threeAxis = 31,1055,-3
2016-11-18T19:03:23.741Z - info: Skipping duplicate message from: smartthings/MPS Backdoor/threeAxis = 31,1055,-3
2016-11-18T19:03:23.744Z - info: Incoming message from MQTT: smartthings/MPS Frontdoor/threeAxis = 16,1045,-7
2016-11-18T19:03:23.744Z - info: Skipping duplicate message from: smartthings/MPS Frontdoor/threeAxis = 16,1045,-7
2016-11-18T19:03:23.750Z - info: Incoming message from MQTT: smartthings/Outlet/switch = on
2016-11-18T19:03:23.750Z - info: Skipping duplicate message from: smartthings/Outlet/switch = on
2016-11-18T19:03:23.753Z - info: Incoming message from MQTT: smartthings/MPS Backdoor/contact = closed
2016-11-18T19:03:23.753Z - info: Skipping duplicate message from: smartthings/MPS Backdoor/contact = closed
2016-11-18T19:03:23.755Z - info: Incoming message from MQTT: smartthings/MPS Frontdoor/contact = closed
2016-11-18T19:03:23.755Z - info: Skipping duplicate message from: smartthings/MPS Frontdoor/contact = closed
2016-11-18T19:03:23.765Z - info: Incoming message from MQTT: smartthings/MPS Backdoor/battery = 100
2016-11-18T19:03:23.765Z - info: Skipping duplicate message from: smartthings/MPS Backdoor/battery = 100
2016-11-18T19:03:44.922Z - info: Incoming message from MQTT: smartthings/Outlet/switch = off
2016-11-18T19:03:56.730Z - info: Incoming message from MQTT: smartthings/Outlet/switch = on
from smartthings-mqtt-bridge.
Click the save button in the Smart App, it will update the device. What do the logs in SmartThings say about the device/smartapp?
from smartthings-mqtt-bridge.
I can see events for the device in the IDE side:
MQTTBridge (Device) Events — displayed | all | from device
Date Source Type Name Value User Displayed Text Changed
2016-11-18 2:18:33.946 PM EST
moments ago COMMAND deviceNotification deviceNotification({"path":"/subscribe","body":{"devices":{"notify":["Contacts","System"],"acceleration":["MPS Backdoor","MPS ... true
2016-11-18 2:18:33.723 PM EST
moments ago APP_COMMAND deviceNotification true
2016-11-18 2:17:37.629 PM EST
moments ago COMMAND deviceNotification deviceNotification({"path":"/subscribe","body":{"devices":{"notify":["Contacts","System"],"acceleration":["MPS Backdoor","MPS ... true
2016-11-18 2:17:37.393 PM EST
moments ago APP_COMMAND deviceNotification true
2016-11-18 2:13:06.603 PM EST
6 minutes ago COMMAND deviceNotification deviceNotification({"path":"/push","body":{"name":"Motion Sensor","value":"68","type":"temperature"}}) command was sent to MQT... true
2016-11-18 2:13:06.583 PM EST
6 minutes ago APP_COMMAND deviceNotification true
2016-11-18 2:02:37.742 PM EST
16 minutes ago COMMAND deviceNotification deviceNotification({"path":"/subscribe","body":{"devices":{"notify":["Contacts","System"],"acceleration":["MPS Backdoor","MPS ... true
2016-11-18 2:02:37.472 PM EST
16 minutes ago APP_COMMAND deviceNotification true
2016-11-18 1:48:28.338 PM EST
30 minutes ago COMMAND deviceNotification deviceNotification({"path":"/push","body":{"name":"MPS Frontdoor","value":"inactive","type":"acceleration"}}) command was sent... true
from smartthings-mqtt-bridge.
The only thing that could be causing this is SmartThings throwing away the messages because the MAC address that the message comes from does not match what you saved. But I don't know what your computer is sending. :(
from smartthings-mqtt-bridge.
Is there any way to see what it is sending? Could I do some sort of packet capture somehow?
from smartthings-mqtt-bridge.
Also... is it only verifying by MAC address? Or is it also verifying on IP address?
from smartthings-mqtt-bridge.
I bet you could perform a tcpdump between your VM and the ST Hub. It's all HTTP so it should be easy
from smartthings-mqtt-bridge.
ben@hass:~/hass/hass-config/scripts$ sudo tcpdump dst host 10.10.10.70 -v -e -i eth0
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:17:02.906418 00:15:5d:0a:05:02 (oui Unknown) > d0:52:a8:35:b7:9c (oui Unknown), ethertype IPv4 (0x0800), length 74: (tos 0x0, ttl 63, id 12299, offset 0, flags [DF], proto TCP (6), length 60)
hass.theduds.local.50180 > 10.10.10.70.39500: Flags [S], cksum 0x28ed (incorrect -> 0x9e4a), seq 1615732284, win 29200, options [mss 1460,sackOK,TS val 64302647 ecr 0,nop,wscale 6], length 0
15:17:02.906883 00:15:5d:0a:05:02 (oui Unknown) > d0:52:a8:35:b7:9c (oui Unknown), ethertype IPv4 (0x0800), length 66: (tos 0x0, ttl 63, id 12300, offset 0, flags [DF], proto TCP (6), length 52)
hass.theduds.local.50180 > 10.10.10.70.39500: Flags [.], cksum 0x28e5 (incorrect -> 0x3cb0), ack 623111038, win 457, options [nop,nop,TS val 64302647 ecr 26734179], length 0
15:17:02.907092 00:15:5d:0a:05:02 (oui Unknown) > d0:52:a8:35:b7:9c (oui Unknown), ethertype IPv4 (0x0800), length 253: (tos 0x0, ttl 63, id 12301, offset 0, flags [DF], proto TCP (6), length 239)
hass.theduds.local.50180 > 10.10.10.70.39500: Flags [P.], cksum 0x29a0 (incorrect -> 0x7dbc), seq 0:187, ack 1, win 457, options [nop,nop,TS val 64302647 ecr 26734179], length 187
15:17:02.940514 00:15:5d:0a:05:02 (oui Unknown) > d0:52:a8:35:b7:9c (oui Unknown), ethertype IPv4 (0x0800), length 66: (tos 0x0, ttl 63, id 12302, offset 0, flags [DF], proto TCP (6), length 52)
hass.theduds.local.50180 > 10.10.10.70.39500: Flags [.], cksum 0x28e5 (incorrect -> 0x3bbd), ack 45, win 457, options [nop,nop,TS val 64302655 ecr 26734183], length 0
15:17:02.957221 00:15:5d:0a:05:02 (oui Unknown) > d0:52:a8:35:b7:9c (oui Unknown), ethertype IPv4 (0x0800), length 66: (tos 0x0, ttl 63, id 12303, offset 0, flags [DF], proto TCP (6), length 52)
hass.theduds.local.50180 > 10.10.10.70.39500: Flags [F.], cksum 0x28e5 (incorrect -> 0x3bb6), seq 187, ack 46, win 457, options [nop,nop,TS val 64302659 ecr 26734184], length 0
15:17:07.918225 00:15:5d:0a:05:02 (oui Unknown) > d0:52:a8:35:b7:9c (oui Unknown), ethertype ARP (0x0806), length 42: Ethernet (len 6), IPv4 (len 4), Request who-has 10.10.10.70 tell hass.theduds.local, length 28
from smartthings-mqtt-bridge.
Hi, just wanted to chime in with a Home Assistant config that works for me, with this I can control and check status of an ST outlet (the one in the current kit):
switch:
platform: mqtt
state_topic: "smartthings/Outlet/switch"
command_topic: "smartthings/Outlet/switch"
qos: 0
payload_on: "on"
payload_off: "off"
optimistic: false
Might help you troubleshoot some more.
from smartthings-mqtt-bridge.
Thanks. My problem doesn't appear to be HASS config related. It seems that my hub is just ignoring the request. I even did manual requests with mosquitto as well as just straight HTTP posts to the hub and it doesn't do anything.
I'm going to try to send the messages from the host machine and see if that works. If it does, then I should just need to put the host's mac into the settings (but I doubt it will work). The VM must be adding something to the post that ST doesn't like.
@stjohnjohnson Is there any documentation on what the ST hub should be expecting? (I know I could probably find it...)
from smartthings-mqtt-bridge.
just FYI, i had a spare laptop laying around... i setup HASS, MQTT, and MQTT-bridge on it and everything works as expected... So, it's definitely not something I'm doing wrong :)
Ideally, I can figure out how to get this to work on the VM. Any thoughts on how to troubleshoot further? ST doesn't like the request coming from the bridge, but I don't know how to figure out why.
from smartthings-mqtt-bridge.
Honestly, the documentation for this interaction is missing and/or terrible. I pieced all of this together from forum posts and the tiny amount of docs.
As far as I'm aware, the hub doesn't respond to messages from a mac address not listed as a device.
from smartthings-mqtt-bridge.
Thanks. I really appreciate you trying to help me. I'll keep playing with it and see if I can find anything out.
I'm curious if anyone else is doing this with a VM and having success. If there's an issue, it might be worth mentioning in the project somewhere.
from smartthings-mqtt-bridge.
For what it's worth... I did finally get this working... The only thing I did differently was to restart all 3 components after updating the MAC and IP address on the device in the ST IDE. It is working fine now on my VM.
from smartthings-mqtt-bridge.
Related Issues (20)
- New Smartthings restful API HOT 5
- Device Network ID collision with another DTH HOT 5
- Socket error on client <unknown>, disconnecting
- Continued support HOT 1
- trying to get this running as a service in windows 10 powershell HOT 1
- Unsure where to add IP / port / MAC to the IDE settings? HOT 2
- Set process.title HOT 1
- SmartApp triggers ok, but bridge.deviceNotification(json) not triggered HOT 1
- Issue during Docker installation with "-v /opt/mqtt-bridge:/config" HOT 1
- Questions... questions... and more questions HOT 1
- Release of new Bridge based on smartthings-mqtt-bridge HOT 5
- MQTT on different port HOT 4
- Python HOT 3
- Docker Exits when starting HOT 1
- the bridge works but nothing on HA HOT 1
- Cant uninstall anything .. HOT 3
- config.yml file does not exist
- New Smartthings app/platform HOT 8
- Config.yml help HOT 1
- No HUB, but using ST cloud
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smartthings-mqtt-bridge.