Measuring compost pile heat production via water flow temperature difference

Thanks for your comments! Love the simple node solutions, keep that in mind for the future. It seems that we need to expect a reasonable error in the flow calculations.

Because heatcompost piles are not a proven concept yet we like to have:

  • local data storage for local monitoring and data analysis on sites with small internet access (or Lora network) and redundancy in case of internet failure.
  • remote access on sites with large internetbandwidth for debugging/adjustments
  • flexibility to add extra sensors

It seems that an emonpi can offer that and because we already like to use emonpi for storage and dashboarding it would be nice if we can stick to that hardware for reading the flowsensors.

I digged deeper in the community threads and found the “socket interface”.
It lookes like i can place my current python code (that read 16x DS18B20 and flow sensors connected to the GPIO) on the emon pi and use the socket interface to send the sensor values to emonHub.

Can this also be done by using the MQTT-interface or does that bypass emonHub?

I tried to get the socket interface working on a raspberry pi with emonpi-image using:
https://github.com/openenergymonitor/emonhub/blob/emon-pi/configuration.md
https://community.openenergymonitor.org/t/directly-connecting-to-optical-pulse-counter-with-rpi/1294/2
https://community.openenergymonitor.org/t/emonhub-receiving-weird-data-where-is-it-coming-from/839/4

changes i made to emonhub.conf:

[[mysocketlistener]]
        Type = EmonHubSocketInterfacer
        [[[init_settings]]]
                port_nb = 50012
        [[[runtimesettings]]]
                pubchannels = ToEmonCMS,
#timestamped = True

[[30]]
    nodename = sockettest
    [[[rx]]]
       names = val_A
       datacodes = h
       scales = 0.01
       units = C

But i got stuck on the dataformat:
The goal is to send a float value of 25.35 or integer 2535:

  1. in python i send:

s.sendall(‘30 25.35\r\n’)

emonhub conf:

datacodes = f
scales = 1

emonhub outputs:

2018-07-31 08:42:50,446 DEBUG mysocketlistener 1 NEW FRAME : 30 25.35
2018-07-31 08:42:50,448 WARNING mysocketlistener 1 RX data length: 1 is not valid for datacodes f

  1. in python i send:

s.sendall(‘30 2535\r\n’)

emonhub conf:

datacodes = h
scales = 1

emonhub outputs:

2018-07-31 08:45:40,800 WARNING mysocketlistener 2 RX data length: 1 is not valid for datacodes h

  1. in python i send:

s.sendall(‘30 25 35\r\n’)

emonhub conf:

datacodes = h
scales = 1

emonhub outputs:

2018-07-31 08:38:23,410 DEBUG mysocketlistener 1 NEW FRAME : 30 25 35
2018-07-31 08:38:23,411 DEBUG mysocketlistener 1 Timestamp : 1533026303.41
2018-07-31 08:38:23,412 DEBUG mysocketlistener 1 From Node : 30
2018-07-31 08:38:23,412 DEBUG mysocketlistener 1 Values : [8985]

Finally i got some input values but they are not right.
Can someone point me in a direction that i am missing?