Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. Smartmeter sensors

Smartmeter sensors

Scheduled Pinned Locked Moved My Project
17 Posts 8 Posters 7.8k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • GertSandersG GertSanders

    @sincze said:

    Domoticx.com P1
    Maybe the problem is that moving to certain pins is not allowed in the altsoftserial library.

    Why is it "alt soft serial", when there is a "soft serial" library. Does the ALT version use interrupts ? Does it need certain comparator pins related to timers of the atmega328p ?

    hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #8

    @GertSanders

    Yes, to almost all of your questions.
    https://www.pjrc.com/teensy/td_libs_AltSoftSerial.html

    sinczeS 1 Reply Last reply
    0
    • hekH hek

      @GertSanders

      Yes, to almost all of your questions.
      https://www.pjrc.com/teensy/td_libs_AltSoftSerial.html

      sinczeS Offline
      sinczeS Offline
      sincze
      MySensors Evangelist
      wrote on last edited by
      #9

      @hek haha you are fast!.

      I would say @GertSanders I read these articles and was convinced altsoftserial it was for the nano.

      https://hackaday.io/project/95-altsoftserial-arduino-library
      http://forum.arduino.cc/index.php?topic=152122.0
      https://www.arduino.cc/en/Reference/SoftwareSerial
      http://hackaday.com/2012/02/13/altsoftserial-looks-to-speed-up-arduino-software-uart/

      1 Reply Last reply
      0
      • JapioJ Japio

        @sincze : Good to see you used my program! :smiley: I also changed some things, I added some sleeps in between the presentation messages, as I got a lot of failures during presentation. And I removed all the timers between sending updates.

        Now, I send the current usage and production on every new update, and the rest only when the timestamp of the gasmeter changes (at the start of every hour) I also commented out sending the timestamp of the gasmeter and main switch.

        sinczeS Offline
        sinczeS Offline
        sincze
        MySensors Evangelist
        wrote on last edited by
        #10

        @Japio can you share your modification with the timers??

        Funny thing as I have solar panels.
        Today I had -1450 Watt on my Smartmeter and the script shows this as 1450 Watt in Domoticz (so positive) :lollipop: Have to look into that this weekend. Maybe I need glasses ;-)

        Don't worry if your version is Mysensors < 2.0.0. I will convert it as I need the 2.0.0+ version anyway.

        1 Reply Last reply
        0
        • JapioJ Offline
          JapioJ Offline
          Japio
          Hardware Contributor
          wrote on last edited by
          #11

          @sincze You can find it on: https://github.com/Japio74/MysSmartmeterGateway

          |t currently already is 2.0.0.

          Enjoy it!

          1 Reply Last reply
          0
          • rwanrooyR Offline
            rwanrooyR Offline
            rwanrooy
            wrote on last edited by
            #12

            I tried to get te script working on a landis gyr e350 connected to an arduino mega. I have inverted the signal and connected it to pin 48 of the mega. The inverted signal shows up correctly if connect it directly to my laptops serial interface so that is working. I read that the DSMR4 protocol uses 115200/8/N/1 in stead of 9600/7/E/1. I cannot get the settings right for AltSoftSerial. Can someone help me modify the script to get the things working?

            1 Reply Last reply
            0
            • JapioJ Offline
              JapioJ Offline
              Japio
              Hardware Contributor
              wrote on last edited by
              #13

              @rwanrooy : I used AltSoftSerial for the smartmeter sensor, because it has only 1 uart for serial communication, which is used for firmware upload/download. That is why I used the software alternative. But if it actually is the arduino MEGA 2560, it has 4 uarts, one for the firmware download (serial 0), but the other 3 are at your service (looking at the documentation, I don't know the details.)

              These hardware ports should better be able to handle the 115200 baud.

              1 Reply Last reply
              0
              • rwanrooyR Offline
                rwanrooyR Offline
                rwanrooy
                wrote on last edited by
                #14

                @Japio: I quit trying to get it working because some users are reporting sync issues with the arduino internal clock. I managed to get it work with a rs232 to ethernet adapter with a transistor used as inverter. I can connect in native tcp mode in domoticz to the ip adres of the adapter.

                1 Reply Last reply
                0
                • sinczeS Offline
                  sinczeS Offline
                  sincze
                  MySensors Evangelist
                  wrote on last edited by
                  #15

                  Sorry to bump this all thread back to 2018, but I have a question.
                  Is it already possible to use MySensors and this all in one P1 domoticz sensor? (usage1,2 / return1,2)

                  The examples I can find create 2-4 new sensors in Domoticz. I'm looking forward to the possibilitie if it can be done with one ;-)

                  0_1528314100556_All in one p1.JPG

                  It can be done with a P1 http request but as a MySenors user I want to do it with mysensors.

                  The idea is to use this PCB as P1 and Watermeter ;-)
                  0_1528314499956_Wemos Smar Water meter.jpg

                  1 Reply Last reply
                  0
                  • alowhumA Offline
                    alowhumA Offline
                    alowhum
                    Plugin Developer
                    wrote on last edited by
                    #16

                    @sincze did you manage to create a nice sketch to read out a P1 device? I'm looking for such a sketch.

                    1 Reply Last reply
                    0
                    • electrikE Offline
                      electrikE Offline
                      electrik
                      wrote on last edited by electrik
                      #17

                      There are many examples...
                      https://forum.mysensors.org/topic/3764/p1-smart-meter-nta8130-readout-using-mysensors/7

                      Or on GitHub, needs some tinkering to integrate in mysensors

                      https://github.com/search?l=C%2B%2B&q=P1+meter&type=Repositories

                      Edit
                      There is also a library available
                      https://github.com/matthijskooijman/arduino-dsmr

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      21

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular