Toon as a domotica controller?

Everything about rooting Toons 1 and 2.

Moderators: marcelr, TerrorSource, Toonz, TheHogNL

Re: Toon as a domotica controller?

Postby al_n » Thu Dec 10, 2015 2:23 pm

marcelr wrote:
I couldn't ssh from toon to my mac got an error:
ssh: connection to root@10.10.10.2:22 exited: no matching algo kex

Is probably a Mac problem, not toon's :-).


Not really, its a dropbear problem
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby Ierlandfan » Thu Dec 10, 2015 7:33 pm

Here you can see some screenshots with OT data from Toon. I know there's a json call to set the programs and thermostat just have to find it again.

toondomoticz2.png
toondomoticz2.png (200.62 KiB) Viewed 12123 times

toondomoticz.png
toondomoticz.png (201.2 KiB) Viewed 12123 times
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

Re: Toon as a domotica controller?

Postby Ierlandfan » Thu Dec 10, 2015 11:04 pm

cat happ_thermstat.txt |grep handl
or
cat happ_thermstat.txt |grep web

ip_toon:7080/happ_thermstat?action=getDhwSettings
ip_toon:7080/happ_thermstat?action=setDhwSettings //needs parameters
// don't know
http://ip_toon:7080/happ_thermstat?action=setSetpoint //needs parameters
//probably need steps, outTemps, setTemps'
http://ip_toon:7080/happ_thermstat?action=requestDataId
//no idea about format, alwas returns OK
http://ip_toon:7080/happ_thermstat?action=GetHolidays
//Holidays need to be set somewhere
http://ip_toon:7080/happ_thermstat?WriteDataId
/needs parameters
http://ip_toon:7080/happ_thermstat?action=getActiveNext
{result:'ok',
{active:[programType=1, temperatureValue=2250, temperatureState=0, startTime=1449727200, endTime=1449784800],
{next:[programType=1, temperatureValue=0, temperatureState=2, startTime=1449784800, endTime=1449813600]
}

//debug data..it's seems possible to change the state..need to find out how
{result:'error', comment:'need state'}
happ_thermstat: {result:'error', comment:'invalid state'}
happ_thermstat: {result:'ok', stateValue:'%i'}

Those are examples of web_handlers which you can query. Some needs specific values. You can find them in /Hcbv2/sbin/<binary>. Just do a strings -f <binary> to find more info.
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 9:35 am

the web handlers are not part of the source distro available from quby, right? Or did I miss anything?
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 10:40 am

I've decompiled happ_thermstat, gives a better overview of the handlers

Code: Select all
int32_t web_debugOT(int32_t a1, int32_t a2, int32_t a3);
int32_t web_getActiveNext(int32_t a1, int32_t a2, int32_t a3);
int32_t web_getWeeklyList(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleActivateTimer(int32_t a1);
int32_t web_handleChangeSchemeState(int32_t a1);
int32_t web_handledoFwUpgrade(int32_t a1, int32_t a2);
int32_t web_handleGetDhwSettings(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handlegetEdge2Stats(int32_t a1, int32_t a2);
int32_t web_handleGetHeatingHistory(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_handleGetSchemeState(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleGetStateValue(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleGetThermostatInfo(int32_t a1, int32_t a2);
int32_t web_handleMemDataId(int32_t a1, int32_t a2);
int32_t web_handleNotifyChange(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_handlePrintTableInfo(int32_t a1);
int32_t web_handleRequestDataId(int32_t a1, int32_t a2);
int32_t web_handleResetGwMem(void);
int32_t web_handleRoomSetpoint(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleSetBoilerOnOff(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleSetDhwSettings(int32_t a1, int32_t a2);
int32_t web_handleTestBoilerEvent(int32_t a1, int32_t a2);
int32_t web_handleUpdateDhwValue(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleUpdateStateValue(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_handleWriteDataId(int32_t a1, int32_t a2);
int32_t web_master(int32_t a1, int32_t a2, int32_t a3, int32_t * a4);
int32_t web_specialOverride(int32_t a1, int32_t a2, int32_t a3);
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby marcelr » Fri Dec 11, 2015 10:46 am

the web handlers are not part of the source distro available from quby, right? Or did I miss anything?


Nope, it's closed source stuff.
This is happ_thermstat for SW 2.9.6, right?
What tool did you use for disassembly? (So I can check whether stuff has been added for 3.0 and possibly later).

grtz,

marcelr
marcelr
Global Moderator
Global Moderator
 
Posts: 1080
Joined: May 2012
Location: Ehv

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 10:59 am

Yes 2.9.6
I've used an online tool at: https://retdec.com
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby Ierlandfan » Fri Dec 11, 2015 4:52 pm

FW 3.1.22

int32_t waitOtTimeout(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_debugOT(int32_t a1, int32_t a2, int32_t a3);
int32_t web_getActiveNext(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_getWeeklyList(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleActivateTimer(int32_t a1);
int32_t web_handleChangeSchemeState(int32_t a1);
int32_t web_handledoFwUpgrade(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleGetDhwSettings(int32_t a1, int32_t a2);
int32_t web_handlegetEdge2Stats(int32_t a1, int32_t a2);
int32_t web_handleGetHeatingHistory(int32_t a1, int32_t a2);
int32_t web_handleGetHolidays(int32_t a1, int32_t a2);
int32_t web_handlegetRemoveHoliday(int32_t a1);
int32_t web_handleGetSchemeState(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleGetStateValue(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_handleGetThermostatInfo(int32_t a1, int32_t a2);
int32_t web_handleMemDataId(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_handleNotifyChange(int32_t a1, int32_t a2);
int32_t web_handlePrintTableInfo(int32_t a1);
int32_t web_handleRequestDataId(int32_t a1, int32_t a2);
int32_t web_handleResetGwMem(void);
int32_t web_handleRoomSetpoint(int32_t a1, int32_t a2);
int32_t web_handleSetBoilerOnOff(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
int32_t web_handleSetDhwSettings(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleSetHoliday(int32_t a1);
int32_t web_handleTestBoilerEvent(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleUpdateDhwValue(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleUpdateStateValue(int32_t a1, int32_t a2, int32_t a3);
int32_t web_handleWriteDataId(int32_t a1, int32_t a2);
int32_t web_master(int32_t a1, int32_t a2, int32_t a3, char * a4);
int32_t web_specialOverride(int32_t a1, int32_t a2, int32_t a3);
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

Re: Toon as a domotica controller?

Postby Ierlandfan » Fri Dec 11, 2015 5:11 pm

If a handler isn't working try without Capitalised first letter.
E.g:
NotifyChange(int32_t a1, int32_t a2);
http://ip_toon:7080/happ_thermstat?action=NotifyChange
No Handler found

http://ip_toon:7080/happ_thermstat?action=notifyChange //n in notify not capitalised
{result:'ok', dataId:'0', 'value1':'02', 'value2':'00'}
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 7:39 pm

any luck with changing programs or changing any settings?
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 7:47 pm

my toon was disconnected from the internet until yesterday when I rooted it. Now it is connected but I still get a warning that there is a connection problem (I guess because it cant reach quby/eneco). That's no problem but I do wonder why I don't get the weather info. Do you get it?
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby marcelr » Fri Dec 11, 2015 8:24 pm

I do wonder why I don't get the weather info. Do you get it?

I don't get it, never have, since I don't have an eneco account.
If you have shut down the OpenVPN connection, then you won't get any weather info. toon tries to download some javascript stuff from quby, to display the weather and traffic info (at least in FW <= 2.9.33).

grtz,

marcelr
marcelr
Global Moderator
Global Moderator
 
Posts: 1080
Joined: May 2012
Location: Ehv

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 8:56 pm

Could be nice if we could proxy this somehow to display the info.
Can you tell us what is being downloaded?

I do see a definition to http://xml.buienradar.nl in hcb_project.xml
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby al_n » Fri Dec 11, 2015 8:59 pm

ideally we can hack a dns entry so toon will talk to an alternative server
al_n
Member
Member
 
Posts: 52
Joined: June 2015

Re: Toon as a domotica controller?

Postby Ierlandfan » Fri Dec 11, 2015 10:29 pm

Possible way:

hcb_project.xml:

<happ_weather>
<squareImage>1</squareImage>
<defaultLocation>Utrecht</defaultLocation>
<disableData>0</disableData>
<contentProxyUrl>javaExternalContentProxy/?url=</contentProxyUrl>
<trafficXmlUrl>http://xml.fileindex.nl</trafficXmlUrl>
<weatherXmlUrl>http://xml.buienradar.nl</weatherXmlUrl>
<servletPath>http://www.buienradar.nl</servletPath>
</happ_weather>

Maybe if we change it to another (local) proxy or unset it, it will be downloaded through normal connection instead of the VPN
Ierlandfan
Member
Member
 
Posts: 150
Joined: October 2013

PreviousNext

Return to Toon Rooting

Who is online

Users browsing this forum: No registered users and 1 guest