I wonder what I am doing wrong. The same thing happens when adding -u admin -P trinity (or any other username/password combination that I try). I know that port 2883 is listening, and port 1883 is not.
In order to troubleshoot you’ll need to understand how everything works,
Your power meter actually has a zibgee sending unit builtin. The Bridge connects to your power meter via zigbee. The bridge is also running an IP Stack and a MQTT server so you can indirectly retrieve data from you power meter on an IP Network.
If you use the phone app, launching the app publishes a message to the topic “request/is_app_open” on bridges MQTT broker that in turn starts publishing data to the topic “event/metering/instantaneous_demand”
The best advice I can give you is:
Make sure your bridge is “close” to your power meter. Knowing that the power meter actually talks Zigbee is helpfully. This is because Zigbee is a short distance wireless protocol on the 2.4Ghz spectrum. 2.4GHz is pretty crowded these days and you may be subject to interference. Making sure the bridge gets a strong signal helps.
Try power cycling the bridge.
If your bridge has a ethernet port try using that instead of the wireless interface.
Make sure the phone app works. If you can get information from the phone app you should be able to poll the MQTT server directly.
Try simulating the phone app.Open 2 terminal windows and try the following
Terminal 1 Subscribe to all topics verbosely
mosquitto_sub -h 192.168.1.122 -p 2883 -t '#' -v
Terminal 2 publish to topic remote/request/is_app_open
So I was following this thread interested in using the connection for my own dashboard. Being new to MQTT alot of this went over my head.
For any one else in a similar situation I was able to use MQTTLens (A chrome extension)
To start viewing the data coming through. The only settings I need to input were the IP address of my device, and the port: 2883. after I subscribed to ‘#’ and was able to see messages coming through. If you don’t see any data try opening the app on your phone or publish the app request message like was said by Kidmock
After much ado, I found that the app wasn’t really grabbing data as consistently as possible, probably why there were no results from the Mosquitto. I factory reset the unit, but then it wouldn’t bind (in an apartment building, I’m pretty far from the meter TBH). I was able to get it to bind by setting up a cellular data hotspot + a USB battery bank and let it bind 2 feet from the meter. Then I slowly brought it in side, got it on my wired network, and it stayed connected. Finally I tried Mosquitto and it worked! I get an instantaneous demand! I’ve added it to my PRTG monitoring solution to great lovely graphs:
I was wondering if someone could help me get this working. I have a DTE Bridge v2. I am using MQTT Mosquitto broker to control some Tasmoto plugs and lights. In lovelace I see the entity DTE energy bridge but it shows Unknown.
I get this in my Mosquitto broker logs. I think it sees the dte bridge, but I can’t get any data.
[05:27:09] INFO: Setup mosquitto configuration
[05:27:09] INFO: No local user available
[05:27:10] INFO: Initialize Hass.io Add-on services
[05:27:10] INFO: Initialize Home Assistant discovery
[05:27:10] INFO: Start Mosquitto daemon
1588933630: mosquitto version 1.6.3 starting
1588933630: Config loaded from /etc/mosquitto.conf.
1588933630: Loading plugin: /usr/share/mosquitto/auth-plug.so
1588933630: |-- *** auth-plug: startup
1588933630: ├── Username/password checking enabled.
1588933630: ├── TLS-PSK checking enabled.
1588933630: └── Extended authentication not enabled.
1588933630: Opening ipv4 listen socket on port 1883.
1588933630: Opening ipv6 listen socket on port 1883.
1588933630: Opening websockets listen socket on port 1884.
1588933630: Opening ipv4 listen socket on port 8883.
1588933630: Opening ipv6 listen socket on port 8883.
1588933630: Opening websockets listen socket on port 8884.
1588933630: Warning: Mosquitto should not be run as root/administrator.
1588933631: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1588933631: New client connected from 172.30.32.1 as home-assistant-1 (p2, c1, k60, u’homeassistant’).
1588933638: New connection from 192.168.1.218 on port 1883.
[INFO] found mqtt on Home Assistant
1588933640: New client connected from 192.168.1.218 as DVES_048B57 (p2, c1, k30, u’mqtt’).
Thanks for getting back to me, I tried the above but not very knoledable with MQTT yet, I wasn’t sure how to do command line with MQTT. I did download a program called MQTT CLI which looks like it allows MQTT by command line… I wasn’t able to get any information but think I may be doing something wrong. I am looking into it to see if I am using it correctly. Also I installed MQTTLens which is an addon for chrome. I am able to connect to the energy bridge with MQTTLens but can’t get any messages when I publish “#”. Also set up a connection to my tasmota device but not able to see any messages from that either. So I am going to keep playing with it and see if I can figure it out.
The place where you put “connection dte” in is wrong.
Assuming you use hass.io, the configuration in the mqtt addon should contain
customize:
active: true
folder: mosquitto
Then samba into your home assistant, open the folder share, create a folder named “mosquitto” inside, then create a text file with a name of your choosing and extension .conf (e.g. dte.conf)
Hi everyone, long time lurker, first time poster. I’ve been watching HA and this thread for a long time. I am an AEP customer and they discontinued their Power Monitoring App on December 1st. So I figured it was time to setup Home Assistant and MQTT.
Thank you so much to everyone in this thread, and especially @dandelion and @kidmock.
Since the endpoint/topic, password, and setup have changed a few times, I thought I’d write up a how-to based on my experience. Hopefully this will help someone starting from scratch since AEP left us high and dry.
I think the following instructions should work regardless of how you setup Home Assistant, but I am running it in a VM. Additionally I setup a firewall rule on my router to prevent the power bridge connecting to the internet and possibly downloading some instruction to shut down. (hopefully that was a good idea).
Configure Samba: Supervisor -> Dashboard -> Samba Share -> Configuration
3.1 Edit the username (can be anything, used to connect to file share)
3.2 Set a password for the share
Restart the Host not just Home Assistant
On another computer browse to the shared folder \\<IPofHomeAssistant>\share, using the username and password setup in step 3.
Create a folder named “mosquitto” inside \share (\\<IPofHomeAssistant>\share\mosquitto)
Create a text file named “dte.conf”
Paste the following into dte.conf
connection dte
address <IP of Energy Bridge>:2883
try_private false
start_type automatic
topic event/metering/# in 0
Never mind, I figured out identifier was invalid. It is working now:
mosquitto_sub -h 192.168.1.249 -p 2883 -t ‘#’ -v -i powerley-energybridge-homecontrol
event/metering/instantaneous_demand {“time”:1607834226255,“demand”:1125}
My AEP power bridge stopped working with update from Home Assistant OS 5.8 to 5.9. I just had it set up as an entity card to show instantaneous demand and now it says “Entity is non-numeric: sensor.aep_energy_bridge”. Does anyone know what would have changed in 5.9?
My configuration.yaml has:
sensor:
# Main meter electrical flow courtesy AEP
- platform: mqtt
name: "AEP Energy Bridge"
state_topic: "event/metering/instantaneous_demand"
unit_of_measurement: 'W'
value_template: "{{ value_json.demand }}"
mqtt:
broker: 192.168.0.5
port: 2883
client_id: home-assistant-1
Any reason not to configure the existing MQTT broker to connect to the energy bridge directly (as shown in several of the the replies above)? That what I do with mosquito (my broker), and that seems simpler than relying on another process to act as a relay.
Also, for what it’s worth… I don’t log the “instantaneous demand” topic any more since it’s just that: an “instantaneous” reading of the power being used at the exact time the reading was taken. If a hair dryer using 1500W was turned off just prior to the instantaneous reading, it wouldn’t show any of the energy impact from the hair dryer. All those frequent instantaneous readings were just taking up space in the recorder / history database.
The useful reading is the “minutely summation”, which is actually measured in “Wmin” (watt-minutes), a unit of energy. Instead of being an instantaneous look at how much power is being used, this tells you how much energy was used in the last minute—even if a load was present for only part of that minute.
Since Wmin are not a very common unit, I use a template sensor to convert the reading to kWh (kilowatt-hours), which is the same unit commonly reported by other energy sensors (via MQTT with Tasmota, for example) so they can all appear on the same history graph.
For example:
sensor:
- platform: mqtt
name: Energy Usage
state_topic: "event/metering/summation/minute"
# technically “Wmin” but using “W” lets it appear on other “power” graphs
unit_of_measurement: W
value_template: "{{ value_json.value }}"
- platform: template
sensors:
household_energy_kwh:
friendly_name: Household Energy
value_template: "{{ 'unknown' if states('sensor.energy_usage') == 'unknown' else (states('sensor.energy_usage') | float / 60 / 1000) | round(2) }}"
unit_of_measurement: kWh
I feed the raw minutely summation data to the Utility Meter service to accumulate daily and monthly totals, like this:
I appreciate the suggestions, but none of these are working for me on Home Assistant OS 5.9. I’m just going to chalk it up as a lesson not to upgrade things that are working.
I thought I’d try to get this working for me, so I tried connecting through MQTT Explorer to verify it had MQTT running.
Well it connects with any user and password, but no topics are seen.
I got it working.
Ends up MQTT Explorer in Windows and some of the other apps don’t like the Energy Bridge server for some reason. Mosquitto_sub on the raspberry pi worked, but then I couldn’t get the Mosquitto Broker Add-on to act as a bridge using the gui confguration.
I tried adding the mosquitto directory and conf file to the config/share directory and the add-on couldn’t find conf file. I ended up using putty to get into the debug interface and adding the mosquitto directory to /mnt/data/supervisor/share which with the customize.active option set to true in the gui got it to act as a bridge.