Closed joenex1 closed 9 years ago
OT-monitor has no installation.
i created a folder in my opt folder. and gave Pi access to this folder
"sudo chown pi:pi /opt/otmonitor"
then place the otmonitor-ahf in that folder. And the conf file.
The .conf file has special settings to enable the otmonitor relay function.
i create a deamon file for this: https://gist.github.com/Fjuxx/8effac5e0d8338e07265#file-otmonitor-ahf
this assumes the otmonitor-ahf is located in /opt/otmonitor/ and also the conf should be in there in order for this to work.
The command that it execute to start it:
/opt/otmonitor/otmonitor-ahf --daemon -f /opt/otmonitor/otmonitor.conf
And in the otmonitor.conf are all the settings. like /dev/ttyUSB0 webserver port.
Check those settings out. Let me know if it worked!
OK, I did the following:
I also can see the thermostat section within pimatic, but returns the following errors: error [pimatic-otgw]: connection error: Error: This socket has been ended by the other party error [pimatic-otgw]: connection error: Error: connect ECONNREFUSED
The port numbers are correct and there is a connection with the thermostat, checked it by running otmonitor-ahf on the pi..
Any ideas what could be wrong?
Is the OTMonitor working on the normal otmonitor web page (webserver port)?
if so, what settings did you put in your config file for pimatic and for otmonitor?
The OTMonitor doesn't seem to start automatically, I have to start it with:
/opt/otmonitor/otmonitor-ahf --daemon -f /opt/otmonitor/otmonitor.conf
When it is started, the 8080 port shows the summary page but without the values. The 7686 port is not reachable at all. When I open the otmonitor interface it does show values. My config file for pimatic and otmonitor are exactly the same as you described them.
Please Send me your config files.
And did you execute the update-rc.d command?
2015-01-23 17:02 GMT+01:00 joenex1 notifications@github.com:
The OTMonitor doesn't seem to start automatically, I have to start it with:
/opt/otmonitor/otmonitor-ahf --daemon -f /opt/otmonitor/otmonitor.conf
When it is started, the 8080 port shows the summary page but without the values. The 7686 port is not reachable at all. When I open the otmonitor interface it does show values. My config file for pimatic and otmonitor are exactly the same as you described them.
— Reply to this email directly or view it on GitHub https://github.com/Fjuxx/pimatic-otgw/issues/1#issuecomment-71215325.
Hereby both config files. The update-rc.d command was succesfully executed with otmonitor-ahf file in etc\init.d directory.
Sorry no config files were attached.
can you just post the inside of the config file for otmonitor. and you plugin part for pimatic config?
Otmonitor: web { enable true port 8080 nopass true } connection { device /dev/ttyUSB1 type serial enable true } server { enable true port 7686 relay true }
Pimatic plugin: { "plugin": "otgw", "host": "192.168.0.110", "port": 7686 }
So assuming:
192.168.0.110 = Your raspberry port 8080 is working and accessible. (from you laptop/desktop)
Then try the following pimatic settings:
{ "plugin": "otgw", "host": "127.0.0.1", "port": 7686 }
After you ran Otmonitor please check with netstat if the ports are actually listing.
Changing the host to local worked! However, only if otmonitor exe is running. Any ideas on the autostart? I tried the update-rc command several times, with the file I etc/init.d..
directory /opt/otmonitor created chowned the folder for user pi file downloaded with wget into the directory conf file created as example downloaded the deamon code and saved it into init.d with the name otmonitor-ahf entered the command that it execute to start it
pi@Pimatic /opt $ ./otmonitor/otmonitor-ahf --daemon -f /opt/otmonitor/otmonitor.conf -bash: ./otmonitor/otmonitor-ahf: Permission denied
out of options for now
try this:
cd /opt/otmonitor/ sudo chown pi:pi *
if that does not work, try running it as root. it could be that if you are using the serial line, that the user pi may not access it.
you can solve it by adding the group dailout to the user pi.
i simply run the program as root on start up. As this program also opens a port in linux.
Oh and make sure otmonitor-ahf is a executable. (chmod +x otmonitor-ahf)
chmod did it thanks
First of all: Great plugin and thanks for developing this! I have a running OTGW which is working and tried to install the otmonitor-ahf executable. However, when I run the command:
./otmonitor-ahf --daemon -f /opt/otmonitor/otmonitor.conf
Nothing seems to happen, it doesn't install to opt/otmonitor. It doesn't show an error message. With this command i'm able to daemonize and access the webserver:
sudo -u pi /home/pi/otmonitor-ahf --webserver 8085 --daemon /dev/ttyUSB0 &
Any tips?