Excellent presentation of Kai at jPrime conference: Recording somewhere?

@Kai: Excellent presentation in Sofia! Many thanks for it.

If there’s recording somewhere, it would be very helpful for users starting in openHAB 2.0 or going to migrate to it. If you can, please provide a link to the recording.

Btw.: Never seen a software presentation at a conference where a hair dryer was deployed :wink:

-curlyel

Thanks for watching!

The recording will be available within the next 10 days - the conference organizers need to do some postprocessing before uploading them.

Many of the stuff is rather new and I urgently need to document it - so I hope that besides the video recording, I will be soon able to write some documentation for beginners about it.

Thanks for all your efforts! Can you please ping the list when its available?

Sure, here we go: https://youtu.be/hPX4wAxsbxA?list=PLcqA4DRMgIYsatRfZlIMGidBLJQpTtbGK

1 Like

Great presentation @Kai!!!
I was applauding at certain points even though the crowd was dead quiet :slight_smile:

1 Like

Right? When you connected a 1200w hair dryer to a zwave plug and made a lightbulb change color to match the amount of power drawn … from a rule you created 30 seconds before, I started clapping too!

This presentation explains well why OpenHAB is a central player on my home automation server.
Version 1.7 has been completely stable for me. Embedded software is expected to live a long time. When was the last time you had to upgrade the software controlling your microwave for instance?
In my opinion, home automation software should be just as invisible to the end user.

My first home automation software was Mister House. It was written in Perl by an IBMer as a hobby project. I remember running it on an Intel 386 box in 2001 or so. Many fun hours with X-10 devices in that era. Coming from the US, it is fitting that IBM recently chose Germany as their headquarters for their IoT initiative.

MQTT for Arduino class embedded controllers was ported by another IBMer. The same developer has authored Node-Red.

Kai and Eclipse, Nick and IBM. Certainly creators of two of the technologies that I am happy to use for my personal home automation and intranet of things applications.

It is a short jump these days for OpenHAB to have access to the IBM Watson cognitive computing platform. OpenHAB, MQTT, cheap connectivity, Node-Red, IBM Watson. The future of home automation looks more interesting all the time.

@Kai Great presentation. I clapped regarding the Intranet of Things… I don’t want 1000 different cloud services either!!

Couple of questions…

  1. What was the doorbell button you used for the demo?
  2. How do I get to see the “rules” section in Paper UI… im running a very recent online-build of OH2 but don’t see that.Do I need specific devices ( hue/sonos )?

Cheers,
Greg

  1. That was a Flic. Hooked up to my smartphone, which then sent HTTP requests to openHAB.
  2. See here.

Regards,
Kai

I noticed the Flic a long while back but it turned me off that it’s bluetooth so has to work with a phone. With the Rpi3 having bluetooth have you wondered if the need for a phone could be removed from the situation?

@chris already did a tremendous amount of work on a BLE binding - once we have that merged and working, I would hope to see the Flic being supported directly without the need of a smartphone inbetween.

1 Like

Nice demo. I especially liked the hair blower trick. :slight_smile:

@kai Do you have/know of of a working example how to play a notification to a Sonos device?

I’m trying to find the proper syntax for the URI for the notificationsound channel.

EDIT: more explicitly: where in my openHAB folder should I put the .mp3 file to have it opened through the Jetty server. I have already tried (without success)

(I could add that to the examples in the OH2 docs for the binding)

@Kai how did you create the rule template for the color coded energy monitor rule? I’ve yet to come across screen functionality for doing so, nor clear documentation on how to create a rule template using the REST API.

All, just an important DISCLAIMER:
I presented this demo at two Java/Eclipse developer conferences - so what I showed is not stuff that is ready for the average openHAB user yet, but rather the current state of work in progress. The intention of those presentations is to get people interested in it and to find developers joining the efforts - so see it as an invitation to get involved in the developments (which is primarily at Eclipse SmartHome and not here in the openHAB forum).

Now let me try to briefly answer the questions above:

There indeed currently is not good place for the mp3s. But the whole audio framework is currently re-designed and once this is there, the Sonos binding will be adapted as well. And we should have an AudioSource that serves mp3 files directly from the files ystem.

It isn’t possible to add templates through the REST API, but you can import them from the file system through console commands. Here is the template that I used:

[  
   {  
      "uid":"demo:energymeter",
      "label":"Energy Meter",
      "description":"Visualizes the current energy consumption.",
      "configDescriptions":[  
         {  
            "name":"consumption",
            "type":"TEXT",
            "context":"item",
            "label":"Consumption Item",
            "description":"Data source for current consumption",
            "required":true
         },
         {  
            "name":"light",
            "type":"TEXT",
            "context":"item",
            "label":"Color Item",
            "description":"Color light to use for visualisation",
            "required":true
         },
         {  
            "name":"max",
            "type":"INTEGER",
            "label":"Max. consumption",
            "description":"Maximum value (in W) for red light",
            "required":true,
            "defaultValue":1500
         }
      ],
  "triggers": [
    {
      "id": "trigger",
      "label": "Current consumption changes",
      "description": "Triggers whenever the current consumption changes its value",
      "configuration": {
        "itemName": "$consumption"
      },
      "type": "ItemStateChangeTrigger"
    }
  ],
  "conditions": [],
  "actions": [
    {
      "inputs": {},
      "id": "setcolor",
      "label": "Change the light color",
      "description": "Sets the color to a value in the range from green (low consumption) to red (high consumption)",
      "configuration": {
        "type": "application/javascript",
        "script": "var power = trigger.event.getItemState().toString()\nvar percent = power / (${max} / 100) \nif(percent < 0) percent = 0\nvar hue = 120 - percent\nevents.sendCommand('${light}', hue +',100,100')"
      },
      "type": "ScriptAction"
    }
  ]
  }
]

(On how to activate the new rule engine/editor at all, see here)

Regards,
Kai

While waiting, I discovered you can host static file from the conf/html folder:

That will do for now. :slight_smile:

hi, I am really interested in using these custom javascripts to add dynamic rules. Two things that are slowing me down to getting started is:
1.) What types of API’s are available here? is that listed somewhere (code reference in github would also be ok)
2.) Whats the expected way to get debugging Information out of the rule engine?
3.) It would be nice to have a way in the paper UI to upload a new script instead of having to use the console.

Of course I don’t expect you can just do this today … if I had an idea where to start, I could think about bringing this further.

@Ash84, I’d suggest you ask your questions in the Eclipse Forum as this is the place where the developers of the rule engine will read as well.
Also feel free to post new ideas, bug reports and feature requests on Github at https://github.com/eclipse/smarthome/issues.

eclipse forum just spins and does not load (same result from home and here - berlin). Will try follow up on github. I guess the source there should reveal some clues?