Renaming device just keeps adding as new name and emonTx4_17 reappears as the live device

I’m just trying to rename the device from the default emonTx4_17, but every time I do it initially looks like it was successful but seconds later emonTx4_17 reappears. All live inputs are showing green only on emonTx4_17 and not on my renamed device.
This has clearly worked once as I have data in the db with a custom name

It’s not possible to change the device name on the inputs list, it will keep recreating the device as you experienced. You can however change the device name in emonhub.conf.

Setup > EmonHub > Edit Config

E.g on my system I originally had my emonTx4 on node 15 with a different name so to save the trouble of remapping I just set the nodename there to the original node rather than emonTx4_17 which is the automatic name created for an emonTx4 received on node 17.

[nodes]
    [[17]]
        nodename = emonTx4cm15
        [[[rx]]]
            names = MSG, Vrms, P1, P2, P3, P4, P5, P6, E1, E2, E3, E4, E5, E6, T1, T2, T3, pulse
            datacodes = L, h, h, h, h, h, h, h, l, l, l, l, l, l, h, h, h, L
            scales = 1.0, 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.01, 0.01, 1.0
            units = n, V, W, W, W, W, W, W, Wh, Wh, Wh, Wh, Wh, Wh, C, C, C, p

Trystan has outlined what you need to do to fix this issue - essentially change the name in the definition of “17” in emonhub.conf.

This is specific to information received by radio (such as from emonTH, emonTX, etc . . ) and is because the data which is sent from the remote device does not include the device name, just the device number. In the snippet below you can see that device 24 has sent a packet which is composed of just numbers.

2022-12-03 15:46:28,102 DEBUG RFM2Pi 272311 NEW FRAME : OK 24 167 0 165 0 165 0 170 0 155 0 170 2 29 0 0 0 0 0 (-87)

The configuration in emonhub.conf is what is used to convert these numbers into the more readable information that is presented within EmonCMS

2022-12-03 15:46:28,102 DEBUG RFM2Pi 272311 NEW FRAME : OK 24 167 0 165 0 165 0 170 0 155 0 170 2 29 0 0 0 0 0 (-87)
2022-12-03 15:46:28,104 DEBUG RFM2Pi 272311 Timestamp : 1670082388.101746
2022-12-03 15:46:28,104 DEBUG RFM2Pi 272311 From Node : 24
2022-12-03 15:46:28,105 DEBUG RFM2Pi 272311 Values : [16.7, 16.5, 16.5, 17, 15.5, 68.2, 2.9000000000000004, 0]
2022-12-03 15:46:28,106 DEBUG RFM2Pi 272311 RSSI : -87
2022-12-03 15:46:28,106 DEBUG RFM2Pi 272311 Sent to channel(start)’ : ToEmonCMS
2022-12-03 15:46:28,107 DEBUG RFM2Pi 272311 Sent to channel(end)’ : ToEmonCMS
2022-12-03 15:46:28,222 DEBUG MQTT Publishing: emon/OrangeTH/temperature 16.7
2022-12-03 15:46:28,224 DEBUG MQTT Publishing: emon/OrangeTH/external temperature1 16.5
2022-12-03 15:46:28,225 DEBUG MQTT Publishing: emon/OrangeTH/external temperature2 16.5
2022-12-03 15:46:28,226 DEBUG MQTT Publishing: emon/OrangeTH/external temperature3 17
2022-12-03 15:46:28,227 DEBUG MQTT Publishing: emon/OrangeTH/external temperature4 15.5
2022-12-03 15:46:28,229 DEBUG MQTT Publishing: emon/OrangeTH/humidity 68.2
2022-12-03 15:46:28,230 DEBUG MQTT Publishing: emon/OrangeTH/battery 2.9000000000000004
2022-12-03 15:46:28,231 DEBUG MQTT Publishing: emon/OrangeTH/pulsecount 0
2022-12-03 15:46:28,232 DEBUG MQTT Publishing: emon/OrangeTH/rssi -87
2022-12-03 15:46:28,233 INFO MQTT Publishing ‘node’ formatted msg
2022-12-03 15:46:28,234 DEBUG MQTT Publishing: emonhub/rx/24/values 16.7,16.5,16.5,17,15.5,68.2,2.9000000000000004,0,-87

David

1 Like

Could that be made more explicit in the interface? EG - remove the ability to edit the device name?