Thanks Glyn for the pointers above.
I have made the following changes to my emonPiLCD.py file
I changed the emonPi_nodeID to 6 for emonTX shield readings and then altered the page sections of the code as shown below.to display the required information.
I also noticed that the emonTX shield only sends 4 power readings and a voltage reading. so basedata only goes from 0 to 4.
I may work on this a bit more once i get all the sensors i need connected up and tested. I have also changed my voltage calibration as i was getting a reading of 156V with the default “ideal psu/transformer” setting. my measured mains is about 134V on average. and my emonTX Shield volt input was 11.45V
emonPiLDC.py code:
if page == 3:
basedata = r.get("basedata")
if basedata is not None:
basedata = basedata.split(",")
lcd[0] = 'Power 1: ' + basedata[0] + "W"
lcd[1] = 'Power 2: ' + basedata[1] + "W"
else:
lcd[0] = 'ERROR: MQTT'
lcd[1] = 'Not connected'
elif page == 4:
basedata = r.get("basedata")
if basedata is not None:
basedata = basedata.split(",")
lcd[0] = 'Power 3: ' + basedata[2] + "W"
lcd[1] = 'Power 4: ' + basedata[3] + "W"
else:
lcd[0] = 'ERROR: MQTT'
lcd[1] = 'Not connected'
elif page == 5:
basedata = r.get("basedata")
if basedata is not None:
basedata = basedata.split(",")
lcd[0] = 'Grid Volts in’ # 'Vrms: ' + basedata[4] + "V"
lcd[1] = 'Vrms: ' + basedata[4] + "V" # 'Pulse: ' + basedata[10] + "p"
else:
lcd[0] = 'ERROR: MQTT'
lcd[1] = 'Not connected'
elif page == 6:
lcd[0] = datetime.now().strftime('%b %d %H:%M')
lcd[1] = 'Uptime %.2f days' % (seconds / 86400)
elif page == 7:
lcd[0] = "emonPi Build:"
lcd[1] = sd_image_version
If there any changes you wish testing in future please let me know as i am happy to help if possible.
Regards
Jon