Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended to include subscriptions to device events #1

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
580a1ce
Early Subscribe Commit
danward79 Jul 4, 2014
5f544ab
More progress with listener
danward79 Jul 5, 2014
ad84f53
Few comments and tweaks
danward79 Jul 5, 2014
b1c8a55
Early bug
danward79 Jul 5, 2014
f587832
Typo
danward79 Jul 5, 2014
416bc16
Added Struct to use in storing subscriptions
danward79 Jul 8, 2014
b9e2bb2
Added Subscription Example
danward79 Jul 8, 2014
8118df6
ManageSubscription added
danward79 Jul 13, 2014
51b9c92
Event channel added for subscription notification
danward79 Jul 13, 2014
7270e75
Tidy up
danward79 Jul 14, 2014
c27178e
Subscription Management Complete
danward79 Jul 16, 2014
879389c
Typo!
danward79 Jul 16, 2014
8ed6c5b
Create .travis.yml
danward79 Jul 17, 2014
9c437b4
Fixed a couple of bits and tidied up
danward79 Aug 9, 2014
9607edb
Delete .travis.yml
danward79 Aug 10, 2014
0d677c1
Catch failure when network is down
danward79 Aug 10, 2014
307f271
reduced logging
danward79 Aug 18, 2014
3d60795
Update README.md
danward79 Sep 14, 2014
93d1c53
added urn for netcam so it finds NetCam camera
lindsaymarkward Aug 5, 2015
ebefb10
Merge pull request #1 from lindsaymarkward/master
Aug 10, 2015
37843e4
Update context package referenence.
jonseymour Aug 15, 2016
948abd4
Merge branch 'fix-net-context-reference'
jonseymour Aug 15, 2016
b41be5d
Add support for insight device type.
jonseymour Aug 17, 2016
0a42719
Allow calls to services otherthan basic event.
jonseymour Aug 17, 2016
6113bc2
Add support for extracting the power reading from insight devices.
jonseymour Aug 17, 2016
4c2292c
ready for merge
danward79 Nov 2, 2016
559fed0
Merge branch 'catchup'
danward79 Nov 2, 2016
427ddef
Catchup & Clean up
danward79 Nov 2, 2016
b194f84
More golint warning fixes
danward79 Nov 3, 2016
2ecf399
Extract UDN, to support bridge devices
danward79 Nov 28, 2016
63284da
Bridge device discovery
danward79 Nov 30, 2016
e6a3c05
tidy up
danward79 Nov 30, 2016
377ea34
Bulb control added
danward79 Dec 3, 2016
48c3442
Updated to get bulb status
danward79 Dec 4, 2016
5effa9e
Tidy up
danward79 Dec 4, 2016
9500f15
Tidy up
danward79 Dec 12, 2016
9444bf0
Clean up after linter
danward79 Dec 16, 2016
c20c5de
Further clean ups
danward79 Dec 16, 2016
39f9d9c
Added link subscription
danward79 Dec 18, 2016
bb65384
adding tests
danward79 Dec 21, 2016
578c0b1
cml
danward79 Dec 21, 2016
598a8f6
readme link
danward79 Dec 21, 2016
cc52599
readme
danward79 Dec 21, 2016
aee7d3d
test lint errors
danward79 Dec 21, 2016
673977b
Additional tests and travis integration
danward79 Dec 21, 2016
cdd8c55
Merge branch 'master' of https://github.com/danward79/go.wemo
danward79 Jan 24, 2017
f039af6
Addition of basic URN devices
danward79 Jan 25, 2017
43c05e2
Merge branch 'Find-Fix-for-Poor-Discovery-Performance'
danward79 Jan 28, 2017
2052251
Ignore binary
danward79 Jan 28, 2017
3634aeb
Readme update
danward79 Jan 28, 2017
a2e2169
Added wrapper SetState
danward79 Jan 28, 2017
1e6e989
Correction to request close
danward79 Jan 29, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reduced logging
danward79 committed Aug 18, 2014
commit 307f271980a59712713449f34937db70a4d946e9
2 changes: 1 addition & 1 deletion device.go
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ func (self *Device) FetchDeviceInfo() (*DeviceInfo, error) {
return nil, err
}

log.Printf("%+v\n", resp.Device)
//log.Printf("%+v\n", resp.Device)

return &resp.Device, nil
}
4 changes: 2 additions & 2 deletions subscribe.go
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ func (d *Device) Subscribe(listenerAddress string, timeout int) (string, int) {
defer resp.Body.Close()

if resp.StatusCode == 200 {
log.Println("Subscription Successful: ", d.Host, resp.StatusCode)
//log.Println("Subscription Successful: ", d.Host, resp.StatusCode)
return resp.Header.Get("Sid"), resp.StatusCode
} else if resp.StatusCode == 400 {
log.Println("Subscription Unsuccessful, Incompatible header fields: ", d.Host, resp.StatusCode)
@@ -212,7 +212,7 @@ func (d *Device) UnSubscribe(sid string) int {
defer resp.Body.Close()

if resp.StatusCode == 200 {
log.Println("Unsubscription Successful: ", d.Host, resp.StatusCode)
//log.Println("Unsubscription Successful: ", d.Host, resp.StatusCode)
} else if resp.StatusCode == 400 {
log.Println("Unsubscription Unsuccessful, Incompatible header fields: ", d.Host, resp.StatusCode)
} else if resp.StatusCode == 412 {