Hello,
I want to read the data value from this html code: <span class="mainValueAmount" data-peak="19980" data-value="123" data-timestamp="2016-11-23T17:00:00">123</span>
The 123 value looks to be loaded asynchronously, the dash is a placeholder until the fetch returns the real value, so the sensor parses it before the real data gets loaded.
Hi,
and is it also not possible to get the â2482â value out of this html code from the same website: <span id="ctl00_ContentPlaceHolder1_PublicPagePlaceholder1_PageUserControl_ctl00_PublicPageLoadFixPage_energyYieldWidget_energyYieldValue" class="mainValueAmount simpleTextFit">2482</span>
My Sunny Portal page cannot currently be made publicly available. Does anyone know what the code should look like for a non-publicly available page of the Sunny Portal site. I tried the following with no luck:
scrape: Error on device update!
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 244, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/app/homeassistant/helpers/entity.py", line 327, in async_device_update
yield from self.hass.async_add_job(self.update)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/sensor/scrape.py", line 120, in update
value = raw_data.select(self._select)[0].text
IndexError: list index out of range
How do I find the âpublic pageâ address for my instance? This looks like a solution to my desire to extract certain information about my solar production but I donât know the public page address. Can this be used with the regular log in site as well???
I have a 3600TL-21 with no webconnect and cannot get modbus working so have tried the âscrapeâ method - with parts of Freshhats code I have got the total PV kWh out. But I really need the realtime Watts value that his code does not seem to provide me.
The value seems to be in the following webpage code (current value is â0â). I would be really grateful if anyone could help me get the Home Assistant scrape parameters right to get this value out?
Thanks in advance.
Found same issue as Marius82 - the webpage has a â-â in place before it updates with the real number and the scrape does not have any delay capability so only reads the â-â â hence does not work
Hello,
have solved the problem. The web address was wrong. It does not go the general web address. In sunnyportal the specific public page must be activated for the user. See above.
Hi, thanks for the very helpful configuration examples.
I managed to scrape the sensors described by @Marius82
Now I wonder if itâs possible to get the sensor of â.mainValueAmountâ somehow.
Any ideas?