Page 15 of 39
Re: Toon as a domotica controller?
Posted: Tue Jan 26, 2016 11:01 pm
by cygnusx
Hm, since my toon v3/qt update i seem to get connection refused when i request urls like
http://toon:7080/happ_thermstat?action= ... mostatInfo
How about you guys??
Re: Toon as a domotica controller?
Posted: Tue Jan 26, 2016 11:06 pm
by Ierlandfan
@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!!
Can you show us what you changed?
Re: Toon as a domotica controller?
Posted: Thu Jan 28, 2016 10:33 am
by cygnusx
Sure, place this rule under line 80 in /etc/init.d/dropbear:
Code: Select all
sed -i 's/Toon:/2Toon:\n-A HCB-INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT/g' /etc/default/iptables.conf
So, it's after the line echo "$NAME."
Then, you execute the update. After the update when it reboots, you cannot enter ssh. But, the ipconfig file has changed. So, when you restart again, ssh is back
Don't forget to remove the line again, because otherwise it will add a line to the iptables.conf everytime you boot.
Re: Toon as a domotica controller?
Posted: Sat Jan 30, 2016 2:04 pm
by RDNZL
You can also insert the complete iptables table by using 'cat <<-EOF | iptables-restore <your rules here on new lines> EOF'
This way it's active after every reboot (no extra reboot needed) and no need to remove it.
Re: Toon as a domotica controller?
Posted: Tue Feb 09, 2016 5:46 pm
by cygnusx
Getting pretty quiet here. Ppl have some News?
On my end. I'm using my Toon now for about two weeks live on my wall as thermostat.
I readout the current temp, set temp, boiler temp, retour temp and modulation level and log that to a database, to put that in a graph.
Next to that, i have a alarm system. When i turn my alarm on, my scheme changes to Away. When i turn it off, scheme goes to home.
My thermostat is scheduled to go to sleep scheme every night at 10pm. till morning 6 o clock.
And, i've updated Toon to the QT gui. It's faaarrr more customisable than the Flash GUI.
I've edited the gas and power tiles so it doesn't read my current gas/power output via Z-wave meteradapter, but to read my server which i already had connected to the P1 port via HTTP.
in fact, you could change about anything. From startup and eneco logo's, to making your own widgets. I've made my own widget which switches my garden lights on or off when i tap on it. It also shows if the lights should be on or off. (It actually sends a http request to my domotica system which turns the lights on/off).
QT is a simple language with many possibilities via Javascript. Therefore, almost everything is possible

Re: Toon as a domotica controller?
Posted: Tue Feb 09, 2016 5:53 pm
by marcelr
No News is good News
I had a look at the qt stuff as well. Would be nice to eliminate the agreementDetails* from some of the widgets. Will have to look into that, I'm not familiar with qt (never worked with it).
And, if you have something that may be useful to others, post it, so other people can join in the fun.
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Tue Feb 09, 2016 8:57 pm
by cygnusx
AgreementDetails are not really that interesting. You can activate any module you like in the /HCB2/qml/qb/base/Globals.qml . if you check out around line 77, you see which apps are loaded no matter if you have a subscription or not. If you look in the /HCB2/qml/apps/ folder you see all the availible apps. So you can add the apps you like, or create your own new app folder and build a app.
Not all the apps work without a agreement. For instance. The weather app communicates via VPN. Don't know if you need a subscription, but you do need a VPN. I'm rebuilding this app myself at the moment so that it gets the information straight from the internet instead of the VPN. The base source is buienradar anyway.
Re: Toon as a domotica controller?
Posted: Tue Feb 09, 2016 10:45 pm
by marcelr
Thanks, will give that a try. I just would like to see my toon's databases in graphs. Not sure if that's going to work by juggling the default apps. I think toon phones home for those graphs.
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Wed Feb 10, 2016 7:25 am
by al_n
cygnusx wrote:AgreementDetails are not really that interesting. You can activate any module you like in the /HCB2/qml/qb/base/Globals.qml . if you check out around line 77, you see which apps are loaded no matter if you have a subscription or not. If you look in the /HCB2/qml/apps/ folder you see all the availible apps. So you can add the apps you like, or create your own new app folder and build a app.
Not all the apps work without a agreement. For instance. The weather app communicates via VPN. Don't know if you need a subscription, but you do need a VPN. I'm rebuilding this app myself at the moment so that it gets the information straight from the internet instead of the VPN. The base source is buienradar anyway.
I would like to see the weather on toon again

Re: Toon as a domotica controller?
Posted: Wed Feb 10, 2016 10:40 am
by cygnusx
Well, for starters, do you have vpn still connected? If so, add the weather module in the "Globals.qml" file. I'm interested if it works out of the box with you.
Re: Toon as a domotica controller?
Posted: Wed Feb 10, 2016 6:22 pm
by al_n
it used to work, but I don't have a subscription anymore and the vpn is shutdown.
Re: Toon as a domotica controller?
Posted: Wed Feb 10, 2016 10:17 pm
by hvxl
How do you guys develop those qml scripts? I just made my first minor customizations of existing scripts and then kill the qt-gui process to activate the changes. But the qt-gui process takes a long time to restart, so that really slows down development.
@marcelr: I get many graphs without toon going out to the internet. Or did I misunderstand which graphs you're referring to?
Re: Toon as a domotica controller?
Posted: Thu Feb 11, 2016 12:34 am
by marcelr
@marcelr: I get many graphs without toon going out to the internet. Or did I misunderstand which graphs you're referring to?
I haven't got any graphs. Maybe I'm looking for them in the wrong spot.
When adding a tile, I can just add bar graphs of today's consumption (electricity or gas), and a clock. That's it.
grtz,
marcelr
Re: Toon as a domotica controller?
Posted: Thu Feb 11, 2016 10:27 am
by cygnusx
As far as i saw it, the graphs are still being generated (rrd), but you can only click on the tile if you have a valid subscription.
If you look at the onclick part of the ....tile.qml file, for instance the UsageThisMomentTile.qml. you see this:
Code: Select all
onClicked: {
stage.openFullscreen(app.graphScreenUrl, {agreementType: 'electricity', unitType: "energy", intervalType: "hours", consumption: true, production: true})
}
So it checks if you have something like electricity in your agreement. I guess it just won't open the tile if you don't have that agreement.
app.graphScreenUrl = GraphScreen.qml
Simply said, it tries to know if you have a agreement, in the graphApp.xml it sais:
agreementDetailsElectricity = parseInt(globals.features["electricity"]);
So, it looks at your global features. That's set (again) in your Globals.xml file. around line 58 you will see that it loads some kind of xml file. From there it loads the features you can use. It's easy to add a custom feature. For instance, you could add the line:
before line 57.
I think just altering this file is enough to get a working electricity graph. But i did not try this yet.
Edit: oh yeah, killing qt-gui is the fastest way to try for me too. I did make a tool so i can fetch a screenshot of the toon from my webserver, to develop from anywhere. But of course, you can't click anything then...
Re: Toon as a domotica controller?
Posted: Thu Feb 11, 2016 12:23 pm
by hvxl
There's no mention of "electricity" in my Globals.qml. I suspect the setting comes from /HCBv2/config/config_happ_scsync.xml. There's a bunch of parameters in there, among which: <ElectricityDisplay>1</ElectricityDisplay>