Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. gtortone
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by gtortone

    • RE: Efergy e2 power meter

      @korttoma Hi, I just returned to play with Efergy and Arduino. I realized that debug messages on UART reset the micro. Now I'm skipping (with a #define DEBUG and #ifdef) all debug messages and it seems to work fine. But take into account that now I'm not using any radio module... just to test the firmware.

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      @korttoma

      Hi,
      at the moment I'm defining some things in order to use RFM69 modules...
      in the past, on my NRF24L01+ I was using 10 uF capacitor but I had same problems of "stop responding"...

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      Hi @korttoma,

      the value 65535 or 32768 often is used as multiplier from sensor that send metric;
      usually when you have to send a "small" float value (temperature, current) you can send it as integer
      multiplied by a big constant instead of sending it with a float value converted in binary...

      I just refined my formula with this that is more close to formula I found for my Efergy using a small
      constant:

      current = 18348 / 32768 / pow(2, 255-254 + 1) = 0.139 A
      current = 17693 / 32768 / pow(2, 255-255 + 1) = 0.269 A
      current = 28835 / 32768 / pow(2, 255-255 + 1) = 0.439 A

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      Hi @korttoma,
      take a look to this decoding based on your collected data for 30W, 60W and 100W;

      everything seems to be ok !!

      Regards,
      Gennaro

      p.s. I checked in your profile that you live in Finland and power voltage is 220/240 V 🙂

      • bytes #1: 0x09 fixed value
      • bytes #2: 0X50 fixed value
      • bytes #3: 0x2E fixed value
      • bytes #4: 0x40 fixed value
      • bytes #5: current MSB
      • bytes #6: current LSB
      • bytes #7: exponent
      • bytes #8: CRC
      • current detected = ((MSB << 😎 + LSB / 65535) / pow(2, (255-exponent))

      30 W = 0.13 A (@220V)

      9 - 0x09
      80 - 0x50
      46 - 0x2E
      64 - 0x40

      71 - 0x47
      172 - 0xAC
      254 - 0xFE
      184 - 0xB8

      0x47AC = 18348

      current = 18348 / 65535 / pow(2, 1) = 0.139 A

      60 W = 0.26 A (@220V)

      9 - 0x09
      80 - 0x50
      46 - 0x2E
      64 - 0x40

      69 - 0x45
      29 - 0x1D
      255 - 0xFF
      40 - 0x28

      0x451D = 17693

      current = 17693 / 65535 / pow(2, 0) = 0.269 A

      100 W = 0.45 A (@220V)

      9 - 0x09
      80 - 0x50
      46 - 0x2E
      64 - 0x40

      112 - 0x70
      163 - 0xA3
      255 - 0xFF
      217 - 0xD9

      0x70A3 = 28835 (10)

      current = 28835 / 65535 / pow(2, 0) = 0.439 A

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      Hi @korttoma,
      happy to read that you are getting "reasonable" values from RFM12B !!

      but I agree that in your case the decoding protocol needs some refinements...
      just a question: your line voltage is 110 or 240 ?

      take into account that from Efergy current sensor you get the value of "current" and
      not "power" than for 30W expected value from data is (V/30) [Ampere]...

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      @korttoma

      Hi, I have these modules:
      http://www.banggood.com/433Mhz-RF-Transmitter-With-Receiver-Kit-For-Arduino-ARM-MCU-Wireless-p-74102.html?rmmds=search

      the range is only few centimeters... I will try to do some antenna tuning but I don't expect any significative improvement.

      If you want to try with your RXB6 module the code is always the same, you have only to remove the configuration code lines related to RFM12b configuration;

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      @korttoma

      Hi,
      you need to connect RFM12b module to Arduino following this schematic (you can avoid to connect IRQ line...)

      http://jeelabs.net/attachments/download/331/jlpcb-128.pdf

      after this cabling you need to connect RFM12b DATA pin to Arduino D3 pin (you can select a different pin but modify
      code accordingly...)

      only after this you can use the Mysensors-Efergy-e2 sketch (https://github.com/gtortone/MySensors-Efergy-e2) to get
      RF data;

      I tested my code with cheap RF modules (I received them some days ago) but the performance of these modules are very
      poor... I will try to do other work on cheap RF modules in the future...

      Thanks !

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      Hi @korttoma,

      I did not tested cheap 433 MHz modules yet... I will receive a couple of them next week !
      anywai RFM12b is a great module that has interesting features like frequency tuning and adjustable gain...

      If I will have updates on cheap modules I will update this thread !

      posted in My Project
      gtortone
      gtortone
    • RE: 💬 Building a Raspberry Pi Gateway

      @skywatch
      I meaning that often is also useful to check cable two (or three) times !
      but if you already did it... ok !

      posted in Announcements
      gtortone
      gtortone
    • RE: 💬 Building a Raspberry Pi Gateway

      @skywatch
      Hi, options for "configure" are ok, I suggest you to double check your cabling !

      🙂

      posted in Announcements
      gtortone
      gtortone
    • RE: 💬 Building a Raspberry Pi Gateway

      @skywatch

      You're welcome !

      you can (re)run configure, make, make install when you want,
      but I suggest to stop the mysgw executable before launch "make install"

      posted in Announcements
      gtortone
      gtortone
    • RE: 💬 Building a Raspberry Pi Gateway

      @skywatch

      if you did

      make install

      the mysgw executable is in /usr/local/bin directory then you have to launch it with:

      /usr/local/bin/mysgw -d

      posted in Announcements
      gtortone
      gtortone
    • RE: 💬 Building a Raspberry Pi Gateway

      @skywatch try to run it with "mysgw -d" .

      Enabling debug mode you can see on console every message and diagnostics...

      posted in Announcements
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      @korttoma said:

      @gtortone very nice! I think I have one of these efergy e2s collecting dust. I would love to get more info on how you connected the RFM12B and where you purchased it from so I can get the correct type.

      Hi, as you can see in photos I just posted, you need to connect DATA pin of RFM12B to a digital input of Atmega328P (it must be a pin suitable for interrupt).

      RFM12B modules are not longer available... I have some of these (old) modules (all of them tuned for 868 Mhz) but I will do some tests with a cheap 433 MHz receiver (like this one: http://bit.ly/2gl6yXJ) or with a recent Hoperf transceiver modules (RFM69)

      Thanks,
      Gennaro

      posted in My Project
      gtortone
      gtortone
    • RE: Efergy e2 power meter

      0_1479895314189_Efergy-ook.jpg
      Photo #1: Efergy E2 OOK signal decoded by Zeroplus logic analyzer

      0_1479893860303_IMG_20161123_102350_HHT.jpg
      Photo #2: JeeNode module with RFM12B radio module

      0_1479894251430_IMG_20161123_102416_HHT.jpg
      Photo #3: NRF24L01+ JeeNode shield pluggable on SPI header of JeeNode

      0_1479894306958_IMG_20161123_102435_HHT.jpg
      Photo #4: Final result !

      0_1479894343738_IMG_20161123_102459_HHT.jpg
      Photo #5: Detail of RFM12B Data pin routed to D3 in order to perform software OOK decoding

      0_1479894410202_IMG_20161121_195948.jpg
      Photo #6: Efergy power meter display shows same value of software !

      0_1479894491250_IMG_20161123_102826_HHT.jpg
      Photo #7: First data gathered by Home Assistant (https://home-assistant.io) on Raspberry PI 3

      Some notes:

      1. I'm using a RFM12B radio module tuned for 868Mhz equipped with 433 MHz antenna... but everything goes fine due to RFM12B has frequency tuning

      2. I plan to do another setup using a simple 433 Mhz receiver or other Hoperf 433 Mhz receiver module (RFM12B are obsoleted modules)

      posted in My Project
      gtortone
      gtortone
    • Efergy e2 power meter

      Hi,
      I just published on github (https://github.com/gtortone/MySensors-Efergy-e2) my last work about integration of Efergy e2 power meter with MySensors. The Efergy e2 electricity monitor (http://efergy.com/it/products/electricity-monitors/e2-classic) provides a sensor that wirelessly sends information about the amount of electricity you are using to the display monitor. The monitor converts this into kilowatt-hours.

      This sketch use a JeeNode v5 (http://jeelabs.net/projects/hardware/wiki/JeeNode) equipped with 433/868 MHz RFM12B module (www.hoperf.com/upload/rf/RFM12B.pdf) configured in OOK mode to capture wireless data (on pin D3) and forward it through NRF24L01+ with MySensors library.

      Comments and suggestions are very welcome !

      Regards,
      Gennaro

      p.s. photos will be published soon !

      posted in My Project
      gtortone
      gtortone
    • RE: We are mostly using fake nRF24L01+'s, but worse fakes are emerging.

      Hi,
      on gateway I'm using a NRF24L01+PA+LNA and everything works fine if I use NRF24L01+ or SI24R1 on sensor side.

      If I replace NRF24L01+PA+LNA with something different (NRF24L01+ or SI24R1 module) the communication does not work...

      posted in Hardware
      gtortone
      gtortone
    • RE: We are mostly using fake nRF24L01+'s, but worse fakes are emerging.

      Hi tekka, just for information:

      • master branch => does not work with Si24R1 also disabling broadcast search of parent.
      • dev branch => works fine with Si24R1 disabling broadcast search of parent.

      Thanks,
      Gennaro

      posted in Hardware
      gtortone
      gtortone
    • RE: We are mostly using fake nRF24L01+'s, but worse fakes are emerging.

      Hi tekka, thanks again but result is always the same...

      0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.0.1-beta
      4 TSM:INIT
      10 TSM:INIT:TSP OK
      12 TSF:SID:OK,ID=1
      14 TSM:FPAR
      1697 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      3706 !TSM:FPAR:NO REPLY
      3708 TSM:FPAR
      5392 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      7399 !TSM:FPAR:NO REPLY
      7401 TSM:FPAR
      9084 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      11094 !TSM:FPAR:NO REPLY
      11096 TSM:FPAR
      12779 TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      14788 !TSM:FPAR:FAIL
      14790 TSM:FAIL:CNT=1
      14792 TSM:FAIL:PDT

      I realized that if I disable broadcast search of parent node with:

      #define MY_PARENT_NODE_ID 0
      #define MY_PARENT_NODE_IS_STATIC

      the Si24R1 works fine !

      but I don't know if this can be a problem for other features of MySensors...

      posted in Hardware
      gtortone
      gtortone
    • RE: We are mostly using fake nRF24L01+'s, but worse fakes are emerging.

      @tekka Hi, thanks for the suggestion - I checked with MySensors dev branch from github but results are the same:

      15007 RF24:read register, reg=23, value=17
      15013 RF24:read register, reg=23, value=17
      15017 RF24:read register, reg=23, value=17
      15022 RF24:read register, reg=23, value=17
      15026 RF24:read register, reg=23, value=17
      15030 RF24:read register, reg=23, value=17
      15036 !TSM:FPAR:FAIL
      15038 TSM:FAIL:CNT=1
      15040 TSM:FAIL:PDT
      15042 RF24:write register, reg=0, value=12
      15046 RF24:power down

      If I replace the Si24R1 with genuine NRF24L01+ everything works... (also with MySensors master branch)

      posted in Hardware
      gtortone
      gtortone
    • RE: We are mostly using fake nRF24L01+'s, but worse fakes are emerging.

      Hi,
      I just received five NRF24L01+ clones (Si24R1) but on website it is reported and I did not realize it when I bought these modules...

      anyway is there a 'recipe' to have a Si24R1 working with MySensors ?
      I tested them with ping-pong examples and they work fine... but if I try to use a Si24R1 with MySensors libraries it does not work..

      Starting sensor (RNNNA-, 2.0.0)
      TSM:INIT
      TSM:RADIO:OK
      TSP:ASSIGNID:OK (ID=1)
      TSM:FPAR
      TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      TSM:FPAR
      TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
      !TSM:FPAR:FAIL
      !TSM:FAILURE
      TSM:PDT
      TSM:INIT
      TSM:RADIO:OK
      TSP:ASSIGNID:OK (ID=1)
      TSM:FPAR

      Thanks in advance,
      Gennaro

      posted in Hardware
      gtortone
      gtortone