I think I have finally found the solution. To run a python script through a shell command in a virtual environment, you need to specify the full path to your python.
I have modified my shell_command to this (including redirecting output):
P1 ports send data every 10 or 1 seconds, depending on the DSMR version that it adheres to. P4 only sends gas each hour, true, but this is also done via the ‘P4’ port, which is something entirely different from the P1 port.
I’m assuming he meant he can see usage, but not what his PV installation generated: these are probably subtracted from each other by a system somewhere in the chain, the meter should give these two numbers separately in its P1 telegram.
Thnx all for your supplies. I noticed already something
I only had the sensor power consumption and overlooked power production as a sensor. Now i see when my sunpanels are collecting and i they are producing too much, power production is the one i had to look at. When we are consuming, power consumptions number is shown. So that part i figured out.
Hourly Gas i already saw and i am fine with that. The question came because in domoticz is was almost real time.
Remains my question about history. What are you mening with HA recorder (Home Assistant Recorder?) to external db? And can i put those metrics in Home Assistant again?
HA has a recorder module which stores metrics to a database which can later be viewed in HA again when history is also enabled (https://home-assistant.io/components/recorder/). There are also external metric databases that cannot be read by HA again but provide better integration with other tools, I would look at influxdb+grafana which is a really nice combination.
@DatBassie I don’t know about the P4 port, but I don’t think it is accessible for consumers. Otherwise if we can we should add support to the dsmr_parser project which in turn allows this component to use it.
Having solar power reduces the usefulness of the DSMR consumption metric. What is possible is if you also measure your solar output with HA to calculate the power usage using a template sensor, for example:
The snippet above produces two values, one for the amount of power from the solar panels that is used by devices in the house and one for the total power (solar + net) that is used by devices in the house (netto_verbruik). The last one would be the value of power used like if you had no solar panels, only net.
question about your sensor example.
When i read your instruction i see you have ‘zonenergie’ sensors. But in my HA i dont have any sensors for my panels. So that said it isnt possible to use this example. Or am i wrong?
As i said, i have Solax-X inverter and it would be nice to implement those into HA, but i cant find any information about integration.
About history, it is already activated just like recorder. At this moment i monitor everything, i tried some include and exclude options but after restart i had no history at all. But you’re saying influxdb+grafana, thus with that you can export your HA db to this for nice graphs?
You need to have some HA component that does collect the solar output value indeed. If it does not have HA integration for your brand consider adding it yourself (nice way to learn programming) or try if it is possible with MQTT. Maybe there is a Solar-X program that can put values onto an MQTT bus which can then be read by HA?
The influx plugin will push all metrics HA receives into an influx database. Then you can read that database and make nice graphs using grafana. Other options are Graphite or OpenTSDB for the database. But influx is simplest I think.
You are correct, P4 is not available to the consumer.
The meter saves and sends this data to the grid operator. A third party (ODA) can then, if given permission, receive this data for further processing. This requires a fairly long and manual process on the user’s end of giving this ODA permission to use that user’s data.
i have influxdb and grafana up and running on my synology through docker. Simple setup and now i have to figure out the data i want to use. So in that case i have a little study
For the solar output. I have not that much time to learn programming due to work, but i will search the internet for some solutions. If you read something, i hope you will share it here
I was quite disappointed when my resolution went from realtime to 30 minutes when they installed my smartmeter. I used to have a light sensor reading the last digit mirror for pulses.
Hello aequitas. I have a litte question about grafana. I can read the power consumption and production and have these as seperated graphs. But what i would like to see
both in 1 graph with colors
combine those two, i mean. For example. i used 10 kwh and deliverd 8, so my today is i used 2
I use P1 port on DSMR4
I am a little bit further already.
i have the two graphs in one graph now with automatically color difference
i have the same in a block graph
i have a table with power consumption and production
now i am searching for a way to combine the table with comsumption and production. So, at this moment i used 10, production is 2 so netto use is 8 kwh at the moment
I think that would be better to ask on Grafana forums as its a little out of scope here. But you can have multiple metrics in one graph. Adding them together is a little harder (with influxdb, graphite does work in this case but can be harder to implement). You can also have HA do the calculations and have it push them as its own metric like I did above. Support for reading Dutch Smart Meter (electricity/gas) (P1 port)
The P1 telegram contains both power and gas data, so you should have that at the same frequency (if you have a smart gas meter, but it seems impossible that you don’t).
If you happen to somehow be using P4 data, that would be really weird!
The telegram does output every 10 seconds indeed and contains the gas data. However… the gas meter only sends it data to the smartmeter every hour or so.
@rmeijs and others, I do also have the ISKRA AM550 (DSMR5) and use P1 wifi gateway from http://www.esp8266thingies.nl/wp/. I use the protocol and controller as described here (Domoticz HTTP). I think I got the P1 wifi gateway working, since I get output when listening to the port using wget.
However, dsmr in HA gives unknown values. I gave dailout permission to homeassistant. The log doesn’t give any clues.
Any tips? What are your settings in HA and P1 wifi gategay?