I’ve started working on something which I had thought of ever I’ve put a openHAB (3) tablet on the wall:
a SIP client integration.
Mainly for my SIP based door intercom, to be able to see who is there, answer and open the door without the need to switch to another app on the tablet.
Actually, I thought this is highly complex. But it turned out to be relatively easy and is already fairly working. Here is what I did and how it works:
To use it, you simply put it on the main page that is usually shown on your tablet. Currently it shows a door icon and a dot indicating the SIP status (red=disconnected, orange=connected but unregistered, green=registered).
When a call comes in, a (fullscreen) popup is opened showing an image - which is meant to be a “live” mjpeg image from the front door - and the tablet rings. After accepting the “call” you can send a DTMF sequence to open the door lock.
See some screenshots below.
Great to see someone playing with this. Check out this github request here as it should be possible and it may be what you have already have working, to use a widget to side load a webRTC connection to play a RTSP stream.
I noticed if you use oh-webframe instead of oh-image to show camera’s mjpeg stream then the connection closes if you set url to "". When using oh-image the connection stays open even the src is set to "".
Maybe this helps a little bit.
I am no developer and started looking for an intercom solution. If you finished that widget that would be fantastic!
So, I extended and finished the first version of this SIP widget.
It can now be used as intercom (i.e. outgoing calls).
I think I found a neat way to solve this: To set the individual credentials for a device you just long-touch the widget on that device and it will open a configuration popup, whose values will be saved to local browser storage (I (ab)used the WidgetConfigPopup for this). Since F7 doesn’t cover this for long mouse presses, the same popup will be shown when you click the widget in edit mode.
The local config also allows you to individually define call destinations for up to 4 (quick) dial buttons
I was able to fix this by using F7’s pageBeforeOut event, instead of Vue’s lifecycle hooks.
“announcement” mode: make announcement to another or all stations (technically an auto-answer on the announcement clients). Could be used to speak to other rooms or floors, e.g. to announce “lunch is ready!”
I think it’s ready in its first version, so I’ll open a pull request soon.
your work here made it much easier for me to get a starting point.
My PR includes a much more general SIP Client component and card widget, that is just for phoning with one number and no intercom functionality between multiple openHAB clients.
I already got @digitaldan at the PR for some testing, but would be great if you could also review.
You might have mixed up something:
When you run npm install (without any arguments), all modules will get installed as recorded in the package-lock.json file. This is required whenever the modules change and is safe to run. It’s actually THE mechanism to ensure everybody has the very same module tree installed.
It’s much different from npm update [<package>], which either updates the provided package including(!) its dependencies if required, or all packages. After this your modules will have different versions and your setup might become broken.
How to setup Asterisk for WebRTC and how to troubleshoot the connection? Installed and enabled WebRTC in Asterisk, enabled WebRTC in browser, both Openhab and Asterisk tell me that calls not supported in browser.
First of all, many thanks to everyone involved for this great extension!
I just have one request, could someone redesign the widget ?
It’s not nice to have to drag the widget big enough to see something when the video is activated
It would be better to keep the widget simple and small (only the status symbol of the handset), only after answering the call should a popup pop up with the actual video, with the option to end the call or open the door via dtmf.
I’ve already opened an issue that clarifies the design issue