Help running a script via AppDaemon

Hello,

thanks again for the help.

 I have now created a sensor as a test:
# PV-Anlage Sensoren aus "sma power"
  - platform: template
    sensors:
      pv_ertrag_aktuell:
        friendly_name: "PV-Ertrag Aktuell"
        unit_of_measurement: "Watt"
        value_template:  "{{ state_attr('sensor.sma_power', 'PV') }}"
        icon_template: mdi:solar-power

Update: that's how it works too.

And can you think of anything else how I can get the consumption values ​​of consumers?

Thanks.

Kind regards, Werner

Could you describe with more details what you mean by “consumption values”? Do you expect something that your SMA is aware ? Or lookink for a way to capture this in your home (fridge, oven, …) ? I am not sure I correctly understand what you try to achieve/collect.

Achso Sorry.
Ich habe Steckdosen von SMA die Steuern und messen können. Im Sunnyportal findet man die Werte unter Verbraucher.

Gruß Werner

I see. This is likely possible but requires some investigation to discover the APIs to retrieve these. This would require “development skills”. There is a tool called “Fiddler” allowing to capture the dialog between a browser & SMA allowing to identify the API calls the webpage is doing. Then these calls can be repeated using Python code (running under Appdaemon4).

Not sure I can help more on that one.

Ohhh this is getting too technical for me. Perhaps at some point the SMA integration will be better. Until then, I’ll use the above variant.
Thank you again

Hello,

I have to disturb you again.
Updated to version 2022.5.3 today. Unfortunately, the SMA no longer works.
Here the log:

[13:04:50] INFO: Starting AppDaemon...
2022-05-12 13:04:52.842754 INFO AppDaemon: AppDaemon Version 4.2.1 starting
2022-05-12 13:04:52.844409 INFO AppDaemon: Python version is 3.9.7
2022-05-12 13:04:52.845583 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2022-05-12 13:04:52.846460 INFO AppDaemon: Added log: AppDaemon
2022-05-12 13:04:52.847057 INFO AppDaemon: Added log: Error
2022-05-12 13:04:52.847634 INFO AppDaemon: Added log: Access
2022-05-12 13:04:52.848221 INFO AppDaemon: Added log: Diag
2022-05-12 13:04:52.900657 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2022-05-12 13:04:52.992960 INFO HASS: HASS Plugin Initializing
2022-05-12 13:04:52.993580 INFO HASS: HASS Plugin initialization complete
2022-05-12 13:04:52.994883 INFO AppDaemon: Initializing HTTP
2022-05-12 13:04:52.995889 INFO AppDaemon: Using 'ws' for event stream
2022-05-12 13:04:53.007067 INFO AppDaemon: Starting API
2022-05-12 13:04:53.014935 INFO AppDaemon: Starting Admin Interface
2022-05-12 13:04:53.015997 INFO AppDaemon: Starting Dashboards
2022-05-12 13:04:53.057533 INFO HASS: Connected to Home Assistant 2022.5.3
2022-05-12 13:04:53.084837 INFO AppDaemon: App 'hello_world' added
2022-05-12 13:04:53.091551 INFO AppDaemon: App 'sma' added
2022-05-12 13:04:53.094074 INFO AppDaemon: Found 2 total apps
2022-05-12 13:04:53.095381 INFO AppDaemon: Starting Apps with 2 workers and 2 pins
2022-05-12 13:04:53.097728 INFO AppDaemon: Running on port 5050
2022-05-12 13:04:53.281316 INFO HASS: Evaluating startup conditions
2022-05-12 13:04:53.305821 INFO HASS: Startup condition met: hass state=RUNNING
2022-05-12 13:04:53.307527 INFO HASS: All startup conditions met
2022-05-12 13:04:53.371381 INFO AppDaemon: Got initial state from namespace default
2022-05-12 13:04:55.119427 INFO AppDaemon: Scheduler running in realtime
2022-05-12 13:04:55.129433 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2022-05-12 13:04:55.134644 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/hello.py
2022-05-12 13:04:55.148893 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/sma.py
2022-05-12 13:04:55.614930 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2022-05-12 13:04:55.619336 INFO AppDaemon: Initializing app sma using class sma_bridge from module sma
2022-05-12 13:04:55.815500 INFO hello_world: Hello from AppDaemon
2022-05-12 13:04:55.817983 INFO hello_world: You are now ready to run Apps!
2022-05-12 13:04:55.824433 INFO sma: Initialize sma_bridge
2022-05-12 13:04:55.834851 INFO sma: sma_bridge: Sunrise
2022-05-12 13:04:55.840541 INFO sma: End sma_bridge
2022-05-12 13:04:55.843926 INFO AppDaemon: App initialization complete
2022-05-12 13:08:59.667942 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:04.690906 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:09.707622 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:14.727777 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:19.741287 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:24.756372 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:30.043089 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:40.187715 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:45.283427 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:50.307075 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:53.997580 WARNING HASS: Error getting services - retrying
Task exception was never retrieved
future: <Task finished name='Task-97' coro=<HassPlugin.run_hass_service_check() done, defined at /usr/lib/python3.9/site-packages/appdaemon/plugins/hass/hassplugin.py:783> exception=ClientResponseError(RequestInfo(url=URL('http://supervisor/core/api/services'), method='GET', headers=<CIMultiDictProxy('Host': 'supervisor', 'Authorization': 'Bearer 9670ee64c636dc03432dc569a41b59ec9ddc19067ca835afd71c651d99401ab9f0e335f894d12da80bd315c77f2a002c6c18849f16c68d1b', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Python/3.9 aiohttp/3.8.1')>, real_url=URL('http://supervisor/core/api/services')), (), status=502, message='Bad Gateway', headers=<CIMultiDictProxy('Content-Type': 'text/plain; charset=utf-8', 'Content-Length': '16', 'Date': 'Thu, 12 May 2022 11:09:53 GMT', 'Server': 'Python/3.9 aiohttp/3.8.1')>)>
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/appdaemon/plugins/hass/hassplugin.py", line 792, in run_hass_service_check
    hass_services = await self.get_hass_services()
  File "/usr/lib/python3.9/site-packages/appdaemon/plugins/hass/hassplugin.py", line 754, in get_hass_services
    r.raise_for_status()
  File "/usr/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 502, message='Bad Gateway', url=URL('http://supervisor/core/api/services')
2022-05-12 13:09:55.336501 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-12 13:09:56.381834 INFO sma: SMA Logon :200
2022-05-12 13:09:56.454968 WARNING sma: ------------------------------------------------------------
2022-05-12 13:09:56.456770 WARNING sma: Unexpected error in worker for App sma:
2022-05-12 13:09:56.458122 WARNING sma: Worker Ags: {'id': '968e280097454750a0273d096fa9c729', 'name': 'sma', 'objectid': 'b636ec93d4c74ed8bf9d7b85e4699cd5', 'type': 'scheduler', 'function': <bound method sma_bridge.run_every_c of <sma.sma_bridge object at 0x7fa56b5910>>, 'pin_app': True, 'pin_thread': 1, 'kwargs': {'interval': 300, '__thread_id': 'thread-1'}}
2022-05-12 13:09:56.459455 WARNING sma: ------------------------------------------------------------
2022-05-12 13:09:56.461349 WARNING sma: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/appdaemon/threading.py", line 904, in worker
    funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
  File "/config/appdaemon/apps/sma.py", line 40, in run_every_c
    myj = self.getSMAData()
  File "/config/appdaemon/apps/sma.py", line 144, in getSMAData
    myj = json.loads(myhtml)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)
2022-05-12 13:09:56.463097 WARNING sma: ------------------------------------------------------------
2022-05-12 13:10:00.900911 INFO HASS: Connected to Home Assistant 2022.5.3
2022-05-12 13:10:02.484933 INFO HASS: Evaluating startup conditions
2022-05-12 13:10:02.525675 INFO HASS: Startup condition met: hass state=RUNNING
2022-05-12 13:10:02.527189 INFO HASS: All startup conditions met
2022-05-12 13:10:02.628064 INFO AppDaemon: Processing restart for HASS
2022-05-12 13:10:02.629581 INFO AppDaemon: Terminating hello_world
2022-05-12 13:10:02.632954 INFO AppDaemon: Terminating sma
2022-05-12 13:10:02.636068 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2022-05-12 13:10:02.645471 INFO AppDaemon: Initializing app sma using class sma_bridge from module sma
2022-05-12 13:10:02.655210 INFO hello_world: Hello from AppDaemon
2022-05-12 13:10:02.658342 INFO hello_world: You are now ready to run Apps!
2022-05-12 13:10:02.664324 INFO sma: Initialize sma_bridge
2022-05-12 13:10:02.680112 INFO sma: sma_bridge: Sunrise
2022-05-12 13:10:02.693109 INFO sma: End sma_bridge
2022-05-12 13:10:05.624778 INFO HASS: Registering new service notify/alexa_media_last_called

Do you know what could be the reason?

Thanks.

Greeting Werner

The result of the calls to the SMA containts an invalid character that prevent the load of the data into a JSON structure.

Could you add the print(myhtml) line in the code so we can see the data before loading them in JSON ?

    response = session.get(url,headers=myheaders)
    if response.status_code == 200:
        myhtml = response.content
        print(myhtml)
        myj = json.loads(myhtml)
        log("getSMAData:" + str(myj))
    else:
        log ("Error SMA getSMAData:" + myhtml)
        myj = {"PV": "Error"}
    return myj

Hello and thanks for the help.
I changed the last paragraph like this. I don’t understand what the update broke there.
The log now looks like this (I hope there is no sensitive information in there):

rom module sma
2022-05-13 13:48:54.026451 INFO sma: Initialize sma_bridge
2022-05-13 13:48:54.039087 INFO sma: sma_bridge: Sunrise
2022-05-13 13:48:54.046358 INFO sma: End sma_bridge
2022-05-13 13:53:54.321026 INFO sma: SMA Logon :200
b'\r\n\r\n<!DOCTYPE html>\r\n<!--[if IE 8]><html class="ie8 oldie"><![endif]-->\r\n<!--[if IE 9 ]><html class="ie9"><![endif]-->\r\n<!--[if gt IE 9]><!--><html><!--<![endif]-->\r\n    <head id="ctl00_Head">\r\n        <!-- OneTrust Cookie-Einwilligungshinweis \xe2\x80\x93 Anfang f\xc3\xbcr www.sunnyportal.com -->\r\n        <script type="text/javascript" src="https://cdn.cookielaw.org/consent/9b0fa120-418b-4cda-bfed-b1e439ad6f96-test/OtAutoBlock.js" ></script>\r\n        <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="9b0fa120-418b-4cda-bfed-b1e439ad6f96-test" ></script>\r\n        <script type="text/javascript">\r\n            function OptanonWrapper() { }\r\n        </script>\r\n        <!-- OneTrust-Cookie-Einwilligungshinweis \xe2\x80\x93 Ende f\xc3\xbcr www.sunnyportal.com -->\r\n        <meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>\r\n\tSMA Solar Technology AG - Sunny Portal\r\n</title><link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" /><link rel="apple-touch-icon" href="../apple-touch-icon.png" />\r\n    <link rel="stylesheet" href="/dist/css/sma.theme.css?v=8.10.0.16"/>\r\n\r\n    <link rel="stylesheet" href="/dist/css/sma.webforms.css?v=8.10.0.16"/>\r\n\r\n\r\n<!--[if IE ]>\r\n<link rel="stylesheet" type="text/css" href="/Content/themes/redesign/webforms.ie.css" />\r\n<![endif]-->\r\n\r\n    <link rel="stylesheet" href="/dist/css/sma.modules.css?v=8.10.0.16"/>\r\n<link rel="stylesheet" type="text/css" href="/Content/Login/RedesignMaster.css" /><link rel="stylesheet" type="text/css" href="/Tools/css/form/form.css" /><link rel="stylesheet" type="text/css" href="/Tools/css/shadowbox/shadowbox.css" />\r\n\r\n\r\n\r\n<script src="/Scripts/require.js?v=8.10.0.16"></script>\r\n<script src="/Scripts/requirejs-config.js?v=8.10.0.16"></script>\r\n<script>\r\n    requirejs.config({ urlArgs: \'v=8.10.0.16\' });\r\n    (function (global, name, factory) {\r\n        global.SMA = global.SMA || {};\r\n        global.SMA[name] = factory();\r\n    }(this, \'version\', function () {\r\n        return \'8.10.0.16\';\r\n    }));\r\n</script>\r\n\r\n<script src="/Translation/culture.en-US.js?v=8.10.0.16"></script>\r\n<script>\r\n    (function (global, name, factory) {\r\n        global.SMA = global.SMA || {};\r\n        global.SMA[name] = factory();\r\n    }(window || this, \'timezone\', function () {\r\n        return {\r\n            standardName: \'W. Europe Standard Time\'\r\n        };\r\n    }));\r\n</script>\r\n<script>\r\n    (function (global, name, factory) {\r\n        global.SMA = global.SMA || {};\r\n        global.SMA[name] = factory();\r\n    }(window || this, \'translation\', function () {\r\n        require([\'sma-translation\'], function (Translation) {\r\n            \r\n                Translation.add(\'dataTables\', {\r\n                \r\n                    \'Pagination_FirstPage\': \'First page\',\r\n                \r\n                    \'Pagination_LastPage\': \'Last page\',\r\n                \r\n                    \'Pagination_NextPage\': \'Next page\',\r\n                \r\n                    \'Pagination_PrevPage\': \'Previous page\',\r\n                \r\n                    \'NoData\': \'No data\',\r\n                \r\n                    \'ASA_UserPlantList_Datatable_sInfo\': \'_START_ to _END_ of _TOTAL_ entries\',\r\n                \r\n                    \'ASA_UserPlantList_Datatable_sInfoFiltered\': \' (filtered from a total of _MAX_ entries)\',\r\n                \r\n                    \'ASA_UserPlantList_Datatable_sLengthMenu\': \'Show _MENU_ entries\',\r\n                \r\n                    \'Mode_loading\': \'Loading...\',\r\n                \r\n                    \'search\': \'Search\',\r\n                \r\n                    \'ASA_UserPlantList_Datatable_plugins_ColVis_buttonText\': \'Hide/show columns\',\r\n                \r\n                    \'sort_descending_title\': \'Sort in descending order\',\r\n                \r\n                    \'sort_ascending_title\': \'Sort in ascending order\',\r\n                \r\n                    \'ShowHideColumns\': \'Hide / show columns\',\r\n                \r\n                });\r\n            \r\n                Translation.add(\'datePicker\', {\r\n                \r\n                    \'closeText\': \'Close\',\r\n                \r\n                    \'prevText\': \'Back\',\r\n                \r\n                    \'nextText\': \'Next\',\r\n                \r\n                    \'currentText\': \'Today\',\r\n                \r\n                    \'yearSuffix\': \'Year\',\r\n                \r\n                });\r\n            \r\n                Translation.add(\'colorPicker\', {\r\n                \r\n                    \'cancelText\': \'Cancel\',\r\n                \r\n                    \'chooseText\': \'Select\',\r\n                \r\n                    \'clearText\': \'Clear color selection\',\r\n                \r\n                    \'noColorSelectedText\': \'No color selected\',\r\n                \r\n                    \'togglePaletteMoreText\': \'More\',\r\n                \r\n                    \'togglePaletteLessText\': \'Less\',\r\n                \r\n                });\r\n            \r\n                Translation.add(\'intro\', {\r\n                \r\n                    \'nextLabel\': \'Next\',\r\n                \r\n                    \'prevLabel\': \'Back\',\r\n                \r\n                    \'skipLabel\': \'Close\',\r\n                \r\n                    \'doneLabel\': \'Close\',\r\n                \r\n                    \'IntroNewFeature\': \'New function\',\r\n                \r\n                    \'IntroTryItOut\': \'Try it out!\',\r\n                \r\n                    \'IntroShopButton\': \'You can see the access to the new SMA\xc2\xa0Online\xc2\xa0Store here. With this you have the option of purchasing fee-based add-ons for your Sunny\xc2\xa0Portal systems.\',\r\n                \r\n                    \'IntroProfessionalPackage\': \'Begin with the Sunny Portal Professional Package and raise monitoring with Sunny\xc2\xa0Portal to the next level. With the free-of-charge Demo Package you will receive full access to the new functions for four weeks. Further information is available at {{{link}}}.\',\r\n                \r\n                    \'IntroShopName\': \'SMA Online Store\',\r\n                \r\n                    \'IntroPlantLogTitle\': \'Update\',\r\n                \r\n                    \'IntroPlantLogText\': \'We have optimized the mode of operation of the <strong>PV system logbook</strong>.<br>From now on you will see all messages on one page.<br>Confirming events will therefore be significantly simpler.\',\r\n                \r\n                });\r\n            \r\n                Translation.add(\'areYouSure\', {\r\n                \r\n                    \'message\': \'You have unsaved changes.\',\r\n                \r\n                    \'NotSupportedBrowser\': \'This function is unfortunately not currently available for the web browser {0}. Please use an alternative web browser.\',\r\n                \r\n                });\r\n            \r\n                Translation.add(\'validation\', {\r\n                \r\n                    \'error_required\': \'The field "{0}" is required.\',\r\n                \r\n                    \'error_string_max_length\': \'The field "{0}" may contain a maximum of {1} characters.\',\r\n                \r\n                    \'error_invalid_company_tax_id\': \'The entry in the field "Company VAT number" is invalid.\',\r\n                \r\n                    \'validation_number\': \'Enter a valid number.\',\r\n                \r\n                });\r\n            \r\n        });\r\n    }));\r\n</script>\r\n\r\n<script>\r\n    (function (global, name, factory) {\r\n        global.SMA = global.SMA || {};\r\n        global.SMA[name] = factory();\r\n    }(window || this, \'user\', function () {\r\n        return {\r\n            checkoutid:  \'20269835-d957-46a7-8201-d530ddce75ca\',\r\n            userid:     \'8925bac5-e7a2-432f-b285-2b9c9461c23e\'\r\n        };\r\n    }));\r\n</script>\r\n\r\n<!-- Google Tag Manager -->\r\n<script>(function (w, d, s, l, i) {\r\n        w[l] = w[l] || []; w[l].push({\r\n            \'gtm.start\':\r\n                new Date().getTime(), event: \'gtm.js\'\r\n        }); var f = d.getElementsByTagName(s)[0],\r\n            j = d.createElement(s), dl = l != \'dataLayer\' ? \'&l=\' + l : \'\'; j.async = true; j.src =\r\n                \'https://www.googletagmanager.com/gtm.js?id=\' + i + dl; f.parentNode.insertBefore(j, f);\r\n    })(window, document, \'script\', \'dataLayer\', \'GTM-NHCRX49\');</script>\r\n<!-- End Google Tag Manager -->\r\n\r\n\r\n    <script src="/dist/js/sma.scripts.min.js?v=8.10.0.16"></script>\r\n    <script src="/dist/js/sma.webmodules.min.js?v=8.10.0.16"></script>\r\n    <script src="/dist/js/sma.sp.min.js?v=8.10.0.16"></script>\r\n\r\n\r\n<script>\r\n    require([\'sp-init-main\'], function (sp) {\r\n        sp.init();\r\n    });\r\n</script>\r\n<meta http-equiv="expires" content="-1"></meta><meta http-equiv="cache-control" content="no-cache"></meta><meta http-equiv="Pragma" content="no-cache"></meta></head>\r\n    <body id="ctl00_theBody" class="no_navi" data-lang="en-US">\r\n        \r\n\r\n<!-- Google Tag Manager (noscript) -->\r\n<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NHCRX49"\r\n                  height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>\r\n<!-- End Google Tag Manager (noscript) -->\r\n        <form method="post" action="./Start.aspx?ReturnUrl=%2fDashboard" id="aspnetForm">\r\n<div class="aspNetHidden">\r\n<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />\r\n<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />\r\n<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="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" />\r\n</div>\r\n\r\n<script type="text/javascript">\r\n//<![CDATA[\r\nvar theForm = document.forms[\'aspnetForm\'];\r\nif (!theForm) {\r\n    theForm = document.aspnetForm;\r\n}\r\nfunction __doPostBack(eventTarget, eventArgument) {\r\n    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {\r\n        theForm.__EVENTTARGET.value = eventTarget;\r\n        theForm.__EVENTARGUMENT.value = eventArgument;\r\n        theForm.submit();\r\n    }\r\n}\r\n//]]>\r\n</script>\r\n\r\n\r\n<script src="/WebResource.axd?d=pynGkmcFUV13He1Qd6_TZJ4qc2_vmfrraa2h7lAwuQBJAX0PQkfPbckD5m6F7bHEpJv_PQ2&amp;t=637563247610391144" type="text/javascript"></script>\r\n\r\n<script type="text/javascript">\n<!--\n\tdocument.onkeypress = function onKeyPress(e) {\n\t\tif (e.which == 13) {\n\t\t\tif (!isMultiLineTextElement(e.target)) {\n\t\t\t\tvar ctl = document.getElementById(\'ctl00_ContentPlaceHolder1_Logincontrol1_LoginBtn\');\n\t\t\t\tif (ctl != null) {\n\t\t\t\t\t__doPostBack(\'ctl00$ContentPlaceHolder1$Logincontrol1$LoginBtn\',\'ServerReturn\');\n\t\t\t\t\te.cancelBubble = true;\n\t\t\t\t\te.returnValue = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isMultiLineTextElement(elem) {\n\t\treturn (elem.tagName == "TEXTAREA");}\n\tfunction isAnchor(elem) {\n\t\treturn (elem.tagName == "A");}\n// -->\n</script>\n\r\n<div class="aspNetHidden">\r\n\r\n\t<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="4E24AF74" />\r\n</div>\r\n           <div id="main" class="main">\r\n                <!-- Head -->\r\n                <div class="divHeaderLanguage"> <!-- empty class to override it (wizard) --> \r\n                    \r\n<!-- Head -->\r\n<table cellpadding="0" cellspacing="0" style="height:80px;width:100%">\r\n<tr>\r\n   <td style="width:150px">\r\n       <a id="ctl00_HeaderLanguageMenuControl_LinkButtonStart" href="javascript:__doPostBack(&#39;

Here is the second part of the log:

id="ctl00_HeaderLanguageMenuControl_lang_el-gr" class="lang_el-gr" href="javascript:__doPostBack(&#39;ctl00$HeaderLanguageMenuControl$lang_el-gr&#39;,&#39;&#39;)">\xce\x95\xce\xbb\xce\xbb\xce\xb7\xce\xbd\xce\xb9\xce\xba\xce\xac</a></li><li><a id="ctl00_HeaderLanguageMenuControl_lang_pt-pt" class="lang_pt-pt" href="javascript:__doPostBack(&#39;ctl00$HeaderLanguageMenuControl$lang_pt-pt&#39;,&#39;&#39;)">Portugu\xc3\xaas</a></li><li><a id="ctl00_HeaderLanguageMenuControl_lang_nl-nl" class="lang_nl-nl" href="javascript:__doPostBack(&#39;ctl00$HeaderLanguageMenuControl$lang_nl-nl&#39;,&#39;&#39;)">Nederlands</a></li><li><a id="ctl00_HeaderLanguageMenuControl_lang_ja-jp" class="lang_ja-jp" href="javascript:__doPostBack(&#39;ctl00$HeaderLanguageMenuControl$lang_ja-jp&#39;,&#39;&#39;)">\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e</a></li><li><a id="ctl00_HeaderLanguageMenuControl_lang_tr-tr" class="lang_tr-tr" href="javascript:__doPostBack(&#39;ctl00$HeaderLanguageMenuControl$lang_tr-tr&#39;,&#39;&#39;)">T\xc3\xbcrk\xc3\xa7e</a></li><li><a id="ctl00_HeaderLanguageMenuControl_lang_pl-pl" class="lang_pl-pl" href="javascript:__doPostBack(&#39;ctl00$HeaderLanguageMenuControl$lang_pl-pl&#39;,&#39;&#39;)">Polski</a></li></ul>\r\n        </li>\r\n    </ul>\r\n    </div>\r\n    \r\n        <div style="float:left; padding-top:17px; color:red; font-weight:bold; font-size:12px;">\r\n            \r\n        </div>\r\n   </td>\r\n   <td><a href="http://www.sma.de" target="_blank" class="right">\r\n        <img src="/Images/img/sma_logo.png" border="0" title="SMA" alt="SMA" align="right" /></a>\r\n   </td>\r\n </tr>\r\n</table>\r\n  \r\n                </div>\r\n                <div style="height:25px">&nbsp;</div>             \r\n                 <!-- Content -->\r\n                <div id="content" class="content" style="float:left;border:0;padding:0;">\r\n                 \r\n    <!-- Keyvisual -->\r\n        <div style="margin-bottom: 20px;">\r\n            <div style="position:relative; float:left; width:715px; height:250px; margin-right:20px;">\r\n                <a id="HyperLinkHoManBanner" href="http://www.sma.de/en/products/monitoring-control/sunny-home-manager.html" target="_blank" style="display:inline-block;height:250px;width:715px;position:absolute; left:0px; top:0px; background-color:#fff; display:none;"><img src="../Images/img/HoManBanner715.en-us.png" alt="" /></a>\r\n                <a id="HyperLinkWebConBanner" href="http://www.sma.de/en/products/monitoring-control/webconnect.html" target="_blank" style="display:inline-block;height:250px;width:715px;position:absolute; left:0px; top:0px; background-color:#fff; display:none;"><img src="../Images/img/banner_webconnect_en.png" alt="" /></a>\r\n                <a id="SdWebBanner" href="http://www.sunnydesignweb.com/sdweb/SunnyDesign/Home?language=en" target="_blank" style="display:inline-block;height:250px;width:715px;position:absolute; left:0px; top:0px; background-color:#fff; display:none;"><img src="../Images/img/banner_sd_web_en.png" alt="" /></a>\r\n                <a id="SunnyPlacesBanner" href="http://www.sunnyplaces.com" target="_blank" style="display:inline-block;height:250px;width:715px;position:absolute; left:0px; top:0px; background-color:#fff; display:none;"><img src="../Images/img/sunnyplaces_715x250_en.jpg" alt="" /></a>\r\n                <a id="ProPackageBanner" AlternateText="ProPackage" href="http://www.sma.de/en/products/monitoring-control/sunny-portal.html#Professional-Package-108543" target="_blank" style="display:inline-block;height:250px;width:715px;position:absolute; left:0px; top:0px; background-color:#fff; display:none;"><img src="../Images/img/BannerProPackage-en.png" alt="" /></a>\r\n                <img id="SPBanner" src="../Images/img/home715.en-us.jpg" alt="Photo" style="height:250px;width:715px;position:absolute; left:0px; top:0px; background-color:#fff;" />\r\n            </div>\r\n            <!-- Login -->\r\n            <div style="float:left; width:225px;">\r\n                \r\n<!-- Login -->\r\n\r\n<div class="box loginControl">\r\n    <h3 class="icons">\r\n        <span id="ctl00_ContentPlaceHolder1_Logincontrol1_LabelLogin" style="float: left;">Login</span>\r\n        <span class="icon user" style="float: right;">User</span>\r\n    </h3>\r\n    <div id="ctl00_ContentPlaceHolder1_Logincontrol1_DivLogin" class="content hasGrid">\r\n        <table id="ctl00_ContentPlaceHolder1_Logincontrol1_TableLogin" class="mainContent">\r\n\t<tr>\r\n\t\t<td colspan="2">\r\n                    <input name="ctl00$ContentPlaceHolder1$Logincontrol1$txtUserName" id="txtUserName" class="text no-bottom" type="email" placeholder="E-mail" autofocus="true" />\r\n                    \r\n                </td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td colspan="2">\r\n                    <input name="ctl00$ContentPlaceHolder1$Logincontrol1$txtPassword" type="password" id="txtPassword" class="text no-bottom" placeholder="Password" />\r\n                    \r\n                </td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td>\r\n                    <input type="submit" name="ctl00$ContentPlaceHolder1$Logincontrol1$LoginBtn" value="Login" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$Logincontrol1$LoginBtn&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_ContentPlaceHolder1_Logincontrol1_LoginBtn" class="button" />\r\n                </td>\r\n\t\t<td class="checkBoxCell">\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$RedirectURL" id="ctl00_ContentPlaceHolder1_Logincontrol1_RedirectURL" />\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$RedirectPlant" id="ctl00_ContentPlaceHolder1_Logincontrol1_RedirectPlant" />\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$RedirectPage" id="ctl00_ContentPlaceHolder1_Logincontrol1_RedirectPage" />\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$RedirectDevice" id="ctl00_ContentPlaceHolder1_Logincontrol1_RedirectDevice" />\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$RedirectOther" id="ctl00_ContentPlaceHolder1_Logincontrol1_RedirectOther" />\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$PlantIdentifier" id="ctl00_ContentPlaceHolder1_Logincontrol1_PlantIdentifier" />\r\n                    <input type="hidden" name="ctl00$ContentPlaceHolder1$Logincontrol1$ServiceAccess" id="ctl00_ContentPlaceHolder1_Logincontrol1_ServiceAccess" value="true" />\r\n                </td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td colspan="2">\r\n                    <a href="/Account/Register" target="_blank">I need a user account</a>\r\n                </td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td colspan="2">\r\n                    <span title="Note: this function should not be used on publicly available computers or when others have access to this computer."><input id="ctl00_ContentPlaceHolder1_Logincontrol1_MemorizePassword" type="checkbox" name="ctl00$ContentPlaceHolder1$Logincontrol1$MemorizePassword" /><label for="ctl00_ContentPlaceHolder1_Logincontrol1_MemorizePassword">Remain logged in</label></span>\r\n                </td>\r\n\t</tr>\r\n\t<tr>\r\n\t\t<td colspan="2" class="forgotPasswordCell">\r\n                    <a id="ctl00_ContentPlaceHolder1_Logincontrol1_ForgottenPwdLink" href="ForgotPassword.aspx">Forgotten password &#187;</a>\r\n                </td>\r\n\t</tr>\r\n</table>\r\n\r\n    </div>\r\n</div>\r\n<input type="hidden" name="ClientScreenWidth" id="ClientScreenWidth" value="" />\r\n<input type="hidden" name="ClientScreenHeight" id="ClientScreenHeight" value="" />\r\n<input type="hidden" name="ClientScreenAvailWidth" id="ClientScreenAvailWidth" value="" />\r\n<input type="hidden" name="ClientScreenAvailHeight" id="ClientScreenAvailHeight" value="" />\r\n<input type="hidden" name="ClientWindowInnerWidth" id="ClientWindowInnerWidth" value="" />\r\n<input type="hidden" name="ClientWindowInnerHeight" id="ClientWindowInnerHeight" value="" />\r\n<input type="hidden" name="ClientBrowserVersion" id="ClientBrowserVersion" value="" />\r\n<input type="hidden" name="ClientAppVersion" id="ClientAppVersion" value="" />\r\n<input type="hidden" name="ClientAppName" id="ClientAppName" value="" />\r\n<input type="hidden" name="ClientLanguage" id="ClientLanguage" value="" />\r\n<input type="hidden" name="ClientPlatform" id="ClientPlatform" value="" />\r\n<input type="hidden" name="ClientUserAgent" id="ClientUserAgent" value="" />\r\n\r\n<script type="text/javascript">\r\n    $(document).ready(function () {\r\n        $(\'#ClientScreenWidth\').val(screen.width);\r\n        $(\'#ClientScreenHeight\').val(screen.height);\r\n        $(\'#ClientScreenAvailWidth\').val(screen.availWidth);\r\n        $(\'#ClientScreenAvailHeight\').val(screen.availHeight);\r\n        $(\'#ClientWindowInnerWidth\').val(window.innerWidth);\r\n        $(\'#ClientWindowInnerHeight\').val(window.innerHeight);\r\n        //$(\'#ClientBrowserVersion\').val(navigator.appVersion);\r\n        $(\'#ClientAppVersion\').val(navigator.appVersion);\r\n        $(\'#ClientAppName\').val(navigator.appName);\r\n        $(\'#ClientLanguage\').val(navigator.language);\r\n        $(\'#ClientPlatform\').val(navigator.platform);\r\n        $(\'#ClientUserAgent\').val(navigator.userAgent);\r\n    });\r\n</script>\r\n \r\n            </div>\r\n            <div style="clear:left;"></div>\r\n        </div>\r\n        <div style="width:960px;">\r\n        <!-- Banner -->\r\n        <div style="float:left; width:225px; margin-right:20px;">\r\n            \r\n            \r\n            \r\n            \r\n            <a id="ctl00_ContentPlaceHolder1_EnergyApp_Banner" href="https://www.sma.de/en/products/apps-software/sma-energy-app.html" target="_blank"><img src="../Images/img/ENERGY_App_EN.png" alt="" /></a>\r\n        </div>\r\n        <div style="float:left; width:225px; margin-right:20px">\r\n            \r\n            <a id="ctl00_ContentPlaceHolder1_HyperLinkExamplePlants" href="../Templates/ExamplePlants.aspx"><img src="../Images/img/bspanlagen_en.jpg" alt="" /></a>\r\n        </div>\r\n        <div style="float:left; width:225px; margin-right:20px;">\r\n            \r\n            <a id="ctl00_ContentPlaceHolder1_HyperLinkPublicPlants" href="../Templates/PublicPagesPlantList.aspx"><img src="../Images/img/freiganlagen_en.jpg" alt="" /></a>\r\n        </div>\r\n        <div style="float:left; width:225px;">\r\n            <a id="ctl00_ContentPlaceHolder1_HyperLinkHoManSetup" href="../register"><img src="../Images/img/HoManSetup.en-us.png" alt="" /></a>\r\n        </div>\r\n        \r\n        \r\n        \r\n        \r\n        \r\n        \r\n        \r\n        \r\n        <div style="clear:left;padding-top:20px;">\r\n            \r\n            \r\n        </div>\r\n    </div>\r\n    <input type="hidden" name="ctl00$ContentPlaceHolder1$hiddenLanguage" id="hiddenLanguage" value="en-us" />\r\n\r\n<script>\r\n    (function () {\r\n        var counter = 0;\r\n        var bannerArray = ["#SPBanner"];\r\n        if (("cs-cz,de-de,el-gr,en-gb,en-us,es-es,fr-fr,it-it,nl-nl,pl-pl,pt-pt").indexOf($(\'#hiddenLanguage\').val()) >= 0) {\r\n            //bannerArray.push("#ProPackageBanner");\r\n        }\r\n        bannerArray.push("#HyperLinkHoManBanner", "#HyperLinkWebConBanner", "#SdWebBanner");\r\n\r\n        function switchBanners() {\r\n            $(bannerArray[counter % bannerArray.length]).fadeOut(1000);\r\n            $(bannerArray[(counter + 1) % bannerArray.length]).fadeIn(1000);\r\n            counter++;\r\n            setTimeout(switchBanners, 5000);\r\n        }\r\n\r\n        $(function () {\r\n            setTimeout(switchBanners, 3000);\r\n        });\r\n    })();\r\n</script>\r\n\r\n\r\n                </div>\r\n                <hr />\r\n            </div>\r\n            <br class="statusbarMargin" />\r\n            <div id="statusbar">\r\n                <span id="statusbarLoading">\t\t            \r\n                    <img src="../Images/loading.gif" width="62" height="23" alt="Loading" />\r\n                </span>\r\n                <span id="statusbarDesc">\r\n                \r\n\xc2\xa9 2022 SMA Solar Technology AG\r\n    &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    <a id="ctl00_HeaderNavigationMenuControl_HOME" href="javascript:__doPostBack(&#39;ctl00$HeaderNavigationMenuControl$HOME&#39;,&#39;&#39;)">Home</a>\r\n    &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    <a id="ctl00_HeaderNavigationMenuControl_INFO" href="javascript:__doPostBack(&#39;ctl00$HeaderNavigationMenuControl$INFO&#39;,&#39;&#39;)">Information</a>\r\n    &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    <a id="ctl00_HeaderNavigationMenuControl_MANUALS_HOMAN" href="javascript:__doPostBack(&#39;ctl00$HeaderNavigationMenuControl$MANUALS_HOMAN&#39;,&#39;&#39;)">User manuals</a>\r\n    &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    \r\n    <a id="ctl00_HeaderNavigationMenuControl_LinkFAQ" href="https://www.sma-service.com/en/faq-support.html" target="_blank">FAQ</a>\r\n    &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    <a id="ctl00_HeaderNavigationMenuControl_TERMS_AND_CONDITIONS" href="javascript:__doPostBack(&#39;ctl00$HeaderNavigationMenuControl$TERMS_AND_CONDITIONS&#39;,&#39;&#39;)">Terms of Use</a>\r\n    &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    <a id="ctl00_HeaderNavigationMenuControl_DATA_PROTECTION_DECLARATION" href="javascript:__doPostBack(&#39;ctl00$HeaderNavigationMenuControl$DATA_PROTECTION_DECLARATION&#39;,&#39;&#39;)">Data protection declaration</a>\r\n     &nbsp;&nbsp;|&nbsp;&nbsp;\r\n    <a id="ctl00_HeaderNavigationMenuControl_CONTACT" href="javascript:__doPostBack(&#39;ctl00$HeaderNavigationMenuControl$CONTACT&#39;,&#39;&#39;)">Legal Notice</a>\r\n\r\n\r\n\r\n                </span>\r\n            </div>\r\n            <div id="MouseTitleDiv" style="position:absolute; top:0px; left:0px; display:none;"></div>\r\n        \r\n\r\n<script type="text/javascript">\r\n//<![CDATA[\r\n$(\'#ClientBrowserVersion\').val(\'12\');//]]>\r\n</script>\r\n</form>\r\n        \r\n        <noscript>\r\n            <table cellpadding="0" cellspacing="0" class="ShadowBoxOuterFrame" id="Table1" style="z-index: 9999">\r\n                <tr>\r\n                    <td align="center" valign="middle">\r\n                        <table cellpadding="0" cellspacing="0" class="ShadowBoxInnerFrame">\r\n                            <tr>\r\n                                <td class="ShadowBoxCloseButtonRow" colspan="3"></td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class="ShadowBoxTopLeft"><img height="0" id="Img9" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                                <td class="ShadowBoxTop"><img height="0" id="Img10" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                                <td class="ShadowBoxTopRight"><img height="0" id="Img11" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class="ShadowBoxLeft"><img height="0" id="Img12" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                                <td class="ShadowBoxContent">\r\n                                    <div class="hasGrid" id="Div1" style="text-align:left; width:500px; margin-right:0px;">\r\n                                        <strong>Your Browser does not support JavaScript!</strong><br>\r\n                                        JavaScript is required to use Sunny Portal. Enable JavaScript your browsersettings and reload this Website to try again.<br>\r\n                                        <br>\r\n                                        <strong>Ihr Internetbrowser unterst\xc3\xbctzt JavaScript nicht!</strong><br>\r\n                                        JavaScript wird f\xc3\xbcr die Verwendung von Sunny Portal ben\xc3\xb6tigt. Aktivieren Sie JavaScript in den Einstellungen Ihres Internetbrowsers und aktualisieren Sie die Ansicht dieser Internetseite.\r\n                                    </div>\r\n                                </td>\r\n                                <td class="ShadowBoxRight"><img height="0" id="Img13" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                            </tr>\r\n                            <tr>\r\n                                <td class="ShadowBoxBottomLeft"><img height="0" id="Img14" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                                <td class="ShadowBoxBottom"><img height="0" id="Img15" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                                <td class="ShadowBoxBottomRight"><img height="0" id="Img16" src="~/Tools/images/shadowbox/spacer.gif" width="0"></td>\r\n                            </tr>\r\n                        </table>\r\n                    </td>\r\n                </tr>\r\n            </table>\r\n        </noscript>\r\n    </body>\r\n</html>'
2022-05-13 13:53:54.407481 WARNING sma: ------------------------------------------------------------
2022-05-13 13:53:54.409667 WARNING sma: Unexpected error in worker for App sma:
2022-05-13 13:53:54.410886 WARNING sma: Worker Ags: {'id': '60b5d72d87764fd3a4772a0a9919982a', 'name': 'sma', 'objectid': '20a153210092474a90ce8e41fdcd865a', 'type': 'scheduler', 'function': <bound method sma_bridge.run_every_c of <sma.sma_bridge object at 0x7fa5772bb0>>, 'pin_app': True, 'pin_thread': 1, 'kwargs': {'interval': 300, '__thread_id': 'thread-1'}}
2022-05-13 13:53:54.411690 WARNING sma: ------------------------------------------------------------
2022-05-13 13:53:54.413035 WARNING sma: Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/appdaemon/threading.py", line 904, in worker
    funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
  File "/config/appdaemon/apps/sma.py", line 40, in run_every_c
    myj = self.getSMAData()
  File "/config/appdaemon/apps/sma.py", line 145, in getSMAData
    myj = json.loads(myhtml)
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)
2022-05-13 13:53:54.414066 WARNING sma: ------------------------------------------------------------
2022-05-13 13:55:07.521502 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:12.541984 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:17.562606 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:22.581863 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:27.595240 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:32.607440 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:37.671788 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:48.333462 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:53.364727 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:55:58.391424 WARNING HASS: Disconnected from Home Assistant, retrying in 5 seconds
2022-05-13 13:56:07.037174 INFO HASS: Connected to Home Assistant 2022.5.4
2022-05-13 13:56:07.655241 INFO HASS: Evaluating startup conditions
2022-05-13 13:56:07.838677 INFO HASS: Startup condition met: hass state=RUNNING
2022-05-13 13:56:07.839933 INFO HASS: All startup conditions met
2022-05-13 13:56:07.969262 INFO AppDaemon: Processing restart for HASS
2022-05-13 13:56:07.970922 INFO AppDaemon: Terminating hello_world
2022-05-13 13:56:07.974031 INFO AppDaemon: Terminating sma
2022-05-13 13:56:07.977226 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2022-05-13 13:56:07.986607 INFO AppDaemon: Initializing app sma using class sma_bridge from module sma
2022-05-13 13:56:07.995687 INFO hello_world: Hello from AppDaemon
2022-05-13 13:56:07.999052 INFO hello_world: You are now ready to run Apps!
2022-05-13 13:56:08.008640 INFO sma: Initialize sma_bridge
2022-05-13 13:56:08.024267 INFO sma: sma_bridge: Sunrise
2022-05-13 13:56:08.037964 INFO sma: End sma_bridge
2022-05-13 13:56:12.297719 INFO HASS: Registering new service notify/alexa_media_last_called

It looks like there is a pop-up or something like that after the log-on. The code does not cover this situation. If confirmed, it should be there only for a couple of days. Can you confirm this pop-up ?

Hello,

Thank you for helping me.
No I can’t see a popup. I checked Homeassistant and sunnyportal.com.
The error is not due to the update as assumed. I used an old backup, the error is there too.

Where do I have to look for the popup?

Greeting Werner

OK. The code is making an API call and expect to receive a JSON structure in return. This is the expected behavior. Reality is that we receive a HTML page making impossible to load this as a JSON.
I checked on my side and I still receive the expected JSON format.

Not sure I understand why suddenly you receive HTML.

Please excuse the late replies. I’m on the road a lot these days.
It’s really strange. I haven’t changed anything, just the HA update.
It was going so well and suddenly it wasn’t anymore.

You have no idea what else I could try?

Greeting Werner

May be you could try putting the “HTML” in a text file and save it locally, then opening in a browser. May be we would get a clearer view on the “content” of this HTML page and why we don’t receive the precious JSON.

1 Like

Hello,

that was a great idea.
It appears to be a cookie query - see image. But how do I get rid of this?

Greeting Werner

It looks like you are having a login page so the code logon did not work. Did you change password or something like that ?

Hello,

no, I haven’t changed anything. I also checked the password. All right. I think it’s not the login page but the cookie banner at the bottom of the image. As long as I don’t confirm the cookies, it won’t go any further.

Greeting Werner

Hello again,

can I really not be helped anymore?
I took a closer look at the HTML code, it also contains text like (here are some excerpts):

<!-- OneTrust Cookie-Einwilligungshinweis \xe2\x80\x93 Anfang f\xc3\xbcr www.sunnyportal.com -->\r\n  
      <script type="text/javascript" src="https://cdn.cookielaw.org/consent/9b0fa120-418b-4cda-bfed-b1e439ad6f96-test/OtAutoBlock.js" ></script>\r\n     
   <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"

\'You can see the access to the new SMA\xc2\xa0Online\xc2\xa0Store here. With this you have the option of 
purchasing fee-based add-ons for your Sunny\xc2\xa0Portal systems.\',\r\n                \r\n                    
\'IntroProfessionalPackage\': \'Begin with the Sunny Portal Professional Package and raise monitoring with 
Sunny\xc2\xa0Portal to the next level. With the free-of-charge Demo Package you will receive full access to 
the new functions for four weeks. Further information is available at {{{link}}}.\',\r\n                \r\n                   
 \'IntroShopName\': \'SMA Online Store\',\r\n                \r\n                    \'IntroPlantLogTitle\': \'Update\',\r\n    
            \r\n                    \'IntroPlantLogText\': \'We have optimized the mode of operation of the <strong>PV 
system logbook</strong>.<br>From now on you will see all messages on one page.<br>Confirming events 
will therefore be significantly simpler.\',\r\n                \r\n

This function is unfortunately not currently available for the web browser {0}. Please use an alternative web browser.

 <strong>Your Browser does not support JavaScript!</strong><br>\r\n                                        
JavaScript is required to use Sunny Portal. Enable JavaScript your browsersettings and reload this Website to try again.<br>\r\n       

Unfortunately I don’t have the knowledge to find the error. Therefore I need help.

From my point of view there could be two reasons:

  1. Popup - Cookie Banner https://community-assets.home-assistant.io/original/4X/1/4/4/14461ce8971895ef41a00e49dbcae421e4fecf95.png
    When calling up the URL, a cookie query may appear that must first be confirmed. In the normal browser I can confirm this and it is then saved like this. Unfortunately, I don’t know how I can confirm this in HA.

  2. Any reason resulting from the above HTML texts.

Thank you for any help.

Greeting Werner

1 Like

Did anyone manage to solve this? I get the same issue when trying to fetch PV power value from sunny portal. See my error log below.

BR,
Anders

2023-01-09 15:03:59.849279 WARNING sma: ------------------------------------------------------------
2023-01-09 15:03:59.855036 WARNING sma: Unexpected error in worker for App sma:
2023-01-09 15:03:59.858211 WARNING sma: Worker Ags: {'id': '0f9921aaba224b4ea03fd1fb7037f84f', 'name': 'sma', 'objectid': 'e748f23308f24dcb99f8ef6bd903b181', 'type': 'scheduler', 'function': <bound method sma_bridge.run_every_c of <sma.sma_bridge object at 0x74c54d60>>, 'pin_app': True, 'pin_thread': 1, 'kwargs': {'interval': 300, '__thread_id': 'thread-1'}}
2023-01-09 15:03:59.861148 WARNING sma: ------------------------------------------------------------
2023-01-09 15:03:59.865651 WARNING sma: Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/appdaemon/threading.py", line 904, in worker
    funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
  File "/config/appdaemon/apps/sma.py", line 45, in run_every_c
    myj = self.getSMAData()
  File "/config/appdaemon/apps/sma.py", line 153, in getSMAData
    myj = json.loads(myhtml)
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 3 column 1 (char 4)
2023-01-09 15:03:59.867725 WARNING sma: ------------------------------------------------------------

Unfortunately not. Please let me know if there is a solution here.

Leider nicht. Bitte um Info wenn es hier eine Lösung gibt.