OMG. That’s insane. One of the screenshots shows the mqtt:// but the “text” doesn’t show that anywhere… lol. Works like a champ now.
I can’t figure out why I can see the data in MQTT explorer and pasted the yaml with my mac address as in the instructions, but don’t see any sensors in the mqtt integration. I already had other MQTT devices there, but this one didn’t show up. did the basic troubleshooting of restarting HA and Mosquito broker add-on, but not working here.
edit: I do see new entities under developer tools states like…
sensor.16_channel_active_power
sensor.16_channel_current
and a few others, and seeing entities now too, but no new devices. did you all name your circuits in the app and then match that to the yaml or other steps? or do I just need to wait a while for it to show up?
in my MQTT options, I have Birth message retain and Will message retain off, and in their instructions is just a screen shot showing all the options off with red circle and arrows. what are they saying? turn them all on?
I see that I made a mistake in downloading their user share sample config instead of their sample, and now their website is down again. could someone please share the sample config? found it here… Wayback Machine
ok, that works great. which do you recommend, retain message or automation to call script on startup? Is there any downside to retain message? I would also like to add voltage to the list of what each sensor monitors, and would like to see balance added like in the app. Even when using only one clip on doubles, I was still one ct clamp short (had 17 )for my panel. I skipped one that I think is no longer used, so I would love to see balance to know if I’m right. In your script I see multiply but can’t figure out yet how to multiply on the circuits that I have double breakers but only one ct clamp. Thanks again for providing this great script!
It’s just slightly more cumbersome if you want to make changes to the sensor because you have to go into the MQTT server to delete the retained messages, but is more convenient once you have things the way you like them because the script doesn’t need to be run every startup.
I’ve modified my local script to do this for channels [14,15,16] like this:
repeat:
until:
- condition: template
value_template: "{{ repeat.index == 16}}"
sequence:
- action: mqtt.publish
data:
retain: false
topic: homeassistant/sensor/{{macaddr}}_channel_{{repeat.index}}_power/config
payload: >-
{% set power_mult = iif([14,15,16]|contains(repeat.index), 0.02, 0.01) %}
{"name": "Channel {{repeat.index}} Power", "unique_id": "SEM{{macaddr}}_channel_{{repeat.index}}_power",
"value_template": "{% raw %}{{ value_json.sense{% endraw %}
[{{repeat.index-1}}][2] | float | multiply({{power_mult}}) | round(3) {% raw %} }} {% endraw %}",
{{power_sensor}} {{device_block}} }
so replace lines 16-27 on the original script and replace [14,15,16] with my doubled circuits? I don’t think that’s right? maybe add that instead of replace?you are a code wizard compared to me. I’m just a copy / paste wizard, lol. Would you mind adding the voltage tracking and balance to your script? I would really like to know if voltage of any of my circuits didn’t match the phase A and B. They should all be pretty darn close to the same. Thanks for responding!
that’s a perfect explanation, so I will use both! retain: false until everything is set up correctly and retain: true once I have everything tweaked.
It seems that you can set retain to be always true. You really don’t need to delete the retained message when you make changes to the sensor config. Just send a new message which will overwrite the old one and MQTT will update its definition. (If the topic is different, you do need to delete the old topic). Pretty easy if you use the MQTT Explorer addon.
So I am seeing message traffic in MQTT Explorer but none of the sensor are showing any data in HA. I do see 94 entities.
Post your config here? We can take a look. Make sure the entities have the right topic and device_class. I have recently added gas meter to HA and learned a lot about the MQTT config in HA and may provide some feedback.
If this is the same issue I had (Getting started with Fusion SmartHome) check to see what the name of your device is. Mine was SEMMETER (/ or -, depending where you look) and 11 digits of the MAC address and “E”. However, looking at my router, the actual MAC address of the device was the same 11 digits but then “C”. I’m not sure if this is connected to the fact that I’m running HA on a Raspberry Pi 5, and the instructions say to start with an Ethernet connection and then you can move to WiFi. Each interface probably has a slightly different MAC address. Anyway, I changed the name of the device in the SEM-Meter app, changed the configuration.yaml file, and changed the Discovery Prefix in the MQTT configuration from homeassistant to SEMMETER/actual MAC/HA. At first it seemed like it did exactly nothing, but then I noticed the main Overview finally started updating. I had also assigned a unique ID to each thing as I described in my other post, and I don’t know if that had any effect on it or not. Hope this helps narrow your problem down.