Use "openhab" event topic prefix (#304)

Signed-off-by: Wouter Born <github@maindrain.net>
pull/305/head
Wouter Born 2020-08-11 21:16:56 +02:00 committed by GitHub
parent 7ca5d1fcc0
commit 60e6c78b5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 24 additions and 42 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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;

View File

@ -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]) {

View File

@ -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]) {

View File

@ -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]) {

View File

@ -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]) {

View File

@ -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]) {

View File

@ -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]) {

View File

@ -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]) {

View File

@ -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()

View File

@ -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]) {

View File

@ -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') {