SAJ solar power

Python and python framework
Post Reply
Posts: 21
Joined: Sunday 26 July 2015 13:33
Target OS: Raspberry Pi
Domoticz version:

SAJ solar power

Post by nood » Thursday 29 March 2018 10:45

I made a phyton script so I can monitor my solar power production in Domoticz. I couldn't use the script from the forum viewtopic.php?t=10356 I think I have another wifi adapter.
If you want to test if this script will work before you install it, copy this link in your browser : http://*your local SAJ URL*/status/status.php
If you get a webpage with a list of numbers, you are good to go.

For this script you need to have the python requests library installed.
Make a dummy energy device and remember the IDX. Give your SAJ solarinverter a static IP in your router. replace the *** in the script with your values.

Code: Select all

import requests
from requests.auth import HTTPBasicAuth

DOMOTICZ = 'http://***' #input your domoticz IP here
IDX ='***' #input your energy idx here
SAJ = 'http://***' #input your local SAJ IP here

SAJURL = SAJ + '/status/status.php'
file = requests.get(SAJURL, auth=HTTPBasicAuth('***', '***')) #input your login here between the ' '
text = file.text
list = text.split(',')

POWER = list[23]
ENERGY = int(list[1])

Save this script to your domoticz python folder and make a crontab to run this script. I run it every minute to get realtime power readings. If you only want daily power production you could go with less.

Posts: 31
Joined: Tuesday 29 September 2015 19:50
Target OS: Raspberry Pi
Domoticz version: 2.2563
Location: Poland

Re: SAJ solar power

Post by thorian » Thursday 11 October 2018 14:15

Depending on what you actually got - the SAJ Suntrio has all the needed data here: http://IP_OF_SAJ_SUNTRIO/real_time_data.xml

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests