I have been using a very old (5 years or so) version of emonHub, which still runs and sends data from my smart meter to emonCMS.
Now I wanted to build a second one on another RPi to monitor my SMA Inverter by using the SMA Interfacer. I have followed the installation guidelines for emonpi, which went ok. I put in the correct bluetooth address in the config file. The hub finds the config file, starts properly and creates the interfacers (SMASolar, but then nothing happens at all. Nothing in the log after the interfacers started… what could I be doing wrong? I suspect it has to do with the config file. I paste the config file here below. I am not using any hardware other than the RPi. Advice is very much appreciated!
[interfacers]
### This interfacer manages the SMA module
[[SMASolar]]
Type = EmonHubSMASolarInterfacer
[[[init_settings]]]
inverteraddress= 00:80:25:A4:B9:45
inverterpincode = 0000
timeinverval = 5
nodeid = 29
packettrace = 0
[[[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 = 1
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/
[[emoncmsorg]]
Type = EmonHubEmoncmsHTTPInterfacer
[[[init_settings]]]
[[[runtimesettings]]]
# pubchannels = ToRFM12,
subchannels = ToEmonCMS,
url = https://emoncms.org
apikey = MYAPIKEY
senddata = 1 # Enable sending data to Emoncms.org
sendstatus = 1 # Enable sending WAN IP to Emoncms.org MyIP > https://emoncms.org/myip/list
sendinterval= 30 # Bulk send interval to Emoncms.org in seconds
Hello @franknfurther, the SMA interfacer was developed by Stuart Pittaway, would you mind creating an issue on emonhub github here Issues · openenergymonitor/emonhub · GitHub and mentioning @stuartpittaway who may then see you message and be able to help?
Hi Paul, you are right. But this error only happened when I copied the file onto the community site. Its not included in the config file I used. I have corrected the post now.
Hi Trystan, will do but I first want to check if my config file and general setup are ok. Because I am not clear how the subchannels and pubchannels are supposed to be set up i this case where there is only the SMA and EmonCMS interfacers. And do I need the nodes section? I left it out.
Is there a way to track what the interfacers are doing if they are not doing anything?
Hi Stuart, this is embarrassing to say but I simply forgot to install the bluetooth the second time round. The first time I did install BT but then the SD card became corrupt, so I had to do everything from scratch again. And the second time I apparently forgot to install the bluetooth part. Sorry for the commotion.
In my defence though … I would propose that the SMASolarInterfacer gives out an error or warning if the bluetooth module is not installed.
try:
import bluetooth
bluetooth_found = True
except ImportError:ater on
bluetooth_found = False
The import section of the interfacer does catch the error, but then seems to do nothing with the bluetooth_found flag later on other than returning a false in the read method.
#Override base read code from emonhub_interfacer
def read(self):
"""Read data from inverter and process"""
if not bluetooth_found: return False
I would love to contribute and will see if I can be of use in this case, however, my programming experience is rather limited.
One more question though: on the config website it says I don’ t have to edit the nodes section (node 29). However, if I did create a node section with Node 29, could I pass the variable names in this way so they get automatically registered in emonCMS?