davidb24v / meross-powermon Goto Github PK
View Code? Open in Web Editor NEWSimple command line interface for local operation of Meross energy monitoring plugs
Simple command line interface for local operation of Meross energy monitoring plugs
So I tried my best, 2 Linux systems with 3 installs with no success.
What I did was:
sudo apt install python3 sudo apt install python3-pip sudo apt install python3-argcomplete wget https://github.com/davidb24v/meross-powermon/archive/master.zip unzip master.zip cd meross-powermon-master sudo python3 setup.py install sudo pip3 install meross_iot==0.1.4.3 sudo ./meross init --user pi --ssid _SSID_ --password _PASSWORD_ --interface wlan0 ./meross init --server _IP_ --port 8883 --ca-cert /home/pi/mqtt_ca.crt sudo ./meross setup name
My /home/pi/.config/meross_powermon/config.json looks like this:
{ "server": "_IP_", "port": 8883, "ca_cert": "/home/pi/mqtt_ca.crt", "user": "pi", "ssid": "_encryptedSSID_", "password": "_encryptedPASSWORD_", "interface": "wlan0" }
And I end up like this:
`ip link set dev wlan0 up OK
Looking for Meross device.....
Found Meross_SW_16C4
iwconfig wlan0 ap 48:E1:E9:19:16:C4 essid Meross_SW_16C4 key off OK
ip addr add 10.10.10.100/24 dev wlan0 OK
ip addr del 10.10.10.100/24 dev wlan0 OK
ip link set dev wlan0 down OK
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 80, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 70, in create_connection
sock.connect(sa)
OSError: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.7/http/client.py", line 1244, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1290, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1239, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x75e0f2f0>: Failed to establish a new connection: [Errno 113] No route to host
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='10.10.10.1', port=80): Max retries exceeded with url: /config/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75e0f2f0>: Failed to establish a new connection: [Errno 113] No route to host'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./meross", line 21, in
subcommands[opts.subcommand].go(opts)
File "/home/pi/meross-powermon-master/meross_powermon/setup.py", line 52, in go
dev0 = get_device_data()
File "/home/pi/meross-powermon-master/meross_powermon/setup.py", line 121, in get_device_data
return send(URL + "/config/", data)
File "/home/pi/meross-powermon-master/meross_powermon/setup.py", line 109, in send
r = requests.post(url, json=data)
File "/usr/lib/python3/dist-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='10.10.10.1', port=80): Max retries exceeded with url: /config/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x75e0f2f0>: Failed to establish a new connection: [Errno 113] No route to host'))`
Hi,
I have a strange problem with your program (missing module?) :
Traceback (most recent call last):
File "meross", line 12, in
import meross_powermon.command_line as command_line
File "/home/bastien/Meross/meross_powermon/command_line.py", line 10, in
from meross_powermon import (config, delete, init, monitor, setup)
File "/home/bastien/Meross/meross_powermon/config.py", line 9, in
from meross_powermon.modified_device import Mss310
File "/home/bastien/Meross/meross_powermon/modified_device.py", line 15, in
from meross_iot.supported_devices.power_plugs import (Device, ClientStatus)
ModuleNotFoundError: No module named 'meross_iot.supported_devices'
Is there any solution?
Best Regards,
Bastien
jorge@MacBook-Pro-2 ~/Downloads/meross-powermon-master [12:49:12]
(meros) > $ ./meross setup
usage: meross [-h] {config,init,delete,monitor} ...
meross: error: argument subcommand: invalid choice: 'setup' (choose from 'config', 'init', 'delete', 'monitor')
I cannot run the tool... Any help ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.