Comments (8)
In theory this should be possible without changes.
essmqtt
has a command line argument --ess_host
. If you pass that with the IP address of your ESS (--ess_host=192.168.176.3
, essmqtt
should skip the mdns autodetection (which doesn't work across subnets, probably the problem you're facing) and directly connect to the given IP address.
A prerequisite of course is that your network is configured such that - via either a gateway or an appropriate route - the machine essmqtt
runs on can connect to the 192.168.176.0 subnet.
If it doesn't work with --ess_host
that's a bug - in that case please speak up.
from pyess.
ping works, access to the subnet should be possible (at least from another machine on the same network the access is working).
pi@raspberry3:~/essmqtt/bin $ ./esscli --ess_host=192.168.176.3 --action get_data --password MY_PASSWORD
Traceback (most recent call last):
File "/home/pi/essmqtt/bin/./esscli", line 5, in <module>
from pyess.cli import main
File "/home/pi/essmqtt/lib/python3.9/site-packages/pyess/cli.py", line 12, in <module>
from pyess.ess import find_all_esses, get_ess_pw, extract_name_from_zeroconf, autodetect_ess, ESS
File "/home/pi/essmqtt/lib/python3.9/site-packages/pyess/ess.py", line 60
ip = get_ess_ip(self.name)
TabError: inconsistent use of tabs and spaces in indentation
from pyess.
You seem to be trying esscli
, but the option --ess_host
is only available for essmqtt
, do you observe the same issue with essmqtt
?
As you were asking about the mqtt my guess is that essmqtt is what you need in the end anyhow.
from pyess.
pi@raspberry3:~/essmqtt/bin $ ./essmqtt --ess_host=192.168.176.3 --mqtt_server=192.168.2.115 --ess_password theesspassword
Traceback (most recent call last):
File "/home/pi/essmqtt/bin/./essmqtt", line 5, in <module>
from pyess.essmqtt import main
File "/home/pi/essmqtt/lib/python3.9/site-packages/pyess/essmqtt.py", line 14, in <module>
from pyess.ess import autodetect_ess
File "/home/pi/essmqtt/lib/python3.9/site-packages/pyess/ess.py", line 60
ip = get_ess_ip(self.name)
TabError: inconsistent use of tabs and spaces in indentation
The MQTT Server has no username or password requirement, it is up and running and being used by other services.
from pyess.
How did you download the code? did you make modifications?
Background: "Inconsistent tabs and spaces" means that the leading whitespace (which in python has syntactic meaning) is inconsistent and some whitespace is made using tabs. But in that line 60 (and in fact the whole repository as it is on github) there is not a single tab character. If you edited the file with a text editor that might have introduced tab characters (many text editors render tab as four spaces, so it is not immediately apparent when editing whether or not there are tab characters in the beginning of a line.).
If you downloaded using git you can check whether there are differences in your repository by running git status
which should highlight any files different from the original version.
If you downloaded as Zip I'd suggest to re-download.
For reference this is the output of essmqtt freshly downloaded from github:
paulg@desktop:~/Workspace/pyess(master)$ venv/bin/essmqtt --ess_host=192.168.1.253 --mqtt_server=192.168.1.220 --ess_password d84fb8020100
We renamed asyncio-mqtt to aiomqtt and released a version 1.0.0 in the process. This is the last release under the asyncio-mqtt name. You can find the new repository at https://github.com/sbtinstruments/aiomqtt
INFO:pyess.aio_ess:fetching auth key
...
You could also search through the file for tab characters.
from pyess.
I got it working, thank you!! There were some weird characters in the config file. In essence by using essmqtt I am constantly receiving on the respective channels updated values of the ESS and using e.g. mosquitto_pub -t ess/control/active -m "false"
I can turn off (true = on) my ESS. Perfect!!
One last question, is it also possible to turn on/off the backup functionality of the ESS using your tool?
from pyess.
Unfortunately I don't know about any backup functionality - My ESS is an older model and therefore can only reverse engineer the part of the api that is available with that model. (Essentially to find out how it works I used the app and sniffed network traffic after jumping through a few hoops to decrypt said network traffic). So I can only do what my ESS+App can do.
from pyess.
Got it, thanks!!
from pyess.
Related Issues (20)
- switch-tasks not working
- Support new Battery mode "Weather forecast" HOT 20
- Connection to the ESS seems to be blocked HOT 5
- unit of measurement wrong for homeassistant HOT 2
- Cannot connect to ESS HOT 7
- How to install HOT 4
- Access to installer settings HOT 11
- Feature Request: Multiple Inverters HOT 2
- Two MQTT servers HOT 2
- Can't run essmqtt anymore. error message about coroutine 'ClientSession.close' was never awaited. HOT 1
- ESSmqtt as daemon HOT 1
- Hassio 3023.09.3 ERROR:asyncio:Task exception was never retrieved HOT 2
- try to use with new resu system HOT 2
- Run pyess as daemon/service under Linux, comments HOT 11
- Register last will and testament for essmqtt HOT 1
- Improve documentation on statuses HOT 2
- Communication with high PCS CPU Load HOT 11
- essmqtt stops updating values after 38 hours of runtime HOT 22
- V1.7: Error messages in Service status HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyess.