Page 14 of 39
Re: Toon as a domotica controller?
Posted: Thu Jan 21, 2016 10:04 pm
by cygnusx
Ok, got my toon working! Great. Now to get access.
Another thing. Im missing the Wifi pci board. Gotta find another one. Anyone found some other Wifi drivers then the realtek board thats originally on them? And does the ethernet port work?
Re: Toon as a domotica controller?
Posted: Thu Jan 21, 2016 10:43 pm
by marcelr
Ethernet works, just plug it in. Toon does a DHCP request and then has functional ethernet (if your router permits).
Toon's linux kernel is built with a minimal amount of drivers, with kernel module versioning switched on. So, afterwards, you can't add drivers that weren't in the original build, without replacing the kernel as well.
The wifi module (realtek RTL819(1)(2)S) is available from ebay. $7.-- or thereabouts.
What kind of toon is that anyway? No boiler interface, no WiFi module, no power supply?
I'd go find another one on MP, less hassle.
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Fri Jan 22, 2016 10:26 am
by cygnusx
Ah yes i see. I get a eneco-..... in my DHCP list. I thought it didn't work because the lights on the ethernet port don't work.
Tomorrow time to hook it up to a serial connection

Re: Toon as a domotica controller?
Posted: Fri Jan 22, 2016 8:44 pm
by cygnusx
OK i'm in. Trying to get past the autentication part, as i don't have a activation key.
I'm redirecting all traffic so it don't go via the VPN but to my own webserver.
i edited /HCBv2/config/hcb_project.xml
There is a <commonHostname> field. I edited it to my server.
Now i can view the requests and respond different to the real server.
Can anyone maybe make a dump or something so i can see how Quby responds to a registration event?
As i see, every 10 seconds it sends a request to /QubyRegistration/
in the post request it asks :
Code: Select all
<action_class="invoke" uuid="eneco-xxx:happ_scsync" destuuid="xxx" serviceid="urn:hcb-hae-com:serviceId:quby" requestid="6xxx" commonname="eneco-xxx">
<u:GetAgreementDetail xmlns:u="http://schema.homeautomationeurope.com/quby"><requestId>6xxx</requestId>
<timeout>10</timeout>
</u:GetAgreementDetail>
</action>
What is your response? I suppose you get a succes = true message of some kind.
If i know the response, i can mimic it and start building my toon proxy to activate it without having a eneco contract...
Re: Toon as a domotica controller?
Posted: Fri Jan 22, 2016 11:32 pm
by marcelr
Can't help you there, don't have an Eneco account myself. It will be interesting to see what kind of traffic is going on, though.
As for the authentication, do you have a file called "configured" , permissions 644, size 0 bytes, owner root:root, in your toon's root directory?
I'm not sure, but it could very well be that that sets the authentication flag. Just touch it and see what happens.
Otherwise, you can edit config_happ_scsync.xml, look for the phrases
Code: Select all
<activated>1</activated><wizardDone>1</wizardDone>
and edit according to your needs.
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Sat Jan 23, 2016 12:02 pm
by cygnusx
Apparently <wizardDone>1</wizardDone> was enough

Activated = 1 does not work with me. it then doesnt load the flash UI.
So, i'm still on the Flash UI. Is the QT ui faster and better? Or are you all sticking to flash as well?
I think i can make my own widgets for the Flash kind, don't know about the QT kind, no experience with it.
Re: Toon as a domotica controller?
Posted: Sat Jan 23, 2016 12:36 pm
by al_n
You can do this POST(!) request to change the contract and set the active modules.
Change XXXXXX to your toon id, set the end date timestamp to something in the future.
Code: Select all
POST /bxtproxy HTTP/1.1
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.6.0_26
Host: eneco-001-XXXXXX.hcb.ams.int
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Content-type: application/x-www-form-urlencoded
Content-Length: 786
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action xmlns:u="http://schema.homeautomationeurope.com/quby" class="invoke" commonname="SC" uuid="85b42535-beb6-43ab-97b3-4d402861977c" destuuid="eneco-001-XXXXXX:happ_scsync" destcommonname="eneco-001-XXXXXX" requestid="dLOKQTYVnP" serviceid="specific1">
<u:SetAgreementDetail>
<StartDate>1395705600</StartDate>
<EndDate>1433116800</EndDate>
<Status>IN_SUPPLY</Status>
<ProductVariant>Toon</ProductVariant>
<Rights>
<SoftwareUpdates>true</SoftwareUpdates>
<ChMaintenance>true</ChMaintenance>
<ElectricityDisplay>true</ElectricityDisplay>
<GasDisplay>true</GasDisplay>
<HeatDisplay>false</HeatDisplay>
<ProduDisplay>false</ProduDisplay>
<ContentApps>true</ContentApps>
<TelmiEnabled>false</TelmiEnabled>
</Rights>
</u:SetAgreementDetail>
</action>
Re: Toon as a domotica controller?
Posted: Sat Jan 23, 2016 12:52 pm
by cygnusx
Great! Will try it.
Do you all have version one's of the toon? Or also the newer one?
I'm thinking of buying from someone, he has a newer version. Not sure if it is as hackable as this one...
Re: Toon as a domotica controller?
Posted: Sat Jan 23, 2016 6:55 pm
by cygnusx
So, now i have a second toon

this time a complete one.
And, this one is actually legit activated. I got a message that there is a version 3 update ready as well!
Not sure if i want it though... Seems like the Flash UI is pretty customisable. Does anyone have the QT version. And is it ok? Is it faster?
And i read someone updated and lost its ssh/root. Do you think it's possible to update without losing ssh? Would save me the stress of tinkering with the NAND legs...
Re: Toon as a domotica controller?
Posted: Sat Jan 23, 2016 8:44 pm
by marcelr
Flash version is easily hacked (GUI-wise) (My testing toon, barebones OS, don't do flash hacking myself).
Qt version is A LOT faster in response (is my production thermostat, currently drives my boiler). Low-level software (OpenTherm, z-wave etc) is pretty much the same.
Not sure whether you also lose the serial console on ttymxc0 when upgrading. If only dropbear is chucked out, you should be OK.
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Sun Jan 24, 2016 8:15 pm
by Ierlandfan
@cygnusx
if you decide to upgrade an registrered Toon the iptables will be reset. So you don't loose dropbear but you can't login due to iptables refusing it. You are not loosing root. So use serial connection afterwards, change iptables to allow poort 22 and you are in like flin.
Re: Toon as a domotica controller?
Posted: Sun Jan 24, 2016 10:39 pm
by cygnusx
I updated my test toon to the qt version. I modified the /etc/init.d/dropbear script to replace the iptables config. Will post the change of anyone likes. So i didnt have to open the box up again. Worked like a charm and damn, qt is much faster!!
Re: Toon as a domotica controller?
Posted: Mon Jan 25, 2016 12:10 pm
by cygnusx
I'm trying to create a tile of my own now. In the QT gui. Looks pretty customisable. My goal is to create a tile with data from the internet, refreshed every x seconds. If i can get that to work, the possibilities are endless.
Re: Toon as a domotica controller?
Posted: Mon Jan 25, 2016 1:17 pm
by marcelr
Bring it on!
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Mon Jan 25, 2016 2:53 pm
by cygnusx
Ok, a very basic work in progress example:
Code: Select all
import QtQuick 1.1
//import qb.base 1.0
import qb.components 1.0
Tile {
id: clockTile
// tileSize: tilesize_2X1
/// Will be called when widget instantiated
property string testStringetje: "leeg"
function init() {}
onClicked: {
stage.openFullscreen(app.fullScreenUrl);
}
function getData() {
var xmlhttp = new XMLHttpRequest();
var url = "http://url/test.json";
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
var arr = JSON.parse(xmlhttp.responseText);
clockTile.testStringetje = arr['test1'];
//txtTimeBig.text = test;
}
}
//clockTile.testStringetje = xmlhttp.readyState.toString();
//clockTile.testStringetje = XMLHttpRequest.DONE.toString();
//clockTile.testStringetje = Math.random().toString();
//console.log(xmlhttp.readyState.toString());
//console.log("response: "+xmlhttp.responseText);
//try {
// console.log("status: "+xmlhttp.status);
//} catch(err) {
// console.log(err.message);
//}
}
xmlhttp.open("GET", url);
xmlhttp.send();
//console.log("test1");
}
Text {
id: txtTimeBig
//text: app.timeStr
text: clockTile.testStringetje
color: colors.clockTileColor
anchors.centerIn: parent
horizontalAlignment: Text.AlignHCenter
font.pixelSize: dimState ? 65 : 50
font.family: qfont.regular.name
}
Text {
id: txtDate
text: app.dateStr
color: colors.clockTileColor
anchors {
horizontalCenter: parent.horizontalCenter
baseline: parent.bottom
baselineOffset: -16
}
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 16
font.family: qfont.regular.name
visible: !dimState
}
Timer {
id: timerTestjeu
repeat: true
interval: 3000
onTriggered: getData()
running: true
}
}
this is the file /HCB2/qml/apps/clock/ClockTile.qml
This is pure as a test. It modifies your clock widget to get a JSON file from a webserver of your liking. It does this every 3 seconds. The file it gets could have contents like this:
Code: Select all
{"test1":"test 123", "test2":"bla2"}
Now, my next test will be editing the energy usage widget. I have my own energy-monitor via p1 on a raspberry pi. So i don't need the meteradapter from eneco. Let's see if i can get the current usage from my raspberry instead of the normal z-wave communication.
