Dear luuuis, thank you for your hard work. Unfortunately, it seems that this integration does not work for me. I have an Mirubee Mirubox v1. I can access the web page to see the real time data, but not through the url: /en/status.xml, but through url: /index.html. Would there be any solution to be able to integrate the data from that Mirubee into HA.
Thank you very much
@Tarod1977 does the data update in real time without having to press the refresh button? If so, have a look at the browser developer tools to see how it is fetching the info.
Thank you very much for the reply @luuuis. Yes, the data is updated every second. Iām sorry, but Iām a complete newbie at this, do you mean something like this?
* Helper function to make a block element visible.
*
* @param node The node to be made block visible.
*/
function unHide (node){
node.style.display = 'block';
}
function recvSmartplug(status, respXml, respTxt) {
var spXml = parseResponse(respXml, respTxt);
var spRoot = spXml.getElementsByTagName('smartplug');
if (spRoot && spRoot.length > 0) {
getEle('apiver').innerHTML = getTagContent(spRoot[0], 'version');
getEle('sdkver').innerHTML = getTagContent(spRoot[0], 'sdk_version');
var pm = spRoot[0].getElementsByTagName('pm');
if (pm && pm.length > 0) {
var voltage01 = getTagContent(pm[0], 'volts');
var current01 = getTagContent(pm[0], 'current');
var power01 = getTagContent(pm[0], 'power');
var energy01 = getTagContent(pm[0], 'energy');
var reactivepower01 = getTagContent(pm[0], 'reactive_power');
getEle('voltage01').innerHTML = (voltage01 != null && voltage01 != "" && voltage01 != -1) ? voltage01
: "NA";
getEle('current01').innerHTML = (current01 != null && current01 != "" && current01 != -1) ? current01
: "NA";
getEle('power01').innerHTML = (power01 != null && power01 != "" && power01 != -1) ? power01
: "NA";
getEle('reactivepower01').innerHTML = (reactivepower01 != null && reactivepower01 != "" && reactivepower01 != -1) ? reactivepower01
: "NA";
if (energy01 != null && energy01 != "" && energy01 != -1) {
unHide(document.getElementById('energyDivId'));
getEle('energy01').innerHTML = energy01;
} else {
hide(document.getElementById('energyDivId'));
}
}
if (pm && pm.length > 0) {
var voltage02 = getTagContent(pm[0], 'vrms');
var current02 = getTagContent(pm[0], 'irms');
var power02 = getTagContent(pm[0], 'watt');
var energy02 = getTagContent(pm[0], 'kwh');
var reactivepower02 = getTagContent(pm[0], 'var');
getEle('voltage02').innerHTML = (voltage02 != null && voltage02 != "" && voltage02 != -1) ? voltage02
: "NA";
getEle('current02').innerHTML = (current02 != null && current02 != "" && current02 != -1) ? current02
: "NA";
getEle('power02').innerHTML = (power02 != null && power02 != "" && power02 != -1) ? power02
: "NA";
getEle('reactivepower02').innerHTML = (reactivepower02 != null && reactivepower02 != "" && reactivepower02 != -1) ? reactivepower02
: "NA";
if (energy02 != null && energy02 != "" && energy02 != -1) {
unHide(document.getElementById('energyDivId02'));
getEle('energy02').innerHTML = energy02;
} else {
hide(document.getElementById('energyDivId02'));
}
}
var type = getTagContent(spRoot[0], 'type');
/* if (type != null && type != āā) {
unHide(document.getElementById(āmodelDivIdā));
getEle(āmodelIdā).innerHTML = type;
} else {
hide(document.getElementById(āmodelDivIdā));
} */
var curTime, hr, ms, sec, suf;
curTime = new Date();
hr = curTime.getHours();
suf = ((hr > 11) ? ' PM' : ' AM');
hr = ((hr > 11) ? (hr - 12) : hr);
hr = (hr == 0) ? '12' : hr;
ms = curTime.getMinutes();
sec = curTime.getSeconds();
getEle("curTime").innerHTML = hr + ':'
+ ((ms > 9) ? ms : ('0' + ms)) + ':'
+ ((sec > 9) ? sec : ('0' + sec)) + suf;
}
}
function resetEnergy() {
var postXml = createXmlDoc('smartplug');
var pm = postXml.createElement('pm');
postXml.documentElement.appendChild(pm);
var energy = 0;
appendXmlElement(postXml, pm, 'energy', energy);
execPOST('/gainspan/profile/smartplug', postXml, function() {
});
}
/**
* Helper function to hide an element. Works for both block and inline elements.
*
* @param node The node to be hidden
*/
function hide(node) {
node.style.display = 'none';
}
function updateTimeOut() {
var newTimeOut = parseInt(getDropDownItemSelected());
if (newTimeOut >= 1 && newTimeOut <= 60) {
clearTimeout(timeOutId);
timeOutValue = newTimeOut * 1000;
timeOutId = setTimeout('updateSmartplug(1)', timeOutValue);
return true;
} else {
alert("Please enter the Valid Time Out between 1 and 60.");
return false;
}
}
function getDropDownItemSelected() {
var drop = document.getElementById('selRefresh');
return drop.options[drop.selectedIndex].value;
}
function getContentOfId(id) {
return document.getElementById(id).value;
}
function populateDropDown(min, max) {
var drop = document.getElementById('selRefresh');
var defaultTimeout = timeOutValue / 1000;
for ( var i = min, index = 0; i <= max; i++, index++) {
drop.options[index] = new Option(i, i, false);
}
drop.value = defaultTimeout;
}
function initialize() {
populateDropDown(1, 60);
updateSmartplug(true);
}
function updateSmartplug(refresh) {
var lsResult = execGET('/gainspan/profile/smartplug', recvSmartplug);
if (refresh == 1) {
timeOutId = setTimeout('updateSmartplug(1)', timeOutValue);
}
}
<div class="global">
<div class="logo">
<img src="pt_logo.jpg" alt="GainSpan" />
</div>
<br class="clear" />
<div class="header_text1" align="center">
<h1>CT Meter Web Application</h1>
<div class="clr"></div>
</div>
<div id="landing" class="section"></div>
<hr>
<div align="center">
<b>Channel1 Voltage </b> : <span id="voltage01" style="padding-left: 20px;" class="sumval"></span> Volts <br
class="clear" />
</div>
<div align="center">
<b>Channel1 Current</b> : <span id="current01" style="padding-left: 20px;" class="sumval"></span> Amps <br
class="clear" />
</div>
<div align="center">
<b>Channel1 Power</b>: <span id="power01" class="sumval" style="padding-left: 20px;"></span> Watt <br
class="clear" />
</div>
<div align="center">
<b>Channel1 Reactive Power</b>: <span id="reactivepower01" style="padding-left: 20px;" class="sumval"></span> Var <br
class="clear" />
</div>
<div align="center">
<div id="energyDivId">
<b>Channel1 Energy</b>: <span id="energy01" class="sumval" style="padding-left: 20px;"></span>KWH
<br
class="clear" />
</div>
<div align="center">
<b>Channel2 Voltage </b> : <span id="voltage02" style="padding-left: 20px;" class="sumval"></span> Volts <br
class="clear" />
</div>
<div align="center">
<b>Channel2 Current</b> : <span id="current02" style="padding-left: 20px;" class="sumval"></span> Amps <br
class="clear" />
</div>
<div align="center">
<b>Channel2 Power</b>: <span id="power02" class="sumval" style="padding-left: 20px;"></span> Watt <br
class="clear" />
</div>
<div align="center">
<b>Channel2 Reactive Power</b>: <span id="reactivepower02" style="padding-left: 20px;" class="sumval"></span> Var <br
class="clear" />
</div>
<div align="center">
<div id="energyDivId02">
<b>Channel2 Energy</b>: <span id="energy02" class="sumval" style="padding-left: 20px;"></span>KWH
<br
class="clear" />
</div>
Thank you for your help. In the end I created the sensors I wanted using web scraping and finding the page from which this page took the data, because it was a dynamic page.
Is anyone else having problems with the app/webui, since they announce (again - this week) the migration to Nest?
Ex:
App Circuit 1#: 162.3W
WebUI Circuit 1#: 165.6W
Turn off/on lamps, no changes. It simply stays stuckā¦
Also, canāt seem to be able to access the config with ip address.
Please check issue #48 where I explain in more detail where to set the IP address.
If the Web UI is not updating that will cause Home Assistant polling to also hang as it is caused by the well-known instability of /en/status.xml
endpoint. Local push should work well, however.
When I next spend some time on this I will make it so that local polling is avoided as much as possible, which will improve reliability exponentially.
It seems there was a problem with the old firmware - I was never able to update itā¦
The guys at Smilics offer to manually update the box, without costs.
Everything is working fine now.
Hi,
Do you know what url goes here when the wibeee is installed by iberdrola? in my case Iād to reset the wibeee to factory defaults and this is the address that appears. It works and I can read the values in the iberdrola app, I guess, because iberdrola ānameā resolves to the same ip address, but I would like to put here back the same value the installer set some months ago.
Thanks in advance!
Hi the āIberdrola vesionā was (canāt say with the new service, I stopped using these boxes and got Shelly EM instaed) not compatible with other versions. When I bought a second Wibeee in a shop I could not have both in the same website, one was only working with the Iberdrola website, the other only with the wibeee website. I got Smilics support to add my second meter to the Iberdrola āsideā, where I could combine the meters (one for solar, one for mains).
Then I ended up with massive firmware update issues when I started using Home Assistant, then I switched to Shelly EM and donāt regret itā¦
Hi. I have a mirubee box tri, and it was working well with this integration until i migrate and upgrade firmware to 4.4.167. After that, the api (xml) doesnt work anymore and i lost entity data. I deleted the integration and create again but, when i put the IP addres of the device, HA returns ācouldnt read device infoā. Any idea for get it work again please? firmware downgrade?
Thanks!!
Please create a ticket in GitHub so I can look into it. Make sure to include debug logs for faster troubleshooting.
Hi Luuuisā¦ finally i get it work after a factory reset and restart of the tribox. I dont know wayā¦ since before that its answer all pings and send data to nest cloud correctly.
Thanks in any case.
Thanks for the update. Your experience is not surprising as the deviceās API is known to be very unreliable. That is why I recommend a high polling interval and configuring Local Push support for frequent updates.
There is ongoing work to make Local Push Support compatible with devices from specific providers such as Iberdrola and SolarProfit so that data is uploaded to those services as well. Currently only Wibeee Nest is supported.
We would like more information regarding the Server URL
used by those devices so if you have one please get in touch in this GitHub issue.
Iām currently seeking testers for:
- Local only support (Local Push without sending to any Cloud)
- Other Clouds (SolarProfit, IberDrola, etc)
Please get in touch if interested.
Reach me if needed!
Iberdrola user here, reach out if interested. Have not been using the integration the last year due to problems with the integration earlier but am interested in trying again.
/Dennis
@DennisHagebrand can you check what Server URL you have for Iberdrola? So I can add it to the available options before I release an RC.
Hi,
Itās datosmonitorconsumo.iberdrola.es
Same port as on your picture.