Toon as a domotica controller?
Moderators: marcelr, TheHogNL, Toonz
Re: Toon as a domotica controller?
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??
How about you guys??
-
- Member
- Posts: 153
- Joined: Thu Oct 03, 2013 7:53 pm
Re: Toon as a domotica controller?
@cygnusx
Can you show us what you changed?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?
Sure, place this rule under line 80 in /etc/init.d/dropbear:
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.
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
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.
- RDNZL
- Forum Moderator
- Posts: 1008
- Joined: Sun Sep 24, 2006 1:45 pm
- Location: Dordrecht, The Netherlands
- Contact:
Re: Toon as a domotica controller?
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.
This way it's active after every reboot (no extra reboot needed) and no need to remove it.
Regards, Ron.
Re: Toon as a domotica controller?
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
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?
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

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?
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.
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?
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
grtz,
marcelr
Re: Toon as a domotica controller?
I would like to see the weather on toon againcygnusx 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.

Re: Toon as a domotica controller?
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?
it used to work, but I don't have a subscription anymore and the vpn is shutdown.
Re: Toon as a domotica controller?
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?
@marcelr: I get many graphs without toon going out to the internet. Or did I misunderstand which graphs you're referring to?
Schelte
Re: Toon as a domotica controller?
I haven't got any graphs. Maybe I'm looking for them in the wrong spot.@marcelr: I get many graphs without toon going out to the internet. Or did I misunderstand which graphs you're referring to?
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?
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:
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...
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})
}
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:
Code: Select all
myFeatures["electricity"] = "1";
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?
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>
Schelte