Newbie - what sensors do I need?

Oh no it isn’t! :rofl:

It’s in your RPi, and you get at it via your web browser and emonCMS.
Setup → Emonhub →Edit config tab.

Yikes!

Glad I asked…!

I don’t see anything like the node 15 entry:

#######################################################################
#######################       Interfacers       #######################
#######################################################################

[interfacers]
    ### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module
    [[EmonPi2]]
        Type = EmonHubOEMInterfacer
        [[[init_settings]]]
            com_port = /dev/ttyAMA0
            com_baud = 38400
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            subchannels = ToRFM12,
    
    [[USB0]]
        Type = EmonHubOEMInterfacer
        [[[init_settings]]]
            com_port = /dev/ttyUSB0
            com_baud = 115200
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            subchannels = ToRFM12,
            nodename = emonTx4
    
    [[SPI]]
        Type = EmonHubRFM69LPLInterfacer
        [[[init_settings]]]
            nodeid = 5
            networkID = 210
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
    
    
    [[MQTT]]
        Type = EmonHubMqttInterfacer
        [[[init_settings]]]
            mqtt_host = 127.0.0.1
            mqtt_port = 1883
            mqtt_user = emonpi
            mqtt_passwd = emonpimqtt2016
        
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            
            # emonhub/rx/10/values format
            # Use with emoncms Nodes module
            node_format_enable = 0
            node_format_basetopic = emonhub/
            
            # emon/emontx/power1 format - use with Emoncms MQTT input
            # http://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
            nodevar_format_enable = 1
            nodevar_format_basetopic = emon/
            
            # Single JSON payload published  - use with Emoncms MQTT
            node_JSON_enable = 0
            node_JSON_basetopic = emon/
    
    [[emoncmsorg]]
        Type = EmonHubEmoncmsHTTPInterfacer
        [[[init_settings]]]
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            url = https://emoncms.org
            apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            senddata = 1    # Enable sending data to Emoncms.org
            sendnames = 1    # Send full input names (compression will be automatically enabled)
            interval = 30    # Bulk send interval to Emoncms.org in seconds

#######################################################################
#######################          Nodes          #######################
#######################################################################

Therein lies your problem - all along.

From a bit above where yours stops, mine looks like this, so merge or add the rubric and your new Node 15 definition - you probably don’t want my Node 5 & 17 (5 is the emonPi itself) but it won’t hurt to have them. (I’d keep the nodes in order, but it’s not necessary.)

#######################################################################
#######################          Nodes          #######################
#######################################################################

## See config user guide: https://github.com/openenergymonitor/emonhub
## If autoconf is enabled above, node configuration will automatically
## populate based on templates listed in available.conf

[nodes]
    [[5]]
        nodename = emonpiCM_5
        [[[rx]]]
            names = Msg, power1, power2, power1pluspower2, vrms, t1, t2, t3, t4, t5, t6, pulse1count, pulse2count, E1, E2
            datacodes = L, h, h, h, h, h, h, h, h, h, h, L, L, l, l
            scales = 1.0, 1.0, 1.0, 1.0, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 0.01, 1.0, 1.0, 1.0, 1.0
            units = n, W, W, W, V, C, C, C, C, C, C, p, p, Wh, Wh
    
    [[17]]
        nodename = emonTx4_17
        [[[rx]]]
            names = MSG, Vrms1, Vrms2, Vrms3, P1, P2, P3, P4, P5, P6, E1, E2, E3, E4, E5, E6, pulse, Ana
            datacodes = L, h, h, h, h, h, h, h, h, h, l, l, l, l, l, l, L, H
            scales = 1.0, 0.01, 0.01, 0.01, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
            units = n, V, V, V, W, W, W, W, W, W, Wh, Wh, Wh, Wh, Wh, Wh, p, n

I have now added the above (with node 15 inserted between the two) and restarted both the hub and the pi itself but still nothing appearing in the feed.

Since restart, the log reads:

2023-12-31 17:36:30,297 INFO MainThread Opening hub…
2023-12-31 17:36:30,297 INFO MainThread Running as user: pi
2023-12-31 17:36:30,297 INFO MainThread Logging level set to DEBUG
2023-12-31 17:36:30,298 INFO MainThread Creating EmonHubOEMInterfacer ‘EmonPi2’
2023-12-31 17:36:30,300 DEBUG MainThread Opening serial port: /dev/ttyAMA0 @ 38400 bits/s
2023-12-31 17:36:30,301 INFO MainThread Creating EmonHubOEMInterfacer ‘USB0’
2023-12-31 17:36:30,302 ERROR MainThread Could not open serial port: /dev/ttyUSB0 @ 115200 bits/s (retry every 10s)
2023-12-31 17:36:30,303 INFO MainThread Creating EmonHubRFM69LPLInterfacer ‘SPI’
2023-12-31 17:36:30,326 INFO MainThread Creating RFM69 LowPowerLabs interfacer
2023-12-31 17:36:30,327 INFO MainThread RFM69 node_id = 5
2023-12-31 17:36:30,327 INFO MainThread RFM69 network_id = 210
2023-12-31 17:36:30,327 INFO MainThread RFM69 interruptPin = 22
2023-12-31 17:36:30,328 INFO MainThread RFM69 resetPin = None
2023-12-31 17:36:30,328 INFO MainThread RFM69 selPin = 26
2023-12-31 17:36:30,328 INFO MainThread Starting radio setup
2023-12-31 17:36:30,352 INFO MainThread Radio setup complete
2023-12-31 17:36:30,354 DEBUG MainThread Setting SPI pubchannels: [‘ToEmonCMS’]
2023-12-31 17:36:30,355 INFO MainThread Creating EmonHubMqttInterfacer ‘MQTT’
2023-12-31 17:36:30,357 DEBUG MainThread Setting MQTT pubchannels: [‘ToRFM12’]
2023-12-31 17:36:30,358 DEBUG MainThread Setting MQTT subchannels: [‘ToEmonCMS’]
2023-12-31 17:36:30,358 INFO MainThread Setting MQTT node_format_enable: 0
2023-12-31 17:36:30,359 INFO MainThread Setting MQTT nodevar_format_enable: 1
2023-12-31 17:36:30,359 INFO MainThread Setting MQTT nodevar_format_basetopic: emon/
2023-12-31 17:36:30,359 INFO MainThread Setting MQTT node_JSON_enable: 0
2023-12-31 17:36:30,360 INFO MainThread Creating EmonHubEmoncmsHTTPInterfacer ‘emoncmsorg’
2023-12-31 17:36:30,362 DEBUG MainThread Setting emoncmsorg interval: 30
2023-12-31 17:36:30,363 DEBUG MainThread Setting emoncmsorg pubchannels: [‘ToRFM12’]
2023-12-31 17:36:30,363 DEBUG MainThread Setting emoncmsorg subchannels: [‘ToEmonCMS’]
2023-12-31 17:36:30,364 WARNING MainThread Setting emoncmsorg apikey: obscured
2023-12-31 17:36:30,365 INFO MainThread Setting emoncmsorg url: https://emoncms.org
2023-12-31 17:36:30,365 INFO MainThread Setting emoncmsorg senddata: 1
2023-12-31 17:36:30,365 INFO MainThread Setting emoncmsorg sendstatus: 0
2023-12-31 17:36:30,366 INFO MainThread Setting emoncmsorg sendnames: 1
2023-12-31 17:36:30,366 INFO MainThread Setting emoncmsorg compress: 0
2023-12-31 17:36:30,367 DEBUG MainThread Automatic configuration of nodes enabled

Is there nothing in the log after the above?

The Pi appears to be talking to the RF module, so either that isn’t receiving, or the emonTx isn’t transmitting.

You haven’t turned r.f. off accidentally?

You could try erasing the EEPROM in the emonTx. The EEPROM library was designed to ignore data not belonging to the current sketch, but only if the rules have been followed (viz. every sketch must use an unique code to identify itself). I don’t know if the sketch you got from Github does obey the rules. Using the serial monitor in Admin, send it the ‘r’ command – restore sketch defaults. If you’ve changed anything else, that too will be reset, so make a note first.

Do you know that the r.f. was working when you bought the emonTx?

Does the LED inside the emonTx come on when you reset/start it, then go out? then give a short flash every 10 s approx. If it goes out, it’s probably initialised everything, including the radio, correctly. If it stays on for more than about 3 s, then it’s stuck - but previous output above says it’s not.)

What are the switch settings in the emonTx? Both should be OFF.

Firstly, Happy New Year and thank you for the help to date.

No, before connecting this morning via UART, that was the end of the log.

Certainly not intentionally. To the best of my knowledge I’ve not customised any settings.

I connected via the UART and wrote ‘r’ and send in the Serial Monitor. Nothing comes up in the log, so I can’t see if this actually worked (I also stopped emonHub before trying this).

To be honest I don’t, and have taken this on good faith. The underside of the board says “433MHz 175mm ant” if that makes any difference.

Yes, there is a red LED pulse every 10 seconds or so - but only when connected via the UART cable. When I just have the mains power supply plugged in, the LED is not lit. Does this suggest it is actually a defective power supply to the emonTx that is causing the issue?

Where do I find these? Are they physical switches on the board or something in the software?

UPDATE:

Prompted by the revelation that there should be a power LED lit up on the Tx, I dug out an old USB cable and have tried powering using the 5v connection and a plug adapter.

I think this has been successful as the Inputs page on emonpi.local now has green numerals every 10s and the EmonHub log has entries such as:

2024-01-02 10:40:09,785 DEBUG SPI 60 NEW FRAME :
2024-01-02 10:40:09,787 DEBUG SPI 60 Timestamp : 1704192009.785074
2024-01-02 10:40:09,787 DEBUG SPI 60 From Node : 15
2024-01-02 10:40:09,788 DEBUG SPI 60 Values : [23, 240, 1122, 0, 0, 2, 58, 0, 0, 0, 300, 300, 300, 1, -23, -100.0]
2024-01-02 10:40:09,788 DEBUG SPI 60 RSSI : -49
2024-01-02 10:40:09,789 DEBUG SPI 60 Sent to channel(start)’ : ToEmonCMS
2024-01-02 10:40:09,789 DEBUG SPI 60 Sent to channel(end)’ : ToEmonCMS
2024-01-02 10:40:09,955 DEBUG MQTT Publishing: emon/emonTx3cm15/MSG 23
2024-01-02 10:40:09,957 DEBUG MQTT Publishing: emon/emonTx3cm15/Vrms 240
2024-01-02 10:40:09,959 DEBUG MQTT Publishing: emon/emonTx3cm15/P1 1122
2024-01-02 10:40:09,960 DEBUG MQTT Publishing: emon/emonTx3cm15/P2 0
2024-01-02 10:40:09,962 DEBUG MQTT Publishing: emon/emonTx3cm15/P3 0
2024-01-02 10:40:09,963 DEBUG MQTT Publishing: emon/emonTx3cm15/P4 2
2024-01-02 10:40:09,965 DEBUG MQTT Publishing: emon/emonTx3cm15/E1 58
2024-01-02 10:40:09,966 DEBUG MQTT Publishing: emon/emonTx3cm15/E2 0
2024-01-02 10:40:09,968 DEBUG MQTT Publishing: emon/emonTx3cm15/E3 0
2024-01-02 10:40:09,969 DEBUG MQTT Publishing: emon/emonTx3cm15/E4 0
2024-01-02 10:40:09,972 DEBUG MQTT Publishing: emon/emonTx3cm15/T1 300
2024-01-02 10:40:09,974 DEBUG MQTT Publishing: emon/emonTx3cm15/T2 300
2024-01-02 10:40:09,975 DEBUG MQTT Publishing: emon/emonTx3cm15/T3 300
2024-01-02 10:40:09,977 DEBUG MQTT Publishing: emon/emonTx3cm15/pulse 1
2024-01-02 10:40:09,978 DEBUG MQTT Publishing: emon/emonTx3cm15/missed -23
2024-01-02 10:40:09,980 DEBUG MQTT Publishing: emon/emonTx3cm15/missedprc -100.0
2024-01-02 10:40:09,981 DEBUG MQTT Publishing: emon/emonTx3cm15/rssi -49
2024-01-02 10:40:19,614 INFO SPI Packet received 40 bytes

Does the above look right now?

There’s still nothing showing on the Feeds page, or rather the entries all say NULL kWh, but I think we have (hopefully at least) isolated the hardware issues to the power supply/port.

I note the AC-AC voltage sensor plugs are currently out of stock on the OEM shop, but I will try to replace this once they are available again.

Thank you again for the help, and I’m sorry it was something so rudimentary as the power supply causing the issues.

There won’t be until you define what you want to do in emonCMS. “Feeds” are the databases - nothing is stored until you ‘Log to feed’ as a step in the Input processing.

You have the 9 V a.c. adapter? Does this not plug in to the barrel socket on the emonbTx? Have you got the 2-pin jumper present on the emonTx p.c.b? It’s on the edge between the USB socket and the screw terminals - there should be a clip on the two pins that links them. If it’s not there, just wrap a bit of 5 A fuse wire round them. In the absence of a link, the a.c. adapter does not power the emonTx, it only supplies the voltage sample to be measured. The switches are small DIP switches on the opposite edge between the antenna socket and c.t.4 socket.

rect1

Don’t worry about that - you’re not the first to be caught out by something simple, and I’m sure you won’t be the last. I likely assumed you’d got all the parts of a working system and just needed to set it up.

Once you get sensible numbers on the Inputs page of emonCMS, start reading here: Emoncms Core Concepts — OpenEnergyMonitor 0.0.1 documentation
The first 3 sections explain the basics, but when you hit EmonCMS Modules, stop and go back to https://docs.openenergymonitor.org/emoncms/intro-rpi.html#a-quick-intro-to-emonhub, where it explains how to process the input data and store it in a Feed. Skip “Remote server” and start reading again at View Graphs & Dashboard Builder (and skip the later parts of these sections too - come back later and fill in the deeper stuff when you need to). This should give you enough to see meaningful data in your web browser.