How SmartNSF came to rescue in a heavily surveilled little (bird) house

Tags: : Lotus Domino SmartNSF

One small hobby project of mine is a birdbox with an wifi enabled IP Camera. Much more fun to watch those small house sparrows build their nest and see how hard they work to bring up new kiddo-birds Smile


The images from the web camera surfaces on an web page, and everything worked fine last year.


However, firing up the camera this year, nothing showed up! After a quick look at the Chrome console, I quickly realized that the old and trusty IFRAME no longer worked as it used to. First and foremost I have enabled SSL on the site (with Let's Encrypt, using Windows ACME Simple (WACS), I'll create a blog post on that too in the near future) and it turns out that HTTPS won't allow IFRAMEs to use HTTP-based content at all. The concept is called "Mixed Active Content", read more about that here if interested. The built in web server on the web camera can't use anything else but plain old http …

While there probably are many other solutions to this challenge (feel free to chime in if you know!), this article describes how I used SmartNSF to call a small java-class, wrapping the whole HTTP-call nice and easy. A side effect was that I also could hide the inner workings of the IP camera completely! No more user name and password exposed in HTML Smile.

If you don't know SmartNSF, it is very briefly an extension to both your Domino server and to your Designer client, enabling you to create powerful REST Services supporting full CRUD in minutes! While you of course can do much of the same with the built-in Domino Access Services (DAS), you have much better control with SmartNSF. In my opinion, one of the most important things to happen with Notes/Domino in years.

Read more to see how I enabled SmartNSF to solve this challenge!



How to redirect an URL in Domino and break the Domino-server's attempt to append any URL-parameter like "?OpenDocument" to the target URL!!

Tags: : Configuration Lotus Domino
This is a story of something that I anticipated should take 5 minutes to fix. It turned out to take a couple of hours instead!

Very briefly - using the redirect web site rules, Domino will transfer any URL parameters (like ?OpenDocument, ?OpenForm etc) from the source URL-pattern to the target URL. If the target URL doesn't like OpenDocument very well, this ends up in an "HTTP Web Server: Invalid URL Exception". This article describes how I struggled worked to break this behaviour!

A picture named M2


The quest to avoid SMTP Hacking and "Authentication Failed" on Domino-server continues

Tags: : Lotus Domino Configuration

Update Nov, 11th, 2017: If your are using the sample database, you need a configuration first. Go to the configuration-view and press the "Configuration" button to create one.


This blog-post is about a combination of my own agent creating an IP-address list and a product named "IP Blocker". The combination automatically pumps bad IP addresses from Domino log to IP Blocker – and gone are the bad IP address.

Even though I have some sort of control on the numerous SMTP hacking attempts happening every day, I still feel uncomfortable just seeing that they keep on pounding my server. What do I mean?

The log gets lots of messages like this;

07.11.2017 05:00:06   SMTP Server: Authentication failed for user stevens ; connecting host

Back in March 2017 I wrote the blog-post Finally I managed to stop the SMTP hacking, generating tons of "SMTP Server: Authentication failed for user ..."-messages. Back then I was using the Windows Firewall to trap the bad IP addresses, and that worked. Every IP address registered was effectively blocked from ever reaching my server. The down-side was to keep up with all the new IP addresses, and somewhat cumbersome user interface to register IP addresses. My blog post goes into detail how that was done.

A reader named David Brown commented on the blog-post and referred to his blog-post Disable SMTP-AUTH To Stop Relay Hackers In Their Tracks, which suggested the somewhat strange tip to turn off the SMTP Authentication server in order to actually automatically fence out the bad IP addresses.

Here the other day I came across another Windows tool named IP Blocker from BeeThink-software. It looks a little outdated, but it turned out to be quite powerful! Below you see it in action on my Windows machine;


All the red dots are blocked addresses! What was the most important selling point to me was the ability to automatically load IP-address lists.

What if I created an agent retrieving all the "Authentication Failed" messages, extracting the IP addresses and automatically created an IP-address list file to IP Blockere to read?

Read on to meet "Authentication Failed Extractor" database Smile



Wow! SmartNSF (BETA-5) can now call java directly, and work with the parameters with ease!

Tags: : Lotus Domino Java SmartNSF

This evening it was time to test the latest and greatest version of SmartNSF – BETA 5. When you have installed it (via an updatesite database for the server) and via a local update site in your Designer, you get some cool new features. First of all, intellisense seems to work very good so now it is much easier to get the available methods etc.

But, the really cool feature in this version is the support for CUSTOM strategies. This means that you can define a route like this (the example below is directly from the discussion.nsf sample database enclosed in the SmartNSF zip);


The URI infos will call the Info-class in the package org.opennrf.smartnsf. This means that an URL like  http://www.vcode.no/test/discussion.nsf/xsp/.xrest/infos (note; URL is shown just for illustration purposes, and is not active) will call the java code shown below;


(Click on image to enlarge)



What!!! Notes 10 is coming 2018!

Tags: : Lotus Notes

What a fantastic twist!! While IBM has done a fairly good job with Domino over the years, the Notes client has been left somewhat in the void. But head over to this announcement and see for yourself!


Bark-bark!! The LotusScript CWebContentConsumer now support REST Service POSTs with files++

Tags: : LotusScript Java

A couple of days ago I wrote the blog-post Teach the old dog some new tricks: Let LotusScript consume REST Services the easy way. I thank you all for the good feedback! Nice to see that some old school, classic Notes development, still got some traction Smile

Well, I was in the spirit to add some features today too!

First and foremost you now have the ability to add a payload to the PostJson, PostXML and PostHTML. By payload I mean a text string of any kind, but typically a JSON or XML. In a way you can think of it as a way of uploading a file or text together with other request headers or URL parameters.

This means that code like this;


… results in this;


Note that the payload isn't tagged a a proper multipart MIME or anything, but perhaps you can add that yourself with a combination of the new support methods for base64 encoding and decoding? You now have these additional methods;

  • EncodeStringAsBase64. Encode a string as base64. Build your own multipart XML or MIME structure, and combine that with one or more AddRequestHeaders? Or stuff the base64-encoded string as a payload directly with SetPayload.
  • EncodeFileAsBase64. Encode a whole file as base64. Remember that this hasn't been tested on huge files or anything Smile
  • DecodeBase64String. Decode a base64-encoded string back to it's textual form.
  • DecodeBase64StringToFile. Finally decode a base64-encoded string directly into a file on your disk.

I also added DownloadFileFromURL which can download any file from the specified URL and store it on disk as a file.

The demo-agents in the downloadable sample-database has been updated to use SetPayload, and the other methods are now demoed in a third agent with the name "Test Support Methods".

Happy coding!


Teach the old dog some new tricks: Let LotusScript consume REST Services the easy way

Tags: : LotusScript Java

This article shows you how to consume REST Services in LotusScript like this:


You can both GET and POST with the classes.

Behind the scenes this is accomplished with two script libraries. One back-end worker class made with Java (class:CWebContentConsumerJava) which does all the heavy lifting, and a LotusScript wrapper class (class:CWebContentConsumer) which uses the LotusScript-to-Java bridge LS2J to interface the back-end java directly.

Click on “Read more” to read the details.



Unexpected results reading a plain text file with NotesStream in LotusScript (or when strings contain MORE than meet the eye)

Tags: : LotusScript

This is a little LotusScript experiment with a plain text file and a LotusScript agent using NotesStream. After reading the text from the file I try to use the string to locate a document with a corresponding key in a NotesView. While everything looks fine in the debugger, something is not correct and the lookups fail. This article has some suggestions for solutions at the end but they are not state-of-the-art! Perhaps you know other ways?

First off, I have a super-simple plain text file with a single number in it;


Then I have a super-simple LotusScript agent reading this text file, and trying to locate a Notes document with the same number from a NotesView.


The documents have all their numbers stored as text, like this;


Why stored as text? Because this is how I found the (to me) abnormality in the first place Smile And why NotesStream? Because code with the concept herein also runs on an iSeries, where it works fine …

The LotusScript-code looks like this;


The code uses a NotesView (1) and a NotesStream (2) to open the file and read out the contents with the ReadText-method (3). Finally the code tries to locate the document in the NotesView first by a hardcoded key (4), and then by the value retrieved via NotesStream (5). In a moment you will see how the first works and the second not.



Is Bluetooth degrading?

Tags: : Thoughts


Being a programmer I know how hard it can be to get software right. Sometimes it never “get right” and the software have to soar in the flux between working and not working.

I my case I have an Apple iPhone 6S, connected to several Bluetooth devices such as a Garmin 235 watch, a couple of cars and a couple of headsets.

Over the years I experience that the Bluetooth connections have more and more problems. For example I can see that my Garmin 235 watch suddenly has a severe battery problem if it looses the connection the phone. In fact it can drain an ordinary 7-10-day battery life in just some hours, if it looses Bluetooth. Other symptoms are like “hey, shouldn’t the phone be connected with my car now?” or “Ooops, there died the sound in the headset”. Often the solution is to turn off the Bluetooth on my phone, turn off the other device, and then restart everything again. Then everything may work fine … for a while!

Who is to blame? Very difficult to say! It can be a hardware, software or both problem – on both sides of the communication chain! Every Bluetooth enabled device have a physical Bluetooth-radio. The radio have some features that often can be controlled by it’s software, the Bluetooth-driver. Read more about Bluetooth-basics here if you are interested. The quality and reliability of both the radio and the software can of course greatly vary. In other words, you can have crappy hardware with shitty software alongside, and the result is a crappy Bluetooth device. Vise versa you can have top-notch radio with brilliant software, and of course you can have anything in the middle.

Then you want to fix your Bluetooth-problem and start to search the net. Hundreds of pages from forums and blogs suggest all kinds of solutions. All from “install this” and “upgrade that” to “reinstall” etc etc. Of course it is often very difficult to see if you have the exact same problem, and thus if the fixes will actually work for you. Often you end up trying out some of them, and sometimes it works, and sometimes it doesn’t. Perhaps you after a while experience SBM – or “Solved By Magic”? SBM happens when you have done lots of changes, and suddenly things seem to work, but you have no idea which of the tricks that actually nailed it! Believe me, over the years I have probably used hundreds of hours trying to fix hardware- and software problems.

The challenge is – for a layman: Does anybody know of a way to debug your Bluetooth-devices? Just being able to tell which of the components that is the cuprit would be great! I wish there was some kind of “Reference Bluetooth Checker” somewhere. Something that you could connect your device to. After a while, the checker could say how well the device has implemented Bluetooth or not. What if there was Bluetooth “middleman” radio that intercepted Bluetooth-communication between a communication chain, and analyzed the quality and reliability? By the way - I found the company NTS on the net, offering their Bluetooth Testing services. Seems to be a marked for such testing then.

Like it is now, Bluetooth is taking on more and more devices and it is becoming more and more important as a connection-protocol. Unfortunately its performace and reliability is sadly – in my view – degrading.


ISBG Spring Seminar Success!

Tags: : Thoughts


ISBG (The Norwegian IBM Software User Group) has just finished it’s 19th Spring Seminar (“Vår seminar”) in Oslo, Norway. For two, intense days, the 50+ attendees has witnessed 15 top-notch sessions. The conference were staged in the offices of PwC in Oslo, very close to the main railway station, and just two blocks away from the hotel. In other words, pretty easy to get to the conference.



How a recent Windows 10 update shoots itself in the foot with IPv6 :-)

Tags: : Thoughts

In the start of May 2017, one family-member suddenly experienced “No internet, secured” message hovering over the network icon down in the tray icon area. Sure enough, her machine wasn’t visible on my TeamViewer control panel either, so she was definitely off the grid. Why did her Windows 10 machine suddenly decide to drop network connection?

As always, I start to search the net for similar cases, and as always, tons of different results pop up. All sorts of suggestions too, with some of them pretty lame (“download this and that”, buy hey, we don’t have network access in the first place Smile). Well, searching the net and reading tons of answers, and then trying them out, is just the modus operandi in problem-solving.

The quick answer in our case was that Windows suddenly decide to favor the new address-regime in internet (the IPv6) over the old one (IPv4), and along the way, obviously introduce some errors! In our case we have an old router (DLINK 652) which knows nada about IPv6, and the result was that Windows 10 tries to connect/discover/communicate with some protocol that doesn’t exist on the other side of the line. The end-result is that Windows effectivly shoots itself in the foot, and can’t connect or communicate anymore!

Read more to see the details



Engaged at Engage 2017 in Antwerpen, Belgium!

Tags: : Thoughts

Over the years I have attended many Lotuspheres and the latter IBM Connects. What I really enjoyed in the first Lotuspheres, were the intense depth of some of the sessions. Remember C API sessions with difficulty settings? Tree dots meant the real deal! Well, those days are over and generally Lotusphere has become more and more a marketing event. Not necessarily a bad thing, but not the same as “back then” Smile

Over the last years I have seen that the Belgium Engage-conference has gotten more and more coverage, and this year I finally got a change to participate for the first time!

Off we went to Antwerpen! Traveling in Netherlands and Belgium is  literally a breeze with the superfast TGV-train! Within an hour you have traveled from the Schiphol-airport in Amsterdam to Antwerpen, Belgium. 300 km/h!



How to get XPages and Bootstrap3_xxx themes to work (or how to check that XPages is correctly installed)?

Tags: : Lotus Notes Xpages Question

Warning – Not that experienced XPages programmer here Smile 

I have been fiddling around with the Single Page Application control in XPages, but I never got it to work properly with the Bootstrap3, or Bootstrap3_flat themes. In fact it only worked with OneUI before FP8. I supect that I have some issue with XPages on the server.

Below you see a screen shot of the result in Chrome;


My question is therefore – Does anybody know how to check if XPages is is properly installed on the server? I search around and find some details, but a lot of the information seems somewhat old (2014’ish), and the nomenclature seems different now and pretty fragmented. I guess I am also a little confused about what features that still needs ExtLib and what has been moved to the core product with FP8.



Note to self; "Unable to find valid target platform" means "hey, install the core product first" when installing the Notes client

Tags: : Lotus Notes

Unfortunately I managed to completely wreck my Notes client install and and thus I had to reinstall it from scratch.

To be completely sure that there wasn’t any remains left from the old installation, I ran the “Notes Install Cleanup Executable” (NICE) tool found here. So far so good, and Notes vanished from my computer.

Perhaps it has been too long since I had to install Notes from scratch, so my first attempt was to just fire up the latest and greatest Notes FP8 client installer named notes901FP8_win.exe. After unpacking,  the installer complained about “Unable to find valid target platform”;


- What?!? “Target platform”, does that mean my OS or what?

A quick search on the net quickly pointed me in the direction of  IBM’s own “Unable To Find Valid Target Platform" When Installing Notes, Due To a Suspended Installation. Perhaps being baffled about the message in the first place, and somewhat afraid of that the Notes installer perhaps was outdated on Windows 10 (see what a that talk about a dying Notes client can lead too Smile), my speedreading just saw a bunch of Registry tweaks …

So, after reading it again I finally saw “Usually this error occurs when the user attempts to install a Notes Fix Pack over a nonexistent base version”…. And suddenly my brain remembered that I should install core product first before upgrading to the latest fix pack.

After installing the DOMINO_DESI_ADM901_32_BIT_WIN_EN.exe and then installing notes901FP8_win.exe, everything was back on track Smile


[SOLVED] - Post FP8 install - Does anybody know where the Xpages "Mobile" controls palette has gone?

Tags: : Lotus Notes Xpages

Update March 16th, 2017: Maire Kehoe (one of the lead developers on the XPages team as far as I remember) posted an answer on this blog and that was “The Mobile controls no longer appear in the palette by default. To re-add them, go to the menu File, Preferences, Domino Designer, XPages, Palette Check the check-box beside: Mobile and click OK.”. There it was;


Thanks Maire!

Original post follows;

After installing the latest and greatest FP8, I realized that the Extension Library shifted a lot of components from ExtLibX into the ExtLib.

One thing I can’t seem to find any more is the “Mobile controls” – which contained the “Single Page Application” wizard amongst other things.

Does anybody know the whereabouts of the Mobile controls in the post-FP8 world?



Ahhh, feels good to have FP8 (and iNotes working again) in place!

Tags: : Lotus Domino


For some reason the client installer would’t run smoothly unless I killed NSD first (had this problem back with FP5 too). Well, with NSD out of the way, the new version installed without hickups.

On the server, everything went smooth! Took a while longer (approx 15-20 minutes) compared to other updates, but that doesn’t matter as long as the install works!

And, finally the iNotes client worked again!


Finally I managed to stop the SMTP hacking, generating tons of "SMTP Server: Authentication failed for user ..."-messages

Tags: : Lotus Domino Configuration Spam

Have you ever seen a bunch of these in your Domino log-database?


If so, you are the victim of attempted SMTP Hacking. It means that someone is trying to log on to your server via the SMTP protocol. SMTP was primarily constructed for functionality and not so much security Smile

Unnecessarily to say, it is a waste of cycles to have all this traffic hit your server, not to mention what could happen if they ever succeed entering the system! Obviously the perpetrators uses some sort of directory attack trying out both known and valid mail addresses, in addition to all sorts of other names.

Read on to see how I finally was able to stop specified IPs from even reaching the Domino server (hint, the Windows Firewall comes to rescue!)

Update March 7th, 2017: David Brown over at his site https://port1352.wordpress.com (love the port1352-name!) took the time to chime in and tipsed me about his blog-post Disable SMTP-AUTH To Stop Relay Hackers In Their Tracks . I had actually seen this post too, but I could not get my head around that it would could actually be better to turn off SMTP-authentication in order to have better security. I asked a question on his post, and he posted a thorough answer to why this might be a good idea here. Thanks David for taking your time to answer this question!



How to quickly get a nice looking month-calendar together with SmartNSF

Tags: : After Hours Lotus Notes

Update Feb 28th, 2017: It turns out that Klaus Bild and Christian Güdemann had a presentation at IBM Connect 2017 diving into SmartNSF. I recommend you to head over to see the slides from the session DEV-1478 – Your App Deserves More – The Art of App Modernization for even more details!


Have you ever wanted to get a nice looking month-calendar based on your Domino data? Sure you have! Perhaps something like this;


This is my short take on how to use the fullcalendar.io javascript event calendar together with the fresh SmartNSF-tool from Christian Güdemann on OpenNTF.

Here you see the end-result (go to June to see some data if interested).



How to setup Gmail's smtp.gmail.com as the outgoing mail server on both Domino and on iOS

Tags: : After Hours Lotus Domino Configuration
One of the fun things with software, and perhaps especially server software, is that there is lots of ways to get things done. Sometimes you just drown in settings, configurations and restarts. Suddenly things start to work, and you really don't know exactlywhat fixed the problem! This is a story along those lanes, and I write about primarily to remember the steps for later for my own part. Perhaps it can be beneficiary to others too.
From having my own Domino server and using it for both incoming- and outgoing mail, things has transformed over the years to only handle incoming mail, and relaying outgoing mail to other SMTP-servers. In my case it has been the Telenor server "smtp.online.no" for many years. Up til now I have been very satisfied with Telenor and smtp.online.no too. If you are interested, you can read more about the history of my server at the end of this article.
The Problem

However, in January 2017 something happened on the the Telenor-side, and suddenly their SMTP-server wouldn't accept relayed mail from my server anymore.
Sending mail from my Domino server quickly resulted in the following log-entry, along with a non-delivery report sent back to the sender
06.02.2017 23:06:48   Router: Message 00796504 NOT transferred via SMTP to SMTP.ONLINE.NO for some.recipient@somewhere.com 553 5.3.0 <some.recipient@somewhere.com>... We do not relay from
If I tried to send from my iPhone or iPad, which also had the smtp.online.no as outgoing mail server, I received this;
A picture named M2
The above is in Norwegian, and says; “Cannot Send Mail – A copy has been placed in your Outbox. The Recipient {name} was rejected by the server.”
I have now been in touch with the support-departments for both Canal Digital and Telenor, and to make a long story very short; Hopelessly problematic to get any sensible answers at all!!!

First Canal Digital: From filing a support-request via their own support-pages, I didn't get any answer at all. First when I posted on their Facebook-page, they answered instantly!
So, note-to-self, don't bother to write anything in support forms or send email, that won't be answered anyway. Only use channels that obviously hurt a little if requests stay unanswered. That must feel like the other side of the coin for Canal Digital…
The answer to my problem? Canal Digital just points to Telenor and basically says "it's their fault, we do nothing with mail".
Ok, over to Telenor, and a very similar story unveils with them. Sensible enough they don't have a Facebook page where customers can rant (they have learnt the lesson that Canal Digital is learning …) However, after registering a couple of cases, were the latter pointed to a huge document with very detailed information about the problem, I finally got an answer today;
We don't do e-mail support at all via e-mail ….

….. Ha ha ha, are you kidding me?!?! No e-mail support via e-mail ?!?!? (choke choke …)
However, they points me to Telenoreksperten, a call-center charging you no less than approximately USD 3 per minute. I guess this is no other logic than if your washing machine breaks down. Nobody will even touch your washer if you don't stuff their deep pockets full of money ….



Classic LotusScript: When 100.0 isn't 100.0 anymore?!

Tags: : LotusScript

Today I had to debug some old code, and when doing so I stumbled over something which I found strange.

LotusScript would not consider the value 100 equal to the value 100 … Let me explain with some simple code (you can click on every image to get a larger one by the way);


I put the above code in a test-agent.

Marked by 1, I set my reference value to the value 100 (and yes, by purpose I don’t use the forced floating point notation 100.0)

Marked by 2, I fill my array of 12 doubles with 1/12 of 100 each.

Marked by 3, I compare the two variables dblOneHundred and dblHundred.

Below you see how the array look in the Designer’s Debugger;


As you see LotusScript does a nice job of converting my division (100/12) and storing it as a doubles. For each time I fill in an element in the array, I accumulate the values in the variable dblHundred. Again LotusScript seems to do this nicely. Below you see what it looks like after I have run the loop 11 times;


… and when the array is completely filled, the Debugger shows that the variable dblHundred has the accumulated value of 100. Below you see the code just before the comparison line marked by 1 is executed;


As we see in the debugger, both values are shown as 100 in the debugger, and I would believe that the comparison would be true. But no


If you want to see more, both on my take for an explanation, the workarounds including code to try out, please continue to read below.