Use "openhab" event topic prefix (#304)
Signed-off-by: Wouter Born <github@maindrain.net>pull/305/head
parent
7ca5d1fcc0
commit
60e6c78b5a
|
@ -1,6 +1,6 @@
|
|||
This content is produced and maintained by the Eclipse SmartHome project.
|
||||
This content is produced and maintained by the openHAB project.
|
||||
|
||||
* Project home: https://openhab.org/
|
||||
* Project home: https://www.openhab.org
|
||||
|
||||
== Declared Project Licenses
|
||||
|
||||
|
@ -10,13 +10,7 @@ https://www.eclipse.org/legal/epl-2.0/.
|
|||
|
||||
== Source Code
|
||||
|
||||
https://github.com/eclipse/smarthome
|
||||
|
||||
== Copyright Holders
|
||||
|
||||
See the NOTICE file distributed with the source code at
|
||||
https://github.com/eclipse/smarthome/blob/master/NOTICE
|
||||
for detailed information regarding copyright ownership.
|
||||
https://github.com/openhab/openhab-webui
|
||||
|
||||
== Third-party Content
|
||||
|
||||
|
@ -233,4 +227,4 @@ Roboto Font Face 2.01289
|
|||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
limitations under the License.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
This content is produced and maintained by the Eclipse SmartHome project.
|
||||
This content is produced and maintained by the openHAB project.
|
||||
|
||||
* Project home: https://openhab.org/
|
||||
* Project home: https://www.openhab.org
|
||||
|
||||
== Declared Project Licenses
|
||||
|
||||
|
@ -10,13 +10,7 @@ https://www.eclipse.org/legal/epl-2.0/.
|
|||
|
||||
== Source Code
|
||||
|
||||
https://github.com/eclipse/smarthome
|
||||
|
||||
== Copyright Holders
|
||||
|
||||
See the NOTICE file distributed with the source code at
|
||||
https://github.com/eclipse/smarthome/blob/master/NOTICE
|
||||
for detailed information regarding copyright ownership.
|
||||
https://github.com/openhab/openhab-webui
|
||||
|
||||
== Third-party Content
|
||||
|
||||
|
@ -233,4 +227,4 @@ Roboto Font Face 2.01289
|
|||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
limitations under the License.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
This content is produced and maintained by the Eclipse SmartHome project.
|
||||
This content is produced and maintained by the openHAB project.
|
||||
|
||||
* Project home: https://openhab.org/
|
||||
* Project home: https://www.openhab.org
|
||||
|
||||
== Declared Project Licenses
|
||||
|
||||
|
@ -10,13 +10,7 @@ https://www.eclipse.org/legal/epl-2.0/.
|
|||
|
||||
== Source Code
|
||||
|
||||
https://github.com/eclipse/smarthome
|
||||
|
||||
== Copyright Holders
|
||||
|
||||
See the NOTICE file distributed with the source code at
|
||||
https://github.com/eclipse/smarthome/blob/master/NOTICE
|
||||
for detailed information regarding copyright ownership.
|
||||
https://github.com/openhab/openhab-webui
|
||||
|
||||
== Third-party Content
|
||||
|
||||
|
@ -233,4 +227,4 @@ Roboto Font Face 2.01289
|
|||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
limitations under the License.
|
||||
|
|
|
@ -165,7 +165,7 @@
|
|||
|
||||
function registerEventSource() {
|
||||
if (typeof(EventSource) !== "undefined") {
|
||||
var source = new EventSource('/rest/events?topics=smarthome/items/*/statechanged,smarthome/items/*/*/statechanged,smarthome/webaudio/playurl');
|
||||
var source = new EventSource('/rest/events?topics=openhab/items/*/statechanged,openhab/items/*/*/statechanged,openhab/webaudio/playurl');
|
||||
liveUpdatesEnabled = true;
|
||||
|
||||
source.onmessage = function (event) {
|
||||
|
@ -211,7 +211,7 @@
|
|||
|
||||
});
|
||||
}
|
||||
} else if (evtdata.topic === "smarthome/webaudio/playurl") {
|
||||
} else if (evtdata.topic === "openhab/webaudio/playurl") {
|
||||
var context, audioBuffer;
|
||||
try {
|
||||
window.AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
|||
this.currentlyInstalling.push(addon.id)
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/addons/*/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/addons/*/*', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -126,7 +126,7 @@ export default {
|
|||
this.currentlyUninstalling.push(addon.id)
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/addons/*/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/addons/*/*', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -157,7 +157,7 @@ export default {
|
|||
})
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/items/*/added,smarthome/items/*/removed,smarthome/items/*/updated', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/items/*/added,openhab/items/*/removed,openhab/items/*/updated', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -303,7 +303,7 @@ export default {
|
|||
// this.newItemParent = null
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/items/*/added,smarthome/items/*/updated,smarthome/items/*/removed', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/items/*/added,openhab/items/*/updated,openhab/items/*/removed', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -389,7 +389,7 @@ export default {
|
|||
})
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/rules/' + this.ruleId + '/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/rules/' + this.ruleId + '/*', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -161,7 +161,7 @@ export default {
|
|||
})
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/rules/*/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/rules/*/*', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -173,7 +173,7 @@ export default {
|
|||
})
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/rules/*/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/rules/*/*', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[3]) {
|
||||
|
|
|
@ -171,7 +171,7 @@ export default {
|
|||
this.startEventSource()
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/inbox/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/inbox/*', null, (event) => {
|
||||
console.log(event)
|
||||
// const topicParts = event.topic.split('/')
|
||||
this.load()
|
||||
|
|
|
@ -499,7 +499,7 @@ export default {
|
|||
},
|
||||
startEventSource () {
|
||||
if (this.eventSource) this.stopEventSource()
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/things/*/*,smarthome/links/*/*' /* + encodeURIComponent(this.thingId) */, null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/things/*/*,openhab/links/*/*' /* + encodeURIComponent(this.thingId) */, null, (event) => {
|
||||
// console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
switch (topicParts[1]) {
|
||||
|
|
|
@ -156,7 +156,7 @@ export default {
|
|||
})
|
||||
},
|
||||
startEventSource () {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=smarthome/things/*/added,smarthome/things/*/removed,smarthome/things/*/updated,smarthome/things/*/status,smarthome/inbox/*', null, (event) => {
|
||||
this.eventSource = this.$oh.sse.connect('/rest/events?topics=openhab/things/*/added,openhab/things/*/removed,openhab/things/*/updated,openhab/things/*/status,openhab/inbox/*', null, (event) => {
|
||||
console.log(event)
|
||||
const topicParts = event.topic.split('/')
|
||||
if (topicParts[2] === 'inbox') {
|
||||
|
|
Loading…
Reference in New Issue