Photonios/py-momit-cool-remote

No module named 'cli'

temuccio opened this issue · 6 comments

Hello,
I would like to test your project. I have installed the python3 script on two different computer (on a linux station and on a raspberry pi 3) but I have the same problem:

ImportError: No module named 'cli'

Do you can help me? I have installed the system with pip3 and I check the execution with python3.
Thanks

Hello,

I am not sure what you're trying to achieve and I can't reproduce that error. Could you explain a little more?

If you're no longer interested, please close the issue :)

Hi there

Allow me to jump in your conversation because I'm very much interested in this project since Momit left me out in a cold for winter, by going out of business and shutting down their servers. I own product of the same group (Momit home thermostat). It operates on identical gateway as momit cool, but operates a thermostat and extension unit to switch on a boiler (my case). I think it works on the same/similar principle anyway. Gateway talks to Thermostat and extension unit through Zigbee protocol and all of them have TI CC2538 chip. I'm trying to test your project on raspberrypi since I'd like it to work as an IoT hub/server. I have couple of issues questions:

  1. As temuccio, I have same issue. when executing a command, (Linux terminal)

"$ momit-cool --host 192.168.3.164 --cool"

I get same error

"from main import cli"
ImportError: No module named 'cli' ( I'll copy exact text from terminal when I'm back home)

  1. Question when you say in examples how to use it

from momitcool import MomitCool

cool = MomitCool('192.168.3.164')
cool.cool() # turn on in cooling mode
cool.off() # turn off
cool.temperature() # get current temperature
cool.mode() # cooling/heating/off

Do you mean those 5 lines above should be input in cli.py module just under "from momitcool import MomitCool"??

  1. I'm trying to communicate with my Gateway and command:
    coap get coap://192.168.3.164:11686/.well-known/core,
    produces nothing. I obviously substitute my Gateway IP, but this is OK because simply Gateway is not answering. I installed coAP extension to Chromium called CopperCr (can be found here in github
    https://github.com/mkovatsc/Copper4Cr)
    This allows to get resources and issue all coAP commands, but again to no avail. Here I don't know if it is a problem of Momit servers being shut down or port number is wrong (in my case). By the way why you listed two different port numbers. How can I find port number on mine? I'd be very greatfull if you could elaborate a bit more, because you're the only one that had a right idea to disregard Momit servers

Hi,
command in terminal
$ momit-cool --host 192.168.1.16 --cool

gives back this

Traceback (most recent call last):
File "/usr/local/bin/momit-cool", line 7, in
from cli import main
ImportError: No module named 'cli'

and momit-cooi in usr/local/bin looks like this:

**#!/usr/bin/python3

-- coding: utf-8 --

import re
import sys

from cli import main

if name == 'main':
sys.argv[0] = re.sub(r'(-script.pyw?|.exe)?$', '', sys.argv[0])
sys.exit(main())**

Hi Hebdam, did you have any luck with your Momit, as I am in the same circumstances. Do you have any more info on the port or maybe any command to make this device work again?

Thanks in advance!

Hi juankaamez,

Unfortunately no good news as I temporarily put this project on a shelf and developed my own home automation IoT, based on OPENHAB with Rasberrypi as a server/hub. This way I'm in a full control not relying on nobody's servers, but definitely, I'm planning to get back to it, as I'm learning more and more. But it may be a lost case since Momit servers are down and nobody has any discussion on the subject. It is propriatory hardware/software, unless we find a way to get this photonios project going or reprogram the TI CC2538 chip which is beyond my expertise at this moment, and limited time I have. Never give up!

Hi everyone,

I've released a new version of the Python package that should fix the error you're describing. Make sure that you install the package with Python 3's pip. You might have to use pip3 instead of pip, depending on how your system is set up.

https://pypi.org/project/py-momit-cool-remote/1.1/

I can't guarentee the package still works since I haven't tried it in forever. However, the README specifies how I found all this information and how I made it work. This should help in any further reverse engineering projects.


In some earlier comments there were some questions about port numbers. I think this is the only thing that never became clear to me. I couldn't figure out how the Momit Cool picks the port number to listen on. It didn't seem to be hard-coded. I figured it out by using ARP poisioning and routing network traffic between the Momit Cool and Momit servers to my computer and analyzing it with Wireshark.