Git Product home page Git Product logo

emonpicm's Introduction

emonPiCM

emonPi Continuous Monitoring Firmware from Robert Wall with fixes to allow RFM69 transmit with RF69 native packets in byte-wise fashion to support emonGLCD.

To test, install both .py file into /opt/openenergymonitor/emonhub/src/interfacers as the originals have not had their send functions fixed after the python3 move, nor are compatible with the new API to send in emonpiCM.

To actually send data, you should send to a MQTT topic thus :

emonhub/tx/<dest_id>/values/msg/byte1,byte2,..byteN

Example : emonhub/tx/20/values/msg/10,13,46,53,12,08,22,-2100,5175,800,2702

Will send to a emonGLCD with id 20 and results in it displaying the time as 13:46.53, -2100W utility reading, 5175 pv reading, 8Kw utility used, 27Kw solar generated. The fist byte (dec 10, hex 0xA) is used as an identifer byte inside the emonGLCD code so it knows this packet is for it.

This will route it's way through emonhub MQTT interfacer and out to OEM interfacer, which will send the message via the atmel/pi serial bridge from transmission using the RFM69

This is confirmed working with a RFM based emonGLCD, using the code found at https://github.com/alandpearson/EmonGLCD/tree/datetime/firmware/SolarPV_rfm69

More work is required to get a emonGLCD with RF12 inside to work with RF69M packets.

You will need to ensure that your emonhub.conf uses EmonHubOEMInterfacer and NOT EmonHubJeenodeInterface as follows :

[[RFM2Pi]]
    Type = EmonHubOEMInterfacer
    [[[init_settings]]]
        com_port = /dev/ttyAMA0
        com_baud = 38400                        # 9600 for old RFM12Pi
    [[[runtimesettings]]]
        pubchannels = ToEmonCMS,
        subchannels = ToRFM12, emonCMS

        group = 210
        frequency = 433
        baseid = 5                             # emonPi / emonBase nodeID
        quiet = true                            # Report incomplete RF packets (no implemented on emonPi)
        calibration = 230V                      # (UK/EU: 230V, US: 110V)
#        interval =  20                       # Interval to transmit time to emonGLCD (seconds)

Additionally, here is the emonhub.conf definition required for emonGLCD :

[[20]]
    nodename = emonglcd
    firmware =V1_1
    hardware = emonglcd
    [[[rx]]]
     names = temperature,
     datacodes = h
     scales = 0.01,1
     units = c
  [[[tx]]]
     names = type,hour,minute,second,day,month,year,utilityW,solarW,utilityKwh,solarKwh
     datacodes =b,b,b,b,b,b,b,h,h,H,H
     units = nodeId,type,h,min,sec,day,mon,year,W,W,kwh,kwh
     

emonpicm's People

Contributors

alandpearson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.