Page 7 of 7

Re: RPIEasy

Posted: 14 Oct 2020, 20:34
by 2stimpy
If I check that box, after I press submit, it automatically unchecks.
Probably because I use output(high), I use this, because this is the only setting to make sure the relay does not switch at startup.
And that probably has something to do with the fact that when the relay is low, the state is 1. And when the relay is activated the state is 0.

I have tried output when the box will check. I still can't switch while publishing to the set topic.
I first have to toggle in the interface.

Maybe there is a rule to send the current state to the state topic on rpi start.

Re: RPIEasy

Posted: 14 Oct 2020, 21:33
by enesbcs
2stimpy wrote: 14 Oct 2020, 20:34 Maybe there is a rule to send the current state to the state topic on rpi start.
RPIEasy updated.
Please add debug log lines next time, when you have questions about how RPIEasy works.

Re: RPIEasy

Posted: 15 Oct 2020, 18:43
by 2stimpy

Code: Select all

18:31:35 Event: gpio2#HekStatus=0
18:31:35 Event: gpio3#Deurbel=0
18:31:35 Event: gpio4#Brievenbus=0
18:31:35 State preserving is disabled
18:31:35 Event: gpio14#Doorgang=0
18:31:35 Event: GenMQTT#Disconnected
18:31:35 MQTT controller: xxx.0.0.xxx:xxxx connection failed [Errno 101] Network is unreachable
18:31:35 Event: System#Boot
18:31:35 Webserver starting at port 80
18:31:35 Event: Clock#Time=Thu,18:31
18:31:35 Event: Network#Disconnected
18:32:00 Event: Clock#Time=Thu,18:32
18:33:00 Event: Clock#Time=Thu,18:33
18:34:00 Event: Clock#Time=Thu,18:34
18:35:00 Event: Clock#Time=Thu,18:35
18:35:58 Event: relais#hek=0
18:35:58 CMD: timerSet,1,2
18:35:58 MQTT not connected, sending failed.
18:35:58 Event: GenMQTT#Connected
18:36:00 Event: Rules#Timer=1
18:36:00 CMD: gpio,15,1
18:36:00 Event: relais#hek=1
18:36:00 Event: Clock#Time=Thu,18:36
18:36:51 Event: relais#hek=0
18:36:51 CMD: timerSet,1,2
18:36:53 Event: Rules#Timer=1
18:36:53 CMD: gpio,15,1
18:36:53 Event: relais#hek=1
18:37:00 Event: Clock#Time=Thu,18:37
18:37:14 Event: relais#hek=0
18:37:14 CMD: timerSet,1,2
18:37:16 Event: Rules#Timer=1
18:37:16 CMD: gpio,15,1
18:37:16 Event: relais#hek=1
18:38:00 Event: Clock#Time=Thu,18:38
18:38:21 Event: relais#hek=0
18:38:21 CMD: timerSet,1,2
18:38:23 Event: Rules#Timer=1
18:38:23 CMD: gpio,15,1
18:38:23 Event: relais#hek=1
18:39:00 Event: Clock#Time=Thu,18:39
18:40:00 Event: Clock#Time=Thu,18:40
18:41:00 Event: Clock#Time=Thu,18:41
18:42:00 Event: Clock#Time=Thu,18:42
18:43:00 Event: Clock#Time=Thu,18:43
18:43:48 Event: GenMQTT#Disconnected
18:43:48 Event: GenMQTT#Connected
18:44:00 Event: Clock#Time=Thu,18:44
18:45:00 Event: Clock#Time=Thu,18:45
18:46:00 Event: Clock#Time=Thu,18:46
18:47:00 Event: Clock#Time=Thu,18:47
18:48:00 Event: Clock#Time=Thu,18:48
18:49:00 Event: Clock#Time=Thu,18:49
18:50:00 Event: Clock#Time=Thu,18:50
18:51:00 Event: Clock#Time=Thu,18:51
18:52:00 Event: Clock#Time=Thu,18:52
18:53:00 Event: Clock#Time=Thu,18:53
18:54:00 Event: Clock#Time=Thu,18:54
18:55:00 Event: Clock#Time=Thu,18:55
18:56:00 Event: Clock#Time=Thu,18:56

Here is a log after a restart. MQTT is not connected at first, only after pushing the toggle it will connect.
Strange, have to dig into that.

Re: RPIEasy

Posted: 15 Oct 2020, 19:36
by enesbcs
2stimpy wrote: 15 Oct 2020, 18:43

Code: Select all

18:31:35 Event: GenMQTT#Disconnected
18:31:35 MQTT controller: xx.0.0.xxx:xxxx:1883 connection failed [Errno 101] Network is unreachable
18:31:35 Event: Network#Disconnected
Here is a log after a restart. MQTT is not connected at first, only after pushing the toggle it will connect.
Strange, have to dig into that.
Not just the MQTT, the whole TCP/IP network is disconnected. Wifi or Ethernet? Did you try with a larger power supply or separating the relay to another power supply - with common ground?

Re: RPIEasy

Posted: 15 Oct 2020, 19:43
by 2stimpy
Even with the relay disconnected this message appears.
The power supply is an original pi one.
below is a log without anything connected.

Code: Select all

19:39:48 Event: gpio2#HekStatus=0
19:39:48 Event: gpio3#Deurbel=0
19:39:48 Event: gpio4#Brievenbus=0
19:39:48 State preserving is disabled
19:39:48 Event: gpio14#Doorgang=0
19:39:48 Event: GenMQTT#Disconnected
19:39:48 MQTT controller: xx.0.0.xxx:xxxx connection failed [Errno 101] Network is unreachable
19:39:49 Event: System#Boot
19:39:49 Webserver starting at port 80
19:39:49 Event: Clock#Time=Thu,19:39
19:39:49 Event: Network#Disconnected
19:40:00 Event: Clock#Time=Thu,19:40
19:41:00 Event: Clock#Time=Thu,19:41
19:42:00 Event: Clock#Time=Thu,19:42
19:42:19 Event: relais#hek=0
19:42:19 CMD: timerSet,1,2
19:42:19 MQTT not connected, sending failed.
19:42:19 Event: GenMQTT#Connected
19:42:21 Event: Rules#Timer=1
19:42:21 CMD: gpio,15,1
19:42:21 Event: relais#hek=1
19:42:28 Event: relais#hek=0
19:42:28 CMD: timerSet,1,2
19:42:30 Event: Rules#Timer=1
19:42:30 CMD: gpio,15,1
19:42:30 Event: relais#hek=1
19:42:33 Event: relais#hek=0
19:42:33 CMD: timerSet,1,2
19:42:35 Event: Rules#Timer=1
19:42:35 CMD: gpio,15,1
19:42:35 Event: relais#hek=1
Isn't it strange that it is starting the webserver after it tries to connect to the network?

Re: RPIEasy

Posted: 16 Oct 2020, 09:31
by enesbcs
2stimpy wrote: 15 Oct 2020, 19:43 Isn't it strange that it is starting the webserver after it tries to connect to the network?
There is nothing strange in the starting of the webserver, as it is unconditional.
Is it wifi connection? Ethernet is connected or not? Which Raspbian release?

Re: RPIEasy

Posted: 16 Oct 2020, 20:54
by 2stimpy
I have debian buster installed, maybe thats the problem.
I'll try raspbian this weekend.

Re: RPIEasy

Posted: 18 Oct 2020, 19:28
by 2stimpy
I did a new fresh install with the desktop and let it update after installation.
After that I installed RpiEasy again and configured it.

I have no idea why this is happening but again my (ethernet) network does not seem to work correct.

Code: Select all

19:23:00 Event: gpio2#HekStatus=0
19:23:00 Event: gpio3#Deurbel=0
19:23:00 Event: gpio4#Brievenbus=0
19:23:00 Event: gpio14#Doorgang=0
19:23:00 Event: relais#hek=1
19:23:00 relais: Restoring previous GPIO value 1
19:23:00 State preserving is enabled
19:23:00 Event: GenMQTT#Disconnected
19:23:00 MQTT controller: xx.0.0.xxx:xxxx connection failed [Errno 101] Network is unreachable
19:23:00 Event: System#Boot
19:23:00 Webserver starting at port 80
19:23:00 Event: Clock#Time=Sun,19:23
And when I enable Wifi I get the same error, except later it says network connected.
But still no mgtt message on first attempt. I have to push the toggle button once to get a message, or activate one of the other switches by pressing run.
Otherwise mqtt will not connect.

Code: Select all

19:48:33 Event: gpio2#HekStatus=0
19:48:33 Event: gpio3#Deurbel=0
19:48:33 Event: gpio4#Brievenbus=0
19:48:33 Event: gpio14#Doorgang=0
19:48:33 Event: relais#hek=1
19:48:33 relais: Restoring previous GPIO value 1
19:48:33 State preserving is enabled
19:48:33 Event: GenMQTT#Disconnected
19:48:33 MQTT controller: xx.0.0.xxx:xxxx:1883 connection failed [Errno 101] Network is unreachable
19:48:33 Event: System#Boot
19:48:33 Webserver starting at port 80
19:48:33 Event: Clock#Time=Sun,19:48
19:48:33 Event: Network#Connected
19:49:09 Event: Clock#Time=Sun,19:49

Re: RPIEasy

Posted: 18 Oct 2020, 21:12
by enesbcs
2stimpy wrote: 18 Oct 2020, 19:28 I have no idea why this is happening but again my (ethernet) network does not seem to work correct.

Code: Select all

19:23:00 MQTT controller: xx.0.0.xxx:xxxx connection failed [Errno 101] Network is unreachable
At least there are no active network connection available when RPIEasy starting. Maybe the dhcp process waiting for a long time, or other boot processes take place first before dhcp. It is not RPIEasy related as RPIEasy did not manage the network layer, but Linux startup sequence related question.
2stimpy wrote: 18 Oct 2020, 19:28 Otherwise mqtt will not connect.
I guess you have no real sensor task in your configuration, as the RPIEasy mqtt controller tries to reconnect automatically when a _sensor_ fails to send information.
But actuators do not send data periodically, so self healing was never triggered, until you click manually as you said...

I've added a new option to "Generic MQTT controller": "Check conn & reconnect if needed at every 30 sec". Please update RPIEasy, restart, then enable it and try again.

Re: RPIEasy

Posted: 18 Oct 2020, 21:42
by 2stimpy
I do not have dhcp enabled because I like to have a fixed ip, so I know on what address I can reach the pi.
I did te upgrade and this was my log right after that. Strange thing is that mqtt is connecting right away.

Code: Select all

21:24:18 .........
21:24:18 Event: GenMQTT#Connected
21:24:18 Event: System#Boot
21:24:18 Webserver starting at port 80
21:24:18 Event: Clock#Time=Sun,21:24
21:24:51 Event: GenMQTT#Disconnected
21:24:51 Event: GenMQTT#Connected
21:24:57 Event: GenMQTT#Disconnected
21:24:57 Event: GenMQTT#Connected
21:25:00 Event: Clock#Time=Sun,21:25
This is the second restart and here is the failed connection back.
But as you can see your added option does the trick.

Code: Select all

21:27:23 ......
21:27:23 Event: GenMQTT#Disconnected
21:27:23 MQTT controller: xx.0.0.xxx:xxxx connection failed [Errno 101] Network is unreachable
21:27:23 Event: System#Boot
21:27:23 Webserver starting at port 80
21:27:23 Event: Clock#Time=Sun,21:27
21:27:23 MQTT controller: xx.0.0.xxx:xxxx connection failed [Errno 101] Network is unreachable
21:27:53 Event: GenMQTT#Connected
21:28:09 Event: Clock#Time=Sun,21:28
21:28:49 Event: relais#hek=0
21:28:49 CMD: timerSet,1,2
21:28:51 Event: Rules#Timer=1
21:28:51 CMD: gpio,15,1
21:28:51 Event: relais#hek=1
My relay is reacting right upon the first switching moment. The switches(sensor) also work right after the mqtt reconnect.

Below is the third restart, again with mqtt connected right away, strange.

Code: Select all

21:36:57 ...........
21:36:57 Event: GenMQTT#Disconnected
21:36:57 Event: GenMQTT#Connected
21:36:57 Event: System#Boot
21:36:57 Webserver starting at port 80
21:36:57 Event: Clock#Time=Sun,21:36
It doesn't really mather now, this is working great.
Thank you so much for your help, and most of all your patience.

Greetz Arnold

Re: RPIEasy

Posted: 18 Oct 2020, 22:58
by Ath
Arnold, there is no need to 'hide' the 10.0.0.x ip-address of your MQTT server, as that ip range is not routable over the internet as it is specially reserved for local intranets (many routers use it for their internal network, similar to the 192.168.x.y range, and a couple more), so nobody can reach it from 'outside'. Just to save you some editing of the logs :D

Re: RPIEasy

Posted: 19 Oct 2020, 09:25
by 2stimpy
Ok, I wasn't sure about the visible ip.
At first I thought it was ok, you can see it in a quote. Later I thought, better safe than sorry. But of course it had no effect because of the quote witch already had my ip in it. :(

Re: RPIEasy

Posted: 19 Oct 2020, 09:30
by enesbcs
Yep, 10.x.x.x is not routable address range. But if anybody get into your network, for example with a help of a cloud-enabled hacked IP camera, than will have a good idea where is your server... But it is unlikely. :)

Re: RPIEasy

Posted: 02 Dec 2020, 21:48
by VBill
Hello
I installed RPIEasy on a Pi3 and I managed to create controllers and devices :
I get the information from 1 LYWSD02 and 4 LYWSD03 that I send to a Pi4 with domoticz on it.
Really great.
But I have a problem: I can't open the Hardware tab! When I click on it, the browser waits (with the little circle running for loading) but I never get the display of the tab. (Chrome/Firefox or edge)
Is there a solution to get the tab open ?
Thank you

Re: RPIEasy

Posted: 02 Dec 2020, 22:30
by enesbcs
VBill wrote: 02 Dec 2020, 21:48 But I have a problem: I can't open the Hardware tab! When I click on it, the browser waits (with the little circle running for loading) but I never get the display of the tab. (Chrome/Firefox or edge)
Is there a solution to get the tab open ?
Did you run RPIEasy as root? Did you installed GPIO at dependency page first?

I guess that some sort of error occured during the creation of the hardware page. An error line may be seen on the debug logs. Without logs, i have no clue.

Re: RPIEasy

Posted: 30 Jan 2021, 19:57
by Lonzo
Hi, I´m searching for a few of hours about this:

I want to use custom variables like ESPEasy %vx% and let,x,value

After a lot of tries it is not working!

Are there syntax-differencies between ESPEasy and RPIEasy?

I want to do something like this:

on BME280_1#Feuchtigkeit do
if [BME280_1#Feuchtigkeit] <> %v1%
SendToHTTP 192.168.179.15,8181,/config/xmlapi/statechange.cgi?ise_id=2527&new_value=[BME280_1#Feuchtigkeit]
Let,1,[BME280_1#Feuchtigkeit]
endif
endon

Means: only sendig if value has changed.
In ESPEASy it is working fine!
Thank you

Lonzo

Re: RPIEasy

Posted: 30 Jan 2021, 21:00
by enesbcs
Lonzo wrote: 30 Jan 2021, 19:57 Hi, I´m searching for a few of hours about this:
Next time you can check the wiki:
https://github.com/enesbcs/rpieasy/wiki ... mmand-list
Lonzo wrote: 30 Jan 2021, 19:57 I want to do something like this:

on BME280_1#Feuchtigkeit do
if [BME280_1#Feuchtigkeit] <> %v1%
SendToHTTP 192.168.179.15,8181,/config/xmlapi/statechange.cgi?ise_id=2527&new_value=[BME280_1#Feuchtigkeit]
Let,1,[BME280_1#Feuchtigkeit]
endif
endon
Please link the ESPEasy wiki page that describes %v1% and Let command. I have never used or seen this, so they are not yet implemented in RPIEasy. I am using Dummy devices to hold values.

Re: RPIEasy

Posted: 30 Jan 2021, 21:05
by TD-er

Re: RPIEasy

Posted: 30 Jan 2021, 22:34
by enesbcs
Thanks! Issue added to rpieasy.
Mm interesting, so if anyone names its device as "var" or "int" its values can not be accessed anymore.

Re: RPIEasy

Posted: 30 Jan 2021, 22:37
by TD-er
Yep, Those are reserved keywords.

Re: RPIEasy

Posted: 07 Feb 2021, 20:06
by enesbcs
Global variable support added at today's commit.