Beginners Question

Hi all, i am brand new to the OpenHab platform an trying to understand what is needed:

I want to monitor (and analyse / graphics etc) of energy usage in my house and energy production from my solar panels. Meaning:

  1. overall consumption and delivery from/to the grid (can do that through p1 port from my smart energy meter)
  2. power received from the solar panels (need a modbus 3-phase KWH meter for that)
  3. power consumption by my heat pump (need a modbus 3-phase KWH meter for that)
  4. power consumption by my electric car charging unit (need a modbus 3-phase KWH meter for that)

So what do i need:

  1. a ‘server’ to run the openhab software on ? I wan to use my synology NAS for that purpose - or maybe some old windows pc or raspberry
  2. a few modbus (rs485) enabled KWH power meters installed in the circuits

Now my confusion starts – how do i connect the physical stuff to the openhab server (the nas / or maybe a windows pc)

  1. i could use a p1 to usb cable to commect my smart meter to some usb port - but i gues a driver is needed ?
  2. i could use a modbus-usb device to connect modbus/rs485 to usb (and to my server / nas) - but again some driver is neede here i guess

So i guess the right drivers are neeeded so that the data can be used by the open hab software ?? how does that all work out ? and when the data is within the openhab software can you make diagrams of it ? For example to compare consumption with useage , do calculations, aggregate etc etc … and store data items persistently ? And can i configure such use cases without a major programming job ?

Maybe to novice questions ? Especially confused how to connect the things to the software …

Maybe someone has some directions here ? Maybe someone who has a simular use case ?

Many thanks for replies / directions !

  1. Your big problem with Synology is that as of DSM 7.x they no longer support most external hardware. You’ll need an RS485 to USB adapter (or some other sort of adapter) to get these connected to the machine running openHAB.

  2. This is outside my expertise, I’ve not done modbus nor RS485 but know many on this forum have.

  3. If you have an RPi 1 and have a way to connect it to the RS485 ports and have a way to also connect that RPi 1 to your network you could use a serial to IP approach (e.g. socat and ser2net) or write a service that runs on the RPi 1 that publishes the data (e.g. MQTT). There might already be something written on GitHub. I don’t think the RPi 1 support accessor mode (i.e. looks like a USB device when plugged into another computer) and yes, if it does there almost certainly need to be drivers installed on the host machine (which Synology won’t support).

  4. This would probably be much more straight forward, but only if you run OH not on the Synology. Most of the time, these USB devices just work in Linux but if not, the vendor you purchase it from should provide a driver. On Windows/Mac you almost certainly will need a driver from the vendor.

On Linux at least, the device will appear under /dev, probably /dev/ttyUSB0 (or some other number if you’ve more than one device plugged in). Once you see that you are good. Just configure the Modbus binding to use that port and configure it according to the instructions for the binding. On Windows when it’s working it will show up as a COM port. On Mac :person_shrugging:

By default openHAB will save Item states to a round robin database. If you want precise data for long periods of time you’ll want to set up some other datastore (InfluxDB is popular). When the data is in persistence, MainUI can chart it. Lots of people who use InfluxDB will use the third party Grafana tool to do graphing as it’s more capable.

It depends on the data that comes from the device and what calculations and such you want to do with them. Some programming will be required. The amount depends. By default, the states of all Items are saved to persistence.

The Getting Started Tutorial should give you a good basic understanding on how stuff connects to openHAB and how it’s used within openHAB.

Hi rich , thanks ! This is getting pretty complex although nice projects ! I think i will reconsider a point sulition like Iungo or cemm… Thanks reg koen

Try Shelly EM (1-phase) or Shelly 3EM (3-phase). They are not cheap, but they are cheaper than most proprietary smart meters. And they will relieve you from the mess of managing RS485 and modbus. You only need wifi signal nearby.

Managing Shelly’s in OpenHab is something out-of-the-box, there is a specialized binding although some people, such as me, prefer to flash Shelly’s with Tasmota.

Hi, thanks, i would prefer din-rail connected devices. But overall i think setting up what i want with openhab etc will be way to complex for me on short term. Btw modbus enabled KWH meters for din-rail (3 phase) are in simular price range. reg koen

Shelly 3EM has din-rail mountЕM-3-80x80.jpg

ok ., looked more like a wall mounted device to me

this is becoming interesting to me…i must say… interestingly they use ct clamps which makes installation vary easy… looking at the install diagram / docu for the 3EM i see they connect to a ct clamp per phase but also to the phase wire itself ??? i do noy understand why that is ? If i read it well it is seperate powered from just one of the phases …

How much programming would be required on tyhe openhab side to make something nice and usefull ouit of the data ? Or would that shelly cloud platform be a good basis for getting insight ? I want to connect 1) house comsumption, solar panels, heat pump and elc car charging (so i have 4 3-phase data points)

getting very interesing here i must say !

Depends on what you mean by “nice and useful”. It all depends on what information the device provides and what information you want to generate from that raw data.

If you just want to see the four time series on the same chart no programming is required.

If you want to keep track of a min/max over a certain time period as a separate data point, a few lines.

If you want to have openHAB do something in response to what those readings are, a few lines of code (and that’s really what openHAB is designed to do, it’s not an analysis platform, hence the need to code).

If you want to calculate averages and integrals and do trending and stuff like that, again to generate a separate data point, that could be a significant amount of coding.

It all really depends on what you want. Your requirements thus far are to vague to say anything definitive.

If you just need monitoring shelly cloud is enough. But if you want to take decisions based on meter readings then you need OH.

Some people (including myself) have a separate wifi for IoT devices whose firewall blocks access from outside and this forces us to use OpenHab.

Hi, yes agree, i would like to get some insight in what my solar panels provide and what my consumers consume over a longer period of time, this all starts with having the data in lets say one or 5 minute aggegations… combined with some graphics to show it

With the openhab platform i am still somewhat struggling with understanding how the real world (things) are connected to the software platform and how it all talks to each other

In addition to hugos reply … i just need monitoring… so have the data for a few KWH meters in a central loaction and do some analysis on that

Definitely go through the Concepts section of the docs as well as at least the first parts of the Getting Started Tutorial. It should be all clear after reading that and if not we can answer specific questions.

At a super duper level:

Device <--> Binding <--> Thing |- Channel <--> Item
                               |- Channel <--> Item
                               |- Channel <--> Item

Everything in openHAB, persistence, the UIs, rules, etc. work off of Items. The <--> between the Device and the Binding is often hardware or an external network API. Everything else is internal to openHAB. Each Channel represents a single sensor reading or actuator on the device.

Don’t worry. You install the Shelly binding, it will discover the devices (things) for you, and will create their various channels (in case of shellys channels are either status readings or action switches). Then you decide which ones you want to use and create Items for the chosen ones. OH will keep an history of all numeric items and can produce graphs for them. This is out-of-the-box.

As Rich says, for more elaborate help, such as viewing several items in the same graph, or make calculations based on historical data, you need to be more specific.

Hi, things are falling in place – thanks !

Final question - can i consider these shelly devices being a high quality / reliable / robust product ?

I see they will cost me almost 150 euro each (including 3 ct clamps) … i have no problem with that as long as it is a high quality product … what is your opinion on that ?

reg koen

And maybe one other question - what would be the difference between

  1. connection va/vb/vc to each of the different phases (and a/b/c clamps to each individual phase)

compared to

  1. connecting va/vb/vc to just one of the phases (all to the same phase) (and a/b/c clamps to each individual phase)

I have some Shelly 1s (simple relay wired to an existing wall switch) that I’ve been very happy with. They’ve run well for several years now with no problems.

Shelly as a company has been more accommodating and involved with the DIY home automation community than most. They are one of the few I know of that provides local control of the devices instead of forcing you to flash alternative firmware or go through their cloud servers.

I personally would not hesitate to buy Shelly. Other’s may have had different experiences.

I can’t help with the other question.

I have no experience with clamps. I only know they are tricky. They measure flow from left to right (or from right to left) depending on how they are mounted.

In my case I have a Huawei inverter with its “shelly equivalent” meter (it’s mandatory in my country to switch off the inverter when there are power outages) but it also uses clamps. At first the installer put the clamp in reverse order and I was having strange readings (consumption appeared as production and vice versa).

the shelly 3em makes use of clamps …

I reached my max number of replies for a new user on the 1st day …lol … (22) … so many thanks !