Python plugin - Solax Inverters

Python and python framework

Moderator: leecollings

labrag12
Posts: 14
Joined: Monday 15 March 2021 16:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by labrag12 »

option to allow new hardware was already enabled
Just to make sure i disabled, and enabled it again.
Still not showing up under devices

2021-03-16 13:30:41.609 Status: (Solax) Stop directive received.
2021-03-16 13:30:41.609 Status: (Solax) Exiting work loop.
2021-03-16 13:30:41.710 Status: (Solax) Stopping threads.
2021-03-16 13:30:41.710 Status: (Solax) Stopped.
2021-03-16 13:30:41.710 Status: (Solax) Started.
2021-03-16 13:30:42.025 Status: (Solax) Entering work loop.
2021-03-16 13:30:42.025 Status: (Solax) Initialized version 1.1.0, author 'syrhus'
2021-03-16 13:31:46.362 Error: Solax hardware (3) thread seems to have ended unexpectedly
2021-03-16 13:32:00.366 Error: Solax hardware (3) thread seems to have ended unexpectedly
2021-03-16 13:32:14.368 Error: Solax hardware (3) thread seems to have ended unexpectedly
2021-03-16 13:32:28.370 Error: Solax hardware (3) thread seems to have ended unexpectedly
2021-03-16 13:32:42.372 Error: Solax hardware (3) thread seems to have ended unexpectedly
2021-03-16 13:32:49.251 Error: (Solax) 'onStart' failed 'ConnectionError'.
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 247 in '/config/plugins/solax/plugin.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 87 in '/config/plugins/solax/plugin.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 116 in '/config/plugins/solax/plugin.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 57 in '/config/plugins/solax/plugin.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 75 in '/usr/lib/python3/dist-packages/requests/api.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 60 in '/usr/lib/python3/dist-packages/requests/api.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 533 in '/usr/lib/python3/dist-packages/requests/sessions.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 646 in '/usr/lib/python3/dist-packages/requests/sessions.py'
2021-03-16 13:32:49.251 Error: (Solax) ----> Line 516 in '/usr/lib/python3/dist-packages/requests/adapters.py'
2021-03-16 13:32:56.374 Error: Solax hardware (3) thread seems to have ended unexpectedly
2021-03-16 13:32:58.763 Status: (Solax) On
2021-03-16 13:33:18.614 (Solax) Pushing 'SettingsDirective' on to queue
2021-03-16 13:33:18.641 (Solax) Processing 'SettingsDirective' message
2021-03-16 13:33:28.756 (Solax) Pushing 'onHeartbeatCallback' on to queue
2021-03-16 13:33:28.805 (Solax) Processing 'onHeartbeatCallback' message
2021-03-16 13:33:28.805 (Solax) Calling message handler 'onHeartbeat'.
2021-03-16 13:33:28.805 (Solax) onHeartbeat called
2021-03-16 13:33:28.805 (Solax) now: 2021-03-16
2021-03-16 13:33:28.805 (Solax) currentDate:2021-03-16
2021-03-16 13:33:28.805 (Solax) hearbeat:2
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 »

Could you please try do delete the solax hardware and recreate a new one with the DEBUG parameter set to "True"?
Your latest log seems to be without the debug mode.
labrag12
Posts: 14
Joined: Monday 15 March 2021 16:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by labrag12 »

i removed the hardware and recreated it again.
it claims on creation that he will made a new device.

but in the logs i still see the same errors.

link itselfs seems to be working , somethime i see some information from solax
2021-03-16 15:38:28.084 (solax) result:{'exception': 'Query success!', 'result': {'inverterSN': '***********', 'sn': '*********', 'acpower': 616.0, 'yieldtoday': 4.7, 'yieldtotal': 510.4, 'feedinpower': 0.0, 'feedinenergy': 0.0, 'consumeenergy': 0.0, 'feedinpowerM2': 0.0, 'soc': 0.0, 'peps1': 0.0, 'peps2': 0.0, 'peps3': 0.0, 'inverterType': '4', 'inverterStatus': '102', 'uploadTime': '2021-03-16 15:33:54', 'batPower': 0.0, 'powerdc1': 626.0, 'powerdc2': 0.0}, 'success': True}

Can it be that this has something to do that i'm running in in a docker container ?
Thanks again for help me out with this.
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 »

I'm not sure to understand the status.
I read your log that you are able to request values to solax web site.
Do you succeed to create a new device with the plugin?
Other question, do you allow local connection in Domoticz settings with "192.168.2.*" for instance?

Could you delete your hardware, clean the log, create a new solax hardware with DEBUG parameter set to "True" and send the entire log (without your solax ID of course) ?
Can it be that this has something to do that i'm running in in a docker container ?
What do you mean by "docker container"?
labrag12
Posts: 14
Joined: Monday 15 March 2021 16:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by labrag12 »

I'm running domotics in a docker container on my NAS
connections seems to work, it just not creating any device when i add them.
i can connect to domotics from my local network from phone laptop etc
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 »

Are you able to create other device with dummy hardware for instance?
Do you have a lot of device more than 99?

I do not understand why you can't add device if you have checked "accept new hardware devices" :?
Do you have several users on Domoticz? Are you connected with an admin profile?
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 »

labrag12 wrote: Tuesday 16 March 2021 17:26 I'm running domotics in a docker container on my NAS
connections seems to work, it just not creating any device when i add them.
i can connect to domotics from my local network from phone laptop etc
I believe in the Docker container the IP address of domoticz is different (not 192.168.x.xx), so you perhaps have to add that docker container IP address in the plugin configuration. Perhaps also add that IP range in Setup - Settings network.
But I think..... definitely not sure.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
labrag12
Posts: 14
Joined: Monday 15 March 2021 16:47
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by labrag12 »

This was the solution.
i used the internal ip from the docker with the internal port.
Now its added under devices and i can see the information.

Thank you both for the support,
bouwnty
Posts: 4
Joined: Friday 26 March 2021 15:49
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by bouwnty »

I installed the plugin in Domoticz and in debug mode I see results coming in from SolaxCloud. But still my device is red and message ‘Updating device from 0:'0' to have values 0:'0'.’ is shown in log. In normal log it says the device is obsolete.

What is going wrong?
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 bouwnty
Don't you have a time difference between values from solax and your time? Could you send a debug log to see why values are not processed?
bouwnty
Posts: 4
Joined: Friday 26 March 2021 15:49
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by bouwnty »

syrhus wrote: Friday 22 October 2021 13:33 Don't you have a time difference between values from solax and your time? Could you send a debug log to see why values are not processed?
DiffTime was a very big number, my timezone in Solax was UTC +1 (which is correct), I changed it to UTC and then back to UTC +1. That seems to have solved the problem. Values are now updated to the device.

Thanks, syrhus!
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 »

You're welcome.
Thank you for the feed back :)
jldjong
Posts: 2
Joined: Monday 24 January 2022 15:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by jldjong »

Hi - plugin works like a charm for me! Thanks a lot for programming it.
I have a strange issue - wonder what I'm doing wrong: at the end of every day it shows a large negative bar - that is exactly what has been produced that day. Sort of like a reset. Do you know what I'm doing wrong? Thanks!
Screenshot 2022-01-24 160703.png
Screenshot 2022-01-24 160703.png (183.48 KiB) Viewed 1365 times
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 jldjong
I had the same issue with the last version of Domoticz.
I had to switch the Energy read property from Device to Computed. On previous version, I didn't have any problem.
This bug appears from 2021.1
Regards
jldjong
Posts: 2
Joined: Monday 24 January 2022 15:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python plugin - Solax Inverters

Post by jldjong »

Thanks for that blazing fast response! Will try - and if not succesful - will let you know ;-)
Cheers!
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 »

i'm trying to get Solax inverter working in domoticz.
Getting an errors. Does anyone knows how to solve it?

This is working in the browser
http://192.168..........;8080/json.htm?type=command&param=getSunRiseSet
Attachments
domsolax.jpg
domsolax.jpg (41.58 KiB) Viewed 1129 times
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 dospider
Could you please switch the debug parameter to true to get the entire log please?
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 »

Thnks for the very quick respons. See attachment. That's all i see.
Attachments
solaxdebug.jpg
solaxdebug.jpg (108.3 KiB) Viewed 1127 times
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 »

I don't see the error
Did you enter in the plugin parameters your domoticz' IP address and port => 192.168.x?.x? and port 8080 in your case?
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 did and in the problem log there is nomore then in the fist image i my first attachment.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest