Carrier Infinity

nebulous said:
If the serial tab shows data streaming in, then hopefully if you click back to the home tab the bottom row may have some gauge data. The top row is populated from the http service and the bottom row from serial.
 
As for the debug output above: it looks like your web browser is polling infinitude for thermostat state(good), but that your thermostat is not contacting infinitude(bad). Is the thermostat on the same network as the device running infinitude? Can you ping the thermostat's ip from that device? If not, solve that problem and try again. If so, quadruple check that menu->wifi->advanced settings->manage proxy servers has the ip and port of your infinitude server and that the proxy switch is set to ON. You'll know you're making progress when you see activity in the debug log from your thermostat. It should GET /Alive?sn=yourserialnumber and start regularly POSTing its config and GETing any changes from infinitude.
 
One more thing to help debugging is to run infinitude's tests. To do so, cd into the infinitude directory and run
 

prove -v

 
All tests should pass, but if not we can work on getting them to do so.
 
prove -v worked, all tests passed did see this:
 

 

ok 5 - exact match for content
[Wed Jun 17 00:37:21 2015] [debug] POST "/systems/systems17test"
[Wed Jun 17 00:37:21 2015] [debug] Routing to a callback
Use of uninitialized value in concatenation (.) or string at /home/pi/link/infinitude/t/../infinitude line 202.
Use of uninitialized value in concatenation (.) or string at /home/pi/link/infinitude/t/../infinitude line 203.
 
 

 
pinging the thermostat from the  pi worked perfectly
 
This is the startup string, i assume it saying it is on localhost is ok as i can get to webpage on the real IP addr?
 

 

Using /dev/ttyUSB0 serial interface
[Wed Jun 17 00:45:12 2015] [info] Listening at "http://*:3000"
Server available at http://127.0.0.1:3000
 
 

 
I double checked the settings in the thermostat https://onedrive.live.com/redir?resid=6F5B960740DB58D1!109465&authkey=!AKf36eN6ZQcng6U&v=3&ithint=photo%2cjpg  and even tried rebooting it. 
 
I am running infinitude as user 'pi' not root, would that matter?  I did set the execute bits on the infinitude script file, do i need to do it on any other files?
 
ok i just rebooted the pi and the thermostat and the behavior has changed.
 
Now the serial doesn't work at all, however the Alive appears and in the log in the thermostat it shows a connected.
 
Still nothing in the web page (chrome or IE - as IE has some strange caching behavior with infinitude)
 
--update--
after rebooting the entire system serial is now working again, but it seems i had to use scandev from brybus to kick it into life...
 
I see the alive entry but still no data on the main web page
GET "/status.json"
[Wed Jun 17 01:53:57 2015] [debug] Routing to a callback
[Wed Jun 17 01:53:57 2015] [debug] Template "key.json.ep" not found
[Wed Jun 17 01:53:57 2015] [debug] Template "not_found.development.json.ep" not found
[Wed Jun 17 01:53:57 2015] [debug] Template "not_found.json.ep" not found
[Wed Jun 17 01:53:57 2015] [debug] Template "not_found.development.html.ep" not found
[Wed Jun 17 01:53:57 2015] [debug] Rendering cached template "not_found.html.ep" from DATA section
[Wed Jun 17 01:53:57 2015] [debug] 404 Not Found (0.050248s, 19.901/s)
[Wed Jun 17 01:54:12 2015] [debug] No cache for Alive. Make Carrier request
[Wed Jun 17 01:54:13 2015] [debug] /Alive?sn=2413W002618
[Wed Jun 17 01:54:13 2015] [debug] GET "/Alive"
[Wed Jun 17 01:54:13 2015] [debug] Routing to a callback
[Wed Jun 17 01:54:13 2015] [debug] 200 OK (0.019088s, 52.389/s)
[Wed Jun 17 01:54:26 2015] [debug] GET "/systems.json"
[Wed Jun 17 01:54:26 2015] [debug] Routing to a callback
[Wed Jun 17 01:54:26 2015] [debug] Template "key.json.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Template "not_found.development.json.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Template "not_found.json.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Template "not_found.development.html.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Rendering cached template "not_found.html.ep" from DATA section
[Wed Jun 17 01:54:26 2015] [debug] 404 Not Found (0.051894s, 19.270/s)
[Wed Jun 17 01:54:26 2015] [debug] GET "/status.json"
[Wed Jun 17 01:54:26 2015] [debug] Routing to a callback
[Wed Jun 17 01:54:26 2015] [debug] Template "key.json.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Template "not_found.development.json.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Template "not_found.json.ep" not found
[Wed Jun 17 01:54:26 2015] [debug] Template "not_found.development.html.ep" not found
[Wed Jun 17 01:54:27 2015] [debug] Rendering cached template "not_found.html.ep" from DATA section
[Wed Jun 17 01:54:27 2015] [debug] 404 Not Found (0.053286s, 18.767/s)
 
@scyto, that looks like progress. Your stat called up Infinitude to say it was alive. It takes any number of minutes(as determined by Carrier's last timeout feedback) after that point for the stat to call Infinitude and tell it about configuration/get weather/time etc. If you can get it to the point of calling /Alive again, run over to the thermostat and adjust the temperature up or down a degree. I've found that this usually stimulates a poll cycle. As new data comes in and additional endpoints are called, the state/ directory should begin filling up with differing serializations of each endpoint.
 
As for the serial issues. Possibly something else is trying to access ttyUSB0? I'd try unplugging/replugging the usb dongle to see if that gets you back in business. 
 
*oh and the warning for the system17 test is fine. Just a warning, not an error.
 
@nebulous, thanks for the info, when the serial fired back into life yesterday i had rebooted the pi, unplugged and replugged the USB dongle in, rebooted the entire heating system, run an stty command and then used one of the brybus tools (think it was raw read) - something in thsi chain worked though cardump just fatal errored (I built from latest). so i am not sure what made it kick back to life - wil try and narrow if it happens again.
 
Changing the setpoint, leaving for 24 hours doesn't seem to have helped on the other data.
 
I want to check a few other things in the thermostat with you to see if i messed anything up at some point.
 
1) the myinfinity server address is www.api.ing.carrier.com, the overwrite defaults is set to no
2) its port is 80
3) it never shows in the status that this is 'connected' like it does with the live service
4) I get the IP address and DNS server settings from DHCP (i have lease reservation in the router so the IP stays the same)
5) my thermostat is running sw ver 131493-12
 
anything else i can check?
 
Is there a way for me to dump the HTTP that the thermostat sends to infinitude to see if there is something odd / malformed?
 
The res-alive xml file is empty
 
The res-Alive.txt has this

 

HTTP/1.1 404 Not Found
Date: Thu, 18 Jun 2015 00:27:54 GMT
Content-Length: 0
 
 
The req-Alive.txt has this

 

GET /Alive?sn=xxxxx HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: OAuth realm="http://www.api.ing.carrier.com/Alive?sn=xxxxx",oauth_consumer_key="xxxxx",oauth_nonce="xxxxx,oauth_signature_method="HMAC-SHA1",oauth_timestamp="1434583669",oauth_token="xxxx",oauth_version="1.0",oauth_signature="z%xxxx%3D"
Host: www.api.ing.carrier.com
 
 


 
The xxx's are my substitution incase i am silly to post full text :-) ?
 
--edit--
hmm i switched back to direct to carrier and i seem to be having issues with getting the tstat to upload data to their service, thinking about this more i think the last time it reliably worked with carrier apps might have been before i did firmware update to v11 or v12.  Does anyone have a firmware earlier than v11?  Can one downgrade firmware?
 
I am sorry for littering this thread with general linux support question, but does any of you know what packages I need on a Ubuntu 14.04 server? I installed everything I thought it needed but I am still getting when I try to run ./infinitude

"encode_json" is not exported by the Mojo::JSON module
"decode_json" is not exported by the Mojo::JSON module
Can't continue after import errors at ./infinitude line 7.


libmojolicious-perl is installed
 
lleo said:
I am sorry for littering this thread with general linux support question, but does any of you know what packages I need on a Ubuntu 14.04 server? I installed everything I thought it needed but I am still getting when I try to run ./infinitude

"encode_json" is not exported by the Mojo::JSON module
"decode_json" is not exported by the Mojo::JSON module
Can't continue after import errors at ./infinitude line 7.


libmojolicious-perl is installed
 
Take a look at this post http://cocoontech.com/forums/topic/11372-carrier-infinity/page-16#entry228066 , in the hidden text i list everything i did on a Pi to get it working - also try the prove -v command nebulous suggest to me above - it will check all your dependencies
 
Thanks Scyto, this helped!
Perl remains mostly a mystery for me, but now it works. Likely I had a different mojolicious version I got from the ubuntu repository.
 
lleo said:
Thanks Scyto, this helped!
Perl remains mostly a mystery for me, but now it works. Likely I had a different mojolicious version I got from the ubuntu repository.
 
Tell me about it :-) - i literally broke my whole linux pi install (i couldn't even do apt-get) by messing with perl (had to restart, thats why i documented it the second time!).  I found most install web sites missed the fact that for us regular joes perl is already part of the OS distrib and installing some of the other perl installers will really muck you up if you are not an expert.  True poke and hope when i set up second time (as i think you can see :-).  Out of interest, what was it that fixed the install for you?
 
Well, apologies for wasting everyone time.  It seems the thermostat ONLY works reliably when it is connected to the TP-LINK wifi router included in the thermostat kit.
My mistake was connecting it to my Asus wifi router.  I fucking hate carrier.  So now the TP Link router is plugged into a spare port on my Asus router.
 
I don't see coil, airflow, outside or fan speed readings - i assume this is because i have a non communicating air conditioner unit?
 
Now i need to figure out how to use the non-resty API inteface in infinitude to hook to either Vera or ISY994i... will keep people updated if interested.
 
Also i noticed that 'System settings updated Thu 2015-06-18 at 9:40PM' doesn't report last contact time, this made me think it had stopped reporting, but i noticed currentactivity was updated almost instantly - could we have a heartbeat time somewhere?
 
Lastly it is raining outside, it is 68F outside, not sure why it shows freezing rain on the thermostat :-)
 
@scyto - after I installed the right mojolicious from cpan, './infinitude test' and 'prove -v' ran without errors. I started infinitude in daemon mode on the default port 3000 and can access it on my network. I am not getting any data on the status page, however, there is data coming in on the serial page from my system.
 
At this point I will need more hand holding as not sure how to move past this point.
 
I am interested in just getting realtime usage data on my system. My system is a 2-zone variable speed NG furnace/airhandler with a greenspeed variable speed heatpump and an older non-networked thermostat/control in 1st zone and a Smart Sensor in the 2nd zone. I have however a SAM connected to my wired network. The serial port of the SAM is connected to my Elk M1 and I am able to do basic control/automation through that. The SAM also provides a web interface for directly altering the settings of the control.
 
@nebulous - should infinitude report system data with my arrangement?
 
 
infinitude.jpg
 
scyto said:
Well, apologies for wasting everyone time.  It seems the thermostat ONLY works reliably when it is connected to the TP-LINK wifi router included in the thermostat kit.
My mistake was connecting it to my Asus wifi router.  I fucking hate carrier.  So now the TP Link router is plugged into a spare port on my Asus router.
 
I don't see coil, airflow, outside or fan speed readings - i assume this is because i have a non communicating air conditioner unit?
 
Now i need to figure out how to use the non-resty API inteface in infinitude to hook to either Vera or ISY994i... will keep people updated if interested.
 
Also i noticed that 'System settings updated Thu 2015-06-18 at 9:40PM' doesn't report last contact time, this made me think it had stopped reporting, but i noticed currentactivity was updated almost instantly - could we have a heartbeat time somewhere?
 
Lastly it is raining outside, it is 68F outside, not sure why it shows freezing rain on the thermostat :-)
 
@scyto ughhh. Sorry about the wifi router issue. I have no idea why that might be, but I'm glad you're at least seeing some progress. I actually installed OpenWRT on my TPLink router that they gave me. Would be pretty funny to install Infinitude on that, but the platform is a bit restrictive for perl libs etc.
 
I haven't written a completely RESTy interface to Infinitude just yet because of other priorities, but check out https://github.com/nebulous/infinitude/issues/2 for info on how to run simpler GET/POSTs to Infinitude for access/control.
 
A heartbeat indication is a great idea. Adding to todo.txt... And yes, infinitude should respond much more quickly than carrier's apps do. Their default update rate is in minutes, but infinitude polls every 12 seconds which is as arbitrary as it sounds. Could be faster.
 
Now, for weather: It's entirely possible that I mixed up one of the icon types. You can hit http://yourInfinitudeBox/weather/yourzipcode/forecast and send me the xml and I'll see if I can figure it out. Alternately you may set your wunderground id to an empty string and allow infinitude to pass the weather request on to carrier's servers. That, or look the other way until it updates again :)
 
It sounds like you're almost completely in business now though, which is cool! Keep letting me know what works and what doesn't and we'll get it all sorted.
 
Speaking of perl libs: sorry the dependencies are such a pain. Perl and I go way back, so I sometimes gloss over some of the finer points. @lleo, are you saying that the debian package was out of date, but Mojolicious installed from cpan worked out? If so, that's fairly typical since Debian tends to lag far behind. One thing I would suggest to any future travelers installing perl modules. Try the system supplied packages first of course, but if you would like to install from cpan, use the cpanminus tool. (http://cpanmin.us/)  It's fantastic. Much lighter than the default cpan tool, and has a flag to allow for all libs to be installed in the directory of your choice: which should eliminate the possibility of borking the whole install. Though it's highly reliable when installing libs to the system path as well.
 
 
lleo said:
@scyto - after I installed the right mojolicious from cpan, './infinitude test' and 'prove -v' ran without errors. I started infinitude in daemon mode on the default port 3000 and can access it on my network. I am not getting any data on the status page, however, there is data coming in on the serial page from my system.
 
At this point I will need more hand holding as not sure how to move past this point.
 
I am interested in just getting realtime usage data on my system. My system is a 2-zone variable speed NG furnace/airhandler with a greenspeed variable speed heatpump and an older non-networked thermostat/control in 1st zone and a Smart Sensor in the 2nd zone. I have however a SAM connected to my wired network. The serial port of the SAM is connected to my Elk M1 and I am able to do basic control/automation through that. The SAM also provides a web interface for directly altering the settings of the control.
 
@nebulous - should infinitude report system data with my arrangement?
I'm glad to see serial is working. As tuits permit I'm going to see if I can setup a "send debug info" button of some kind so we can easily snarf and compare serial data. Yours is of course especially interesting since the SAM is included :)
 
As for the dashboard, here's how it works:
 
The top row contains items sent over tcp from your touch thermostat to infinitude. This only works if your stat is configured (in proxy settings) to send its data to carrier by way of infinitude.
 
The bottom row shows data from the serial stream, but is still limited to registers and devices that I have on my system. It's entirely possible that your devices have different addresses and/or report temperature/fan speeds in different registers. So, infinitude should be able to report the data it sees, but we may need to update it with where to look. Fortunately the serial tab makes that easy(er) to determine. The top of the serial page shows frames scrolling by in realtime, and the bottom shows current overall state of the system that infinitude is aware of(presently that state is persisted only in your browser). When an item in a particular device changes, infinitude should create another row in the "state" table for it, and highlight the bytes which changed. Basically with a bit of detective work*, any data that comes from your wired devices and is displayed in some way on the thermostat should be available to infinitude and in that stream. Non-communicating devices of course will report no data.
 
*you can always force some variables to change to narrow it down. For instance, you could (after setting your zones to off so the AC doesn't go bananas) start running the serial monitor and then take a hairdryer to the smart sensor. The highlighted skyrocketing values are likely to be its temperature.
 
lleo said:
@scyto - after I installed the right mojolicious from cpan, './infinitude test' and 'prove -v' ran without errors. I started infinitude in daemon mode on the default port 3000 and can access it on my network. I am not getting any data on the status page, however, there is data coming in on the serial page from my system.
 
At this point I will need more hand holding as not sure how to move past this point.
 
I am interested in just getting realtime usage data on my system. My system is a 2-zone variable speed NG furnace/airhandler with a greenspeed variable speed heatpump and an older non-networked thermostat/control in 1st zone and a Smart Sensor in the 2nd zone. I have however a SAM connected to my wired network. The serial port of the SAM is connected to my Elk M1 and I am able to do basic control/automation through that. The SAM also provides a web interface for directly altering the settings of the control.
 
@nebulous - should infinitude report system data with my arrangement?
 
 
attachicon.gif
infinitude.jpg
 
lleo
 
Sounds very similar to what i had, here are somethings to try
 
1) make sure you can ping the thermostat from you debian box
2) make sure the thermostat connects and works 100% reliably with the carrier infinity website (not the SAM website); if it is not try using the tp-link router supplied by carrier in the thermostat kit - seems my thermostat ans ASUS router totally freaked each other out causing 404 errors from the carrier website
3) i had 2 DoA SAMs (from ebay) but IIRC it says on those that if you are installing them with infinity touch you need to disable the wifi/network port on the B-SAM - not sure if this is true but it may affect how the thermostat works if there is a reason they say this in the SAM manual
4) make sure you set the proxy port on the thermostat correctly AFTER you are sure it is working correctly with the carrier website (try setting a set point on the carrier website and make sure it changes on the thermostat - the thermostat saying connected is NOT a reliable indicator.
5. check for this is the debug output on the console - the 2413x number will be unique to your system, if you don't see this then your thermostat is not sending data to infinitude, you should see this regularly.
 
[Sat Jun 20 20:19:04 2015] [debug] /systems/2413W002618/status
[Sat Jun 20 20:19:04 2015] [debug] POST "/systems/2413W002618/status"
[Sat Jun 20 20:19:04 2015] [debug] Routing to a callback
[Sat Jun 20 20:19:04 2015] [debug] 200 OK (0.078482s, 12.742/s)
 
nebulous said:
Speaking of perl libs: sorry the dependencies are such a pain. Perl and I go way back, so I sometimes gloss over some of the finer points. @lleo, are you saying that the debian package was out of date, but Mojolicious installed from cpan worked out? If so, that's fairly typical since Debian tends to lag far behind. One thing I would suggest to any future travelers installing perl modules. Try the system supplied packages first of course, but if you would like to install from cpan, use the cpanminus tool. (http://cpanmin.us/)  It's fantastic. Much lighter than the default cpan tool, and has a flag to allow for all libs to be installed in the directory of your choice: which should eliminate the possibility of borking the whole install. Though it's highly reliable when installing libs to the system path as well.
 
 
Fortunately the serial tab makes that easy(er) to determine. The top of the serial page shows frames scrolling by in realtime, and the bottom shows current overall state of the system that infinitude is aware of(presently that state is persisted only in your browser). When an item in a particular device changes, infinitude should create another row in the "state" table for it, and highlight the bytes which changed. Basically with a bit of detective work*, any data that comes from your wired devices and is displayed in some way on the thermostat should be available to infinitude and in that stream. Non-communicating devices of course will report no data.
 
*you can always force some variables to change to narrow it down. For instance, you could (after setting your zones to off so the AC doesn't go bananas) start running the serial monitor and then take a hairdryer to the smart sensor. The highlighted skyrocketing values are likely to be its temperature.
cpanimus and some other installer are what borked my raspberry pi totally- by having split perl installs on the system that broke apt-get - good if one is a perl expert otherwise my reccomendation is stick with the one built into ones distro.  I will write-up cleaner version of my install instructions for pi and put on the wiki :-)
 
On my serial tab i have two unidentified destinations.  
 
The thermostat sends to DST 96  to address 00 03 08 
00 0F 00 00 00 00 00 00

F 0F 0F 0F 0F 0F 0F 0F


0F 0F 0F 00 00 00 00 00


00 00 00 00 00 00 00 00

 
and to address 00 34 04 it sends 00
 
and the furnace sends to 65 (though that isn't recorded in the log part of the screen, only the stream)
 
my furnace  regularly exceptions too sending data 0A to address 0A - not sure if that matters,
 
Happy to send dumps or other data if needed.
 
I posted thee first draft of the pi how to, still lots to add like how to seyup serial port and make it even more newbie friendly.  But would love feedback.  BTW i didn't use the verbose setup command you state in the readme.md and everything worked... though i literally know almost nothing, long time windows users, pi for my home automation is my first foray into linux :-)
 
https://github.com/nebulous/infinitude/wiki/Installing-Infinitude-on-Raspberry-PI-(raspbian) 
 
I need some help, seems to run on any port equal or lower than 1024 one has to sudo the script or get an error about port creation.
 
When i run from the infinitude directory sudo ./infinitude daemon -l http://:81 everything is ok.
 
When i run a fully qualified path such as sudo /home/pi/link/infinitude/infinitude daemon -l http://:81 the webserevr starts but IE gets a 404 error and chrome gets a 'undefined' in the top left of webpage and nothing else.
 
I am trying to figure out the rc.local command i need, i assume it would be something like this, but this doesn't seem to work, not sure how this is related to the error above?


sudo -u pi perl /home/pi/link/infinitude/infinitude daemon -l http://:81 > /dev/null 2>&1 & 
 
 
scyto said:
https://github.com/nebulous/infinitude/wiki/Installing-Infinitude-on-Raspberry-PI-(raspbian) 
 need some help, seems to run on any port equal or lower than 1024 one has to sudo the script or get an error about port creation.
 
When i run a fully qualified path such as sudo /home/pi/link/infinitude/infinitude daemon -l http://:81 the webserevr starts but IE gets a 404 error and chrome gets a 'undefined' in the top left of webpage and nothing else.
 
I am trying to figure out the rc.local command i need, i assume it would be something like this, but this doesn't seem to work, not sure how this is related to the error above?


sudo -u pi perl /home/pi/link/infinitude/infinitude daemon -l http://:81 > /dev/null 2>&1 & 
 
 
Thanks for the doc updates.
<1024 Unix based operating systems to not allow non-root users to run services on ports below 1024. This is to prevent any shell user from starting a service up for the entire system and purporting to be authoritative. The correct way to handle this in the case of a Rpi running infinitude is to just run via sudo. For a truly multiuser setup, follow whatever procedures fit your security model.
 
Infinitude should run from a shell within its own directory. That is: 

cd /some/directory/infinitude
./infinitude daemon

So if you'd like to run it from a different location I'd recommend a tiny wrapper shell script like so (call it start_infinitude.sh):

#!/bin/sh

cd /some/directory/infinitude

# you can set your wunderground key without editing config
# by setting the WUNDERGROUND_KEY environment variable
WUNDERGROUND_KEY=yourapikeyhere ./infinitude daemon

Then, after marking the script executable, you can run ./start_infinitude.sh instead of cd'ing to the directory and running separately.
 
Also, if you'd rather not have so much debugging output(it's great at first, but could be annoying once things are humming) try the mode option:
 
 
Code:
./infinitude -m production daemon
 
Back
Top