IOT tool to send messages to Dweet - https://github.com/apache/openmeetings/issues/102#103
IOT tool to send messages to Dweet - https://github.com/apache/openmeetings/issues/102#103gkrthk wants to merge 7 commits intoapache:masterfrom
Conversation
|
@solomax any thoughts on this ? |
|
Hello @gkrthk, @collisiondetection Unfortunately I had no time (yet) to check this PR (mea culpa) |
|
Ok you can check the dweet / message appearing here https://dweet.io/see from OM whiteboard. |
|
@solomax does it seem ok ? |
solomax
left a comment
There was a problem hiding this comment.
What is the purpose to send messages to Dweet?
I mean why would OM users would like to have this new feature?
openmeetings-web/pom.xml
Outdated
| <jsSourceFile>raw-tool-clipart.js</jsSourceFile> | ||
| <jsSourceFile>raw-wb-board.js</jsSourceFile> | ||
| <jsSourceFile>raw-wb-area.js</jsSourceFile> | ||
| <jsSourceFile>raw-wb-area.js</jsSourceFile> |
There was a problem hiding this comment.
please do not create trailing spaces
openmeetings-web/pom.xml
Outdated
| <jsTargetDir>../generated-sources/main/java/org/apache/openmeetings/web/user/chat</jsTargetDir> | ||
| </configuration> | ||
| </execution> | ||
| </execution> |
There was a problem hiding this comment.
please do not create trailing spaces
| <entry key="zoom.FULL_FIT"><![CDATA[Full-Fit]]></entry> | ||
| <entry key="zoom.PAGE_WIDTH"><![CDATA[Page Width]]></entry> | ||
| <entry key="wb.tool.dweet"><![CDATA[Dweet IOT Messaging]]></entry> | ||
| <entry key="wb.tool.dweet.mything"><![CDATA[MyThing]]></entry> |
There was a problem hiding this comment.
It is not clear what MyThing should mean
There was a problem hiding this comment.
"MyThing " is the term used by Dweet for an object ( fridge, light ) to be controlled.
To make this clearer for the user we could add an example object in the text field: MyThing: ..Light ...........
| , minWidth: 255 | ||
| }); | ||
| tools.find('.om-icon.dweet').click(function(){ | ||
| dweet = OmUtil.tmpl("#wb-dweet"); |
There was a problem hiding this comment.
OmUtil.tmplaccepts new id as second parameter- please use single quotes for strings
| }); | ||
| tools.find('.om-icon.dweet').click(function(){ | ||
| dweet = OmUtil.tmpl("#wb-dweet"); | ||
| dweet[0].id='wb-dweet' + dweetIDCount++; |
There was a problem hiding this comment.
It is no clear why element ID should be different every time user role is changed
There was a problem hiding this comment.
Everytime the user clicks on the dweet button a new dweet popup will be opened. One user can have multiple dweet popup's opened to control different IOT things. So giving each popup a unique id so that on submit can handle the specific popup action.
| tools.find('.om-icon.dweet').click(function(){ | ||
| dweet = OmUtil.tmpl("#wb-dweet"); | ||
| dweet[0].id='wb-dweet' + dweetIDCount++; | ||
| dweet[0].style.bottom = '100px'; |
| dweet[0].id='wb-dweet' + dweetIDCount++; | ||
| dweet[0].style.bottom = '100px'; | ||
| dweet[0].style.position= 'absolute'; | ||
| dweet[0].style[(Settings.isRtl ? 'left' : 'right')] = '100px'; |
There was a problem hiding this comment.
this Settings.isRtl ? 'left' : 'right' code is obsolete
alignment will be changed automatically in case of RTL
| , minWidth: 255 | ||
| }); | ||
| dweet.find('.update-btn').button().click(function() { | ||
| var id = $(this.parentElement.parentElement).attr('id'); |
There was a problem hiding this comment.
please use let or const instead of var
| @@ -1 +1,20 @@ | |||
| /* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */ | |||
| .room-block .sb-wb .wb-block .tools .om-icon.big.dweet::before { | |||
There was a problem hiding this comment.
custom.css is for users
OM CSS should go to correspondent raw-*.css files (most probably to raw-wd.css)
| var request; | ||
|
|
||
| var LAST_THING_NAME = "last-thing.dat"; | ||
| var DWEET_SERVER = "https://dweet.io:443"; |
There was a problem hiding this comment.
I doubt connection to external server will be allowed by CSP
There was a problem hiding this comment.
During our testing on a live site we did not experience any issues with this.
The purpose is to be able to control any object such as an arduino. This will allow students to control robots or doctors to control robot arms. It will allow OM to become an interface to any device that can respond to a dweet. |
|
@solomax If I upgrade this to work with current OM can you merge ? |

This PR contains the WB tool added to send IOT messages to Dweet.
Dweet api integration for send message in wb area.