Toon app: ToonBot
Moderators: marcelr, TheHogNL, Toonz
Re: Toon app: ToonBot
I have just installed and activated ToonBot. After a difficulty to type the token into the Toon (one character wrong and it doesn't work), it's better to use SSH indeed and copy the token into the toon. Super thanks for this. Now it's easy to change the thermostat temperature from distance. I only ask myself if any stranger can change my temperatures at home as they guess my bot name?
Maybe an idea for future enhancements: some info about the electricity usage and about the collected kWh of the solar panels.
Thanks again.
Maybe an idea for future enhancements: some info about the electricity usage and about the collected kWh of the solar panels.
Thanks again.
Re: Toon app: ToonBot
I don't know for sure. I looked at this a long time ago. I'am not very familiar using with telegram.Edgar wrote:I only ask myself if any stranger can change my temperatures at home as they guess my bot name?
Take a look at the first part of this sarafian.github.io/low-code/2020/03/24/ ... atbot.html (Disable joining groups).
I don't know if this is enough.
Maybe you can test it with another user.
edit:
I looked into this and security improvements can be made. I'am working on it right now.
Re: Toon app: ToonBot
I have made v.1.2.0 with added security. See start post.
Is released in Toonstore.
Is released in Toonstore.
Re: Toon app: ToonBot
The security option works well. Great enhancement and thanks. Any idea if the electricity usage and production could be showed by this bot? I also thought about to send a message to switch on a Fibaro plug or this kind of plugs. For example to switch on the dishwasher at the moment the weather is sunny
Re: Toon app: ToonBot
Of course I can show electricity usage.Edgar wrote:The security option works well. Great enhancement and thanks. Any idea if the electricity usage and production could be showed by this bot? I also thought about to send a message to switch on a Fibaro plug or this kind of plugs. For example to switch on the dishwasher at the moment the weather is sunny
I could make a few configurable custom commands where you can configure a url which is carried out for example. I don't have a fibaro plug so I don't know the commands to switch on/off.
Do you have a working example of an url which can be used to switch on and off the plug?
But at the moment I'am busy with some other stuff. So I will take a look later on this subjects.
Re: Toon app: ToonBot
I made a new release v1.3.0 with a new command to request the energy usage.Edgar wrote:The security option works well. Great enhancement and thanks. Any idea if the electricity usage and production could be showed by this bot? I also thought about to send a message to switch on a Fibaro plug or this kind of plugs. For example to switch on the dishwasher at the moment the weather is sunny
Re: Toon app: ToonBot
Great option and works great. Could be in the /info one, so we can have all info of the Toon in one view, or is that too much together? About the Fibaro plugs, I don't have them myself, maybe in future. The electricity today in euro (stroom vandaag in €), is that possible to add that? I use that to see if my solar panels receive some electricity as my kWh meter doesn't show the led to connect it to the sensor of the Toon. Thanks for this great app!glsf91 wrote:I made a new release v1.3.0 with a new command to request the energy usage.Edgar wrote:The security option works well. Great enhancement and thanks. Any idea if the electricity usage and production could be showed by this bot? I also thought about to send a message to switch on a Fibaro plug or this kind of plugs. For example to switch on the dishwasher at the moment the weather is sunny
Re: Toon app: ToonBot
Adding to /info took more effort. I think not everybody wants to include this in /info. But it is now possible to get the energy. When using setcommands in Botfather (see post 1) you can predefine the commands for easy use. So little effort to get the data.Edgar wrote:Great option and works great. Could be in the /info one, so we can have all info of the Toon in one view, or is that too much together? About the Fibaro plugs, I don't have them myself, maybe in future. The electricity today in euro (stroom vandaag in €), is that possible to add that? I use that to see if my solar panels receive some electricity as my kWh meter doesn't show the led to connect it to the sensor of the Toon. Thanks for this great app!
For getting the electricity in euro's is more complex. Because (I think) it is calculated, not in a "database". Also the costs of energy are not updated on a rooted Toon.
So for now I will not add this. Maybe later if I get bored someday .
Last edited by glsf91 on Fri Oct 09, 2020 7:58 pm, edited 1 time in total.
-
- Starting Member
- Posts: 11
- Joined: Sat Oct 17, 2020 8:19 pm
Re: Toon app: ToonBot
Hi,
I installed Toon Bot. I receives the data but does not return data tot telegram(only Toon heeft het commando: /energie ontvangen) In the tile the status changes to “Ophalen gegevens mislukt...”
What can be wrong?
I installed Toon Bot. I receives the data but does not return data tot telegram(only Toon heeft het commando: /energie ontvangen) In the tile the status changes to “Ophalen gegevens mislukt...”
What can be wrong?
Re: Toon app: ToonBot
Is it working for the /info command?Henrihendriksen wrote:Hi,
I installed Toon Bot. I receives the data but does not return data tot telegram(only Toon heeft het commando: /energie ontvangen) In the tile the status changes to “Ophalen gegevens mislukt...”
What can be wrong?
If not, try from a browser: http://<ipaddress>/happ_thermstat?action=getThermostatInfo
Replace <ipaddress> for your Toon ip-address. This should give an answer.
-
- Starting Member
- Posts: 11
- Joined: Sat Oct 17, 2020 8:19 pm
Re: Toon app: ToonBot
It’s not working for any command. In Telegram I only get the message that Toon has received the command. But there is no additional information returned.glsf91 wrote:Is it working for the /info command?Henrihendriksen wrote:Hi,
I installed Toon Bot. I receives the data but does not return data tot telegram(only Toon heeft het commando: /energie ontvangen) In the tile the status changes to “Ophalen gegevens mislukt...”
What can be wrong?
If not, try from a browser: http://<ipaddress>/happ_thermstat?action=getThermostatInfo
Replace <ipaddress> for your Toon ip-address. This should give an answer.
I tried the line from the browser but the response is that the site is not available.
If was also looking with debug ON for the console.log data. But it is not clear for me where the data is stored.
Re: Toon app: ToonBot
This is the cause it is not working. Looks like the Toon is not listening on port 80.Henrihendriksen wrote: I tried the line from the browser but the response is that the site is not available.
If you login on the Toon bij SSH you should see with this command: netstat -an|grep LISTEN
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
(and more)
The second line should be there. Do you have that line?
And which firmware version do you use?
Also post content of cat /etc/default/iptables.conf
-
- Starting Member
- Posts: 11
- Joined: Sat Oct 17, 2020 8:19 pm
Re: Toon app: ToonBot
There is no line with 80 or 10080. So you are right that is does not respond to httpglsf91 wrote:This is the cause it is not working. Looks like the Toon is not listening on port 80.Henrihendriksen wrote: I tried the line from the browser but the response is that the site is not available.
If you login on the Toon bij SSH you should see with this command: netstat -an|grep LISTEN
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
(and more)
The second line should be there. Do you have that line?
And which firmware version do you use?
Also post content of cat /etc/default/iptables.conf
My iptables:
COMMIT
##############################################################################
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:HCB-INPUT - [0:0]
-A INPUT -j HCB-INPUT
-A FORWARD -j HCB-INPUT
-A HCB-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# These are all closed for Quby/Toon:
-A HCB-INPUT -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A HCB-INPUT -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
-A HCB-INPUT -p tcp -m tcp --dport 10080 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
#-A HCB-INPUT -p udp -m udp --sport 67:68 --dport 67:68 -j ACCEPT
#-A HCB-INPUT -p udp -m udp --dport 137:138 -j ACCEPT
-A HCB-INPUT -i lo -j ACCEPT
-A HCB-INPUT -i tap+ -j ACCEPT
-A HCB-INPUT -i tun+ -j ACCEPT
-A HCB-INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j DROP
-A HCB-INPUT -p udp -m udp -j DROP
COMMIT
##############################################################################
-
- Starting Member
- Posts: 11
- Joined: Sat Oct 17, 2020 8:19 pm
Re: Toon app: ToonBot
Firmware is 5.33.9glsf91 wrote:This is the cause it is not working. Looks like the Toon is not listening on port 80.Henrihendriksen wrote: I tried the line from the browser but the response is that the site is not available.
If you login on the Toon bij SSH you should see with this command: netstat -an|grep LISTEN
tcp 0 0 0.0.0.0:10080 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
(and more)
The second line should be there. Do you have that line?
And which firmware version do you use?
Also post content of cat /etc/default/iptables.conf