123solar 1.8

Talks about solar stuff
jeanmarc
Posts: 2086
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.8

Post by jeanmarc » Fri Mar 20, 2020 10:12 pm

Andy, did you use 123Solar 1.8.4.1 ? If not use it

andy
Posts: 73
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar 1.8

Post by andy » Fri Mar 20, 2020 10:35 pm

up to date
Image

andy
Posts: 73
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar 1.8

Post by andy » Fri Mar 20, 2020 11:21 pm

i did it! telegram test
1 create new bot with @BotFather
1-1 view BOT_TOKEN of your bot
2 create new group
3 add your bot in this group
4 view CHAT_ID of your group
5 input CHAT_ID in format '-xxxxxxxxxx' (MINUS required)
test your bot with this url

Code: Select all

https://api.telegram.org/botBOT_TOKEN/getme
test send message

Code: Select all

https://api.telegram.org/botBOT_TOKEN/sendMessage?text='test'&chat_id=-CHAT_ID

jeanmarc
Posts: 2086
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.8

Post by jeanmarc » Sat Mar 21, 2020 5:24 am

Your /var/lock permissions is ok but for a reason your http user or php can't write in there.
Did you set some sort of open_basedir restriction in php.ini ?

jeanmarc
Posts: 2086
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.8

Post by jeanmarc » Sat Mar 21, 2020 5:37 am

Ok, there still a glich with telegram test, change 'Test Telegram' admin/admin_meter2.php with a print_r

Code: Select all

	echo "
      <br><div align=center><br><font color='#8B0000'><b>We encountered an error sending the message</b></font>
      <br>&nbsp;
	  <br>";
	  print_r($output);
	  echo "
	  <br>
      <br>&nbsp;
      <INPUT TYPE='button' onClick=\"location.href='admin_invt.php?invt_num=$invt_numx'\" value='Back'></div>";
CHAT_ID should have no minus in 123s settings

andy
Posts: 73
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar 1.8

Post by andy » Sat Mar 21, 2020 12:18 pm

Code: Select all

We encountered an error sending the message
 
Array ( [ok] => [error_code] => 400 [description] => Bad Request: chat not found ) 
As i say telegram error "chat not found" if chat_id without minus

jeanmarc
Posts: 2086
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.8

Post by jeanmarc » Sat Mar 21, 2020 12:28 pm

Did you get the good "chat":{"id"} number ?

Code: Select all

curl -s -X POST https://api.telegram.org/bot<TOKEN>/getUpdates

andy
Posts: 73
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar 1.8

Post by andy » Sat Mar 21, 2020 12:41 pm

yes
i get chat id with minus in telegram responce

jeanmarc
Posts: 2086
Joined: Thu Aug 29, 2013 7:16 am

Re: 123solar 1.8

Post by jeanmarc » Sat Mar 21, 2020 1:27 pm

So it's a group chat. Do you really need that ?

andy
Posts: 73
Joined: Wed May 04, 2016 10:25 am
Location: Ukraine
Contact:

Re: 123solar 1.8

Post by andy » Sat Mar 21, 2020 1:32 pm

So it's a group chat. Do you really need that ?
Yes. 123solar must send message to me and to other person (in my case)

===========================================================
It may be worth expanding the capabilities of the bot.
1 make a template for messages (multilingual)
2 send messages if output = 0
3 if the output is less than the forecast by 30% (example)
4 if 123solar does not work (running bash script)
5 Sending regular messages with the development of today (custom interval)
6 it is obligatory to indicate the name of the inverter in the messages (often there are several of them, and the bot is preferably common to all)

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests