Closed GoSpursGoNL closed 4 years ago
Can you post your config? (without username and password) I presume the API/web site urls have changed, they enabled https a while back, but couldn't get it to work by simply changing the url.
Yes, here it is. I did not change it since the last time the component worked.
sensor:
- platform: solarportal
host: www.omnikportal.com
port: 10000
username: MYUSERNAME
password: MYPASSWORD
scan_interval: 1800
resources:
- actualpower
- energytoday
There is a post on the website that there is a new app now, so I guessed the old API was removed:
Dear Customers,
Omnik old version APP has removed,and no running anymore. Please download new APP version (Omnik Portal) from the App Store.
If you use Android system, please go to Google play download: "Omnik Portal" https://play.google.com/store/apps/details?id=com.jialeinfo.omniksolar&hl=en
If you use iOS system, please go to iOS App store download: "Omnik Portal" https://itunes.apple.com/cn/app/id1246117091 Thank you so much for your notice. Omnik Team
I took a peek inside the new Android app, and the below urls can be found. They use a token based authentication now it seems. Did some searching, but I found no python or other code supporting this yet.
sources/com/jialeinfo/util/Configs.java: public static final String AccessTokenUrl = "https://api.omnikportal.com/v1/user/account_validate";
sources/com/jialeinfo/util/Configs.java: public static final String AddDataLogger = "https://api.omnikportal.com/v1/device/datalogger/add";
sources/com/jialeinfo/util/Configs.java: public static final String AddPlantUrl = "https://api.omnikportal.com/v1/plant/add";
sources/com/jialeinfo/util/Configs.java: public static final String AreasUrl = "https://api.omnikportal.com/v1/plant/areas";
sources/com/jialeinfo/util/Configs.java: public static final String C_User_ListUrl = "https://api.omnikportal.com/v1/user/c_user_list";
sources/com/jialeinfo/util/Configs.java: public static final String DOWNLOAD = "https://play.google.com/store/apps/details?id=com.jialeinfo.omniksolar";
sources/com/jialeinfo/util/Configs.java: public static final String DataLoggerDeleteUrl = "https://api.omnikportal.com/v1/device/datalogger/delete";
sources/com/jialeinfo/util/Configs.java: public static final String DataLoggerListUrl = "https://api.omnikportal.com/v1/device/datalogger/list";
sources/com/jialeinfo/util/Configs.java: public static final String DataLoggerModifyUrl = "https://api.omnikportal.com/v1/device/datalogger/modify";
sources/com/jialeinfo/util/Configs.java: public static final String DataLoggerSimUrl = "https://api.omnikportal.com/v1/device/datalogger/sim";
sources/com/jialeinfo/util/Configs.java: public static final String DeletePlantUrl = "https://api.omnikportal.com/v1/plant/delete";
sources/com/jialeinfo/util/Configs.java: public static final String DeviceListUrl = "https://api.omnikportal.com/v1/device/list";
sources/com/jialeinfo/util/Configs.java: public static final String DtailsUrl = "https://api.omnikportal.com/v1/plant/details";
sources/com/jialeinfo/util/Configs.java: public static final String HistoryEnergyUrl = "https://api.omnikportal.com/v1/plant/energy";
sources/com/jialeinfo/util/Configs.java: public static final String InverterAlarmModifyUrl = "https://api.omnikportal.com/v1/device/inverter/alarm_modify";
sources/com/jialeinfo/util/Configs.java: public static final String InverterAlarmUrl = "https://api.omnikportal.com/v1/device/inverter/alarm";
sources/com/jialeinfo/util/Configs.java: public static final String InverterDataUrl = "https://api.omnikportal.com/v1/device/inverter/data";
sources/com/jialeinfo/util/Configs.java: public static final String ListUrl = "https://api.omnikportal.com/v1/plant/list";
sources/com/jialeinfo/util/Configs.java: public static final String ModifyPlantUrl = "https://api.omnikportal.com/v1/plant/modify";
sources/com/jialeinfo/util/Configs.java: public static final String ModifyUrl = "https://api.omnikportal.com/v1/user/c_user_list";
sources/com/jialeinfo/util/Configs.java: public static final String PlantDataUrl = "https://api.omnikportal.com/v1/plant/data";
sources/com/jialeinfo/util/Configs.java: public static final String RegisterUrl = "https://api.omnikportal.com/v1/user/b_user_register";
sources/com/jialeinfo/util/Configs.java: public static final String StatisticUrl = "https://api.omnikportal.com/v1/plant/statistic";
sources/com/jialeinfo/util/Configs.java: public static final String TodayPowerUrl = "https://api.omnikportal.com/v1/plant/power";
sources/com/jialeinfo/util/Configs.java: public static final String UsageUrl = "https://api.omnikportal.com/v1/user/account_validate";
sources/com/jialeinfo/util/Configs.java: public static final String VersionUrl = "https://api.omnikportal.com/v1/version/current";
sources/com/jialeinfo/util/Configs.java: public static final String eUrl = "https://api.omnikportal.com/v1";
sources/com/jialeinfo/util/Configs.java: public static final String userLogin = "https://api.omnikportal.com/v1/user/account_validate";
Looks like some code can be found here https://github.com/DiedB/Homey-SolarPanels
Stale issue, closing for now.
I'm using HA 0.91, changed the location of the files as instructed (custom_components/solarportal) and downloaded the latest files. Configuration is unchanged. But SolarPortal no longer works.
home_assistant.log shows the following errors: