Python plugin - Solax Inverters

Python and python framework

Moderator: leecollings

syrhus
Posts: 79
Joined: Tuesday 12 December 2017 14:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Paris
Contact:

Re: Python plugin - Solax Inverters

Post by syrhus »

In Domoticz settings, did you enter Local networks value like 192.168.1.* ?
dospider
Posts: 15
Joined: Monday 04 August 2014 18:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Python plugin - Solax Inverters

Post by dospider »

Yes i have. Sometimes when i try to add it again it says that is having problems adding new hardware.
syrhus
Posts: 79
Joined: Tuesday 12 December 2017 14:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Paris
Contact:

Re: Python plugin - Solax Inverters

Post by syrhus »

Try to get the log in debug mode to see the error because without it is very difficult to understand what happened.
Regards
ErikM
Posts: 8
Joined: Monday 23 March 2020 10:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by ErikM »

Just wondering: Does this plugin only work with the Pocket WIFI? I use the Pocket Lan V3.0 and would love to have this plugin work, but keep getting the following error after creating the hardware:

'/home/pi/domoticz/plugins/SolaxHTTP/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin - Solax Inverters

Post by waltervl »

ErikM wrote: Monday 19 December 2022 15:30 Just wondering: Does this plugin only work with the Pocket WIFI? I use the Pocket Lan V3.0 and would love to have this plugin work, but keep getting the following error after creating the hardware:

'/home/pi/domoticz/plugins/SolaxHTTP/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'
This is not an error there should be more. Probably an Module is not loading. see Wiki https://www.domoticz.com/wiki/Using_Pyt ... ules_Fails
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ErikM
Posts: 8
Joined: Monday 23 March 2020 10:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by ErikM »

Qh
waltervl wrote: Monday 19 December 2022 15:33
This is not an error there should be more. Probably an Module is not loading. see Wiki https://www.domoticz.com/wiki/Using_Pyt ... ules_Fails
Ah, I see. I had another look at my logs and this is everything I get after creating the SolaxHTTP hardware:

2022-12-19 15:13:11.131 Error: Solax Test: (SolaxHTTP) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/SolaxHTTP/:/usr/lib/python37.zip:/usr/lib/python3.7:/usr/lib/python3.7/lib-dynload:/usr/local/lib/python3.7/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.7/dist-packages'.
2022-12-19 15:13:11.160 Error: Solax Test: Exception: 'SyntaxError'. No traceback available.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin - Solax Inverters

Post by waltervl »

Did yoy have local nettworks field filled in? As it should.
https://www.domoticz.com/wiki/Applicati ... stem_Setup

Else it perhaps is type error somehere in the plugin.py. Did you modify it yourself?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ErikM
Posts: 8
Joined: Monday 23 March 2020 10:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by ErikM »

waltervl wrote: Monday 19 December 2022 17:32 Did yoy have local nettworks field filled in? As it should.
https://www.domoticz.com/wiki/Applicati ... stem_Setup

Else it perhaps is type error somehere in the plugin.py. Did you modify it yourself?
I thought I had to fill in the Solax's IP address when I created the new hardware. Should that be my Domoticz IP address? And I didn't modify anything in the plugin. I don't know any Python, so I'm not taking risks there.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin - Solax Inverters

Post by waltervl »

For having this plugin run properly you have to have your local network settings filled in (menu setup - settings).
In the plugin settings you fill in the IP of the inverter.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ErikM
Posts: 8
Joined: Monday 23 March 2020 10:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by ErikM »

waltervl wrote: Monday 19 December 2022 21:00 For having this plugin run properly you have to have your local network settings filled in (menu setup - settings).
In the plugin settings you fill in the IP of the inverter.
I have my local network settings in the settings menu and also the Solax PockteLan V3 IP (as provided by my FritzBox) in the plugin settings, but I still get this syntax error and the inability to load the plugin.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin - Solax Inverters

Post by waltervl »

Did you make the plugin.py file executable?
Is it readable for the user running domoticz?
Is it the first python plugin you are running? Else check wiki https://www.domoticz.com/wiki/Using_Python_plugins for all prerequisits
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
ErikM
Posts: 8
Joined: Monday 23 March 2020 10:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by ErikM »

It's just this one is that's giving me trouble. The other Solax plugin works perfectly fine, but doesn't give me as much information. I've updated Python, the file is executable and is, as far as I can see, available. :(
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin - Solax Inverters

Post by waltervl »

I am out of options, perhaps the developer can kick in....
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Ayep
Posts: 15
Joined: Friday 27 March 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: France
Contact:

Re: Python plugin - Solax Inverters

Post by Ayep »

Hi all,

First and foremost - many thanks to the dev for the creation of this plugin. I've recently switch to a solax inverter and am looking forward to getting some data.

Now, i've started off fresh, and am running into some troubles. Here is my error log :

Code: Select all

2022-12-23 11:20:14.214 Error: SolaX: Call to function 'onStart' failed, exception details:
2022-12-23 11:20:14.215 Error: SolaX: Traceback (most recent call last):
2022-12-23 11:20:14.215 Error: SolaX: File "/home/pi/domoticz/plugins/solax_inverter/plugin.py", line 255, in onStart
2022-12-23 11:20:14.215 Error: SolaX: _plugin.onStart()
2022-12-23 11:20:14.215 Error: SolaX: File "/home/pi/domoticz/plugins/solax_inverter/plugin.py", line 92, in onStart
2022-12-23 11:20:14.215 Error: SolaX: self.getSunset()
2022-12-23 11:20:14.215 Error: SolaX: File "/home/pi/domoticz/plugins/solax_inverter/plugin.py", line 125, in getSunset
2022-12-23 11:20:14.215 Error: SolaX: self.sunrise = datetime.time(hour=int(dJson['Sunrise'].split(':')[0]),minute=int(dJson['Sunrise'].split(':')[1]),second=0)
2022-12-23 11:20:14.215 Error: SolaX: TypeError: 'NoneType' object is not subscriptable 
Setup and steps so far :
- Totally fresh bullseye installation, on rpi4, with latest stable domoticz.
- I've had to install python-dev for python version to appear in domoticz, and initially attempt to run the plugin.
- I've had to chmod +x the plugin.py, which has removed one initial error.
- Settings are set to accept new hardware devices
- I've input tokenID, wifi dongle S/N, domoticz IP and port.

Many thanks for any insight you may have in resolving this.
User avatar
waltervl
Posts: 5149
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin - Solax Inverters

Post by waltervl »

This probably has to do with incorrect entering in plugin configuration;
  • Domoticz IP Address
  • Domoticz Port number
Is the following URL working when entered in a browser (after changing IP and Port)?

Code: Select all

http://Domoticz-IP:Port/json.htm?type=command&param=getSunRiseSet
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Ayep
Posts: 15
Joined: Friday 27 March 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: France
Contact:

Re: Python plugin - Solax Inverters

Post by Ayep »

Ah well spotted, you could indeed be onto something. This command

Code: Select all

http://192.168.1.38:8080/json.htm?type=command&param=getSunRiseSet
yields a

Code: Select all

401 Unauthorized
Ayep
Posts: 15
Joined: Friday 27 March 2020 8:16
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.1
Location: France
Contact:

Re: Python plugin - Solax Inverters

Post by Ayep »

Superb, huge progress indeed.

Since I had done a fresh installation, I had forgotten to input the 192.168.1.* in the "Local Networks (no username/password)" settings.

Now json works... And I have one new device named "Solax - [myserialkey]". I assume the next devices will populate with time.

Thank you very much for your help here, I was stuck speculating on python issues... Much appreciated!
Biarritz
Posts: 11
Joined: Friday 08 June 2018 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by Biarritz »

Hi,
I have just updated to the latest version of Domoticz 2023.1 on Docker and getting the following error on the Solax Inverter
Knipsel.JPG
Knipsel.JPG (117.8 KiB) Viewed 933 times
When using:
http://Domoticz-IP:Port/json.htm?type=command&param=getSunRiseSet

The result is:
{
"AstrTwilightEnd" : "19:09",
"AstrTwilightStart" : "04:33",
"CivTwilightEnd" : "17:52",
"CivTwilightStart" : "05:51",
"DayLength" : "10:54",
"NautTwilightEnd" : "18:30",
"NautTwilightStart" : "05:12",
"ServerTime" : "2023-03-01 16:18:33",
"SunAtSouth" : "11:51",
"Sunrise" : "06:24",
"Sunset" : "17:18",
"status" : "OK",
"title" : "getSunRiseSet"
}
syrhus
Posts: 79
Joined: Tuesday 12 December 2017 14:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Paris
Contact:

Re: Python plugin - Solax Inverters

Post by syrhus »

Hi Biarritz (French guy? ;) )

Could you please try to install the latest version 1.2.2?
Let me know if you still have the issue.
Biarritz
Posts: 11
Joined: Friday 08 June 2018 23:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by Biarritz »

Hi, Sorry no I'm not French, just like Cadillac's and Biarritz the city :D .
I have plugin.py version which was committed on Nov 28, 2022
And in the log is see the version number you mentioned
Knipsel.JPG
Knipsel.JPG (125.58 KiB) Viewed 921 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest