Giter Club home page Giter Club logo

rpieasy's People

Contributors

bsimmo avatar clumsy-stefan avatar enesbcs avatar teepox avatar tonhuisman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rpieasy's Issues

APDS9660 timer bug

In proximity/light mode the timer seems to be activated for checking gestures, and it should not work like that.

Mini Dashboard for local control

Is it possible to add Mini Dashboard for standalone local control like link below:

https://www.letscontrolit.com/wiki/index.php/Mini_Dashboard

Code seems to come from espeasy webserver.ino file as below;

//********************************************************************************
// Web Interface server web file from SPIFFS
//********************************************************************************
bool loadFromFS(boolean spiffs, String path) {
// path is a deepcopy, since it will be changed here.
checkRAM(F("loadFromFS"));
if (!isLoggedIn()) return false;

statusLED(true);

String dataType = F("text/plain");
if (path.endsWith("/")) path += F("index.htm");

if (path.endsWith(F(".src"))) path = path.substring(0, path.lastIndexOf("."));
else if (path.endsWith(F(".htm"))) dataType = F("text/html");
else if (path.endsWith(F(".css"))) dataType = F("text/css");
else if (path.endsWith(F(".js"))) dataType = F("application/javascript");
else if (path.endsWith(F(".png"))) dataType = F("image/png");
else if (path.endsWith(F(".gif"))) dataType = F("image/gif");
else if (path.endsWith(F(".jpg"))) dataType = F("image/jpeg");
else if (path.endsWith(F(".ico"))) dataType = F("image/x-icon");
else if (path.endsWith(F(".txt")) ||
path.endsWith(F(".dat"))) dataType = F("application/octet-stream");
else if (path.endsWith(F(".esp"))) return handle_custom(path);
if (loglevelActiveFor(LOG_LEVEL_DEBUG)) {
String log = F("HTML : Request file ");
log += path;
addLog(LOG_LEVEL_DEBUG, log);
}

path = path.substring(1);
if (spiffs)
{
fs::File dataFile = SPIFFS.open(path.c_str(), "r");
if (!dataFile)
return false;

//prevent reloading stuff on every click
WebServer.sendHeader(F("Cache-Control"), F("max-age=3600, public"));
WebServer.sendHeader(F("Vary"),"*");
WebServer.sendHeader(F("ETag"), F("\"2.0.0\""));

if (path.endsWith(F(".dat")))
  WebServer.sendHeader(F("Content-Disposition"), F("attachment;"));
WebServer.streamFile(dataFile, dataType);
dataFile.close();

}
else
{
#ifdef FEATURE_SD
File dataFile = SD.open(path.c_str());
if (!dataFile)
return false;
if (path.endsWith(F(".DAT")))
WebServer.sendHeader(F("Content-Disposition"), F("attachment;"));
WebServer.streamFile(dataFile, dataType);
dataFile.close();
#endif
}
statusLED(true);
return true;
}

//********************************************************************************
// Web Interface custom page handler
//********************************************************************************
boolean handle_custom(String path) {
// path is a deepcopy, since it will be changed.
checkRAM(F("handle_custom"));
if (!clientIPallowed()) return false;
path = path.substring(1);

// create a dynamic custom page, parsing task values into [#] placeholders and parsing %xx% system variables
fs::File dataFile = SPIFFS.open(path.c_str(), "r");
const bool dashboardPage = path.startsWith(F("dashboard"));
if (!dataFile && !dashboardPage) {
return false; // unknown file that does not exist...
}

if (dashboardPage) // for the dashboard page, create a default unit dropdown selector
{
// handle page redirects to other unit's as requested by the unit dropdown selector
byte unit = getFormItemInt(F("unit"));
byte btnunit = getFormItemInt(F("btnunit"));
if(!unit) unit = btnunit; // unit element prevails, if not used then set to btnunit
if (unit && unit != Settings.Unit)
{
NodesMap::iterator it = Nodes.find(unit);
if (it != Nodes.end()) {
TXBuffer.startStream();
sendHeadandTail(F("TmplDsh"),_HEAD);
TXBuffer += F("<meta http-equiv="refresh" content="0; URL=http://");
TXBuffer += it->second.ip.toString();
TXBuffer += F("/dashboard.esp">");
sendHeadandTail(F("TmplDsh"),_TAIL);
TXBuffer.endStream();
return true;
}
}

TXBuffer.startStream();
sendHeadandTail(F("TmplDsh"),_HEAD);
html_add_autosubmit_form();
html_add_form();

// create unit selector dropdown
addSelector_Head(F("unit"), true);
byte choice = Settings.Unit;
for (NodesMap::iterator it = Nodes.begin(); it != Nodes.end(); ++it)
{
  if (it->second.ip[0] != 0 || it->first == Settings.Unit)
  {
    String name = String(it->first) + F(" - ");
    if (it->first != Settings.Unit)
      name += it->second.nodeName;
    else
      name += Settings.Name;
    addSelector_Item(name, it->first, choice == it->first, false, "");
  }
}
addSelector_Foot();

// create <> navigation buttons
byte prev=Settings.Unit;
byte next=Settings.Unit;
NodesMap::iterator it;
for (byte x = Settings.Unit-1; x > 0; x--) {
  it = Nodes.find(x);
  if (it != Nodes.end()) {
    if (it->second.ip[0] != 0) {prev = x; break;}
  }
}
for (byte x = Settings.Unit+1; x < UNIT_MAX; x++) {
  it = Nodes.find(x);
  if (it != Nodes.end()) {
    if (it->second.ip[0] != 0) {next = x; break;}
  }
}

html_add_button_prefix();
TXBuffer += path;
TXBuffer += F("?btnunit=");
TXBuffer += prev;
TXBuffer += F("'>&lt;</a>");
html_add_button_prefix();
TXBuffer += path;
TXBuffer += F("?btnunit=");
TXBuffer += next;
TXBuffer += F("'>&gt;</a>");

}

// handle commands from a custom page
String webrequest = WebServer.arg(F("cmd"));
if (webrequest.length() > 0 ){
struct EventStruct TempEvent;
parseCommandString(&TempEvent, webrequest);
TempEvent.Source = VALUE_SOURCE_HTTP;

if (PluginCall(PLUGIN_WRITE, &TempEvent, webrequest));
else if (remoteConfig(&TempEvent, webrequest));
else if (webrequest.startsWith(F("event")))
  ExecuteCommand(VALUE_SOURCE_HTTP, webrequest.c_str());

// handle some update processes first, before returning page update...
PluginCall(PLUGIN_TEN_PER_SECOND, 0, dummyString);

}

if (dataFile)
{
String page = "";
page.reserve(dataFile.size());
while (dataFile.available())
page += ((char)dataFile.read());

TXBuffer += parseTemplate(page,0);
dataFile.close();

}
else // if the requestef file does not exist, create a default action in case the page is named "dashboard*"
{
if (dashboardPage)
{
// if the custom page does not exist, create a basic task value overview page in case of dashboard request...
TXBuffer += F("<STYLE>* {font-family:sans-serif; font-size:16pt;}.button {margin:4px; padding:4px 16px; background-color:#07D; color:#FFF; text-decoration:none; border-radius:4px}</STYLE>");
html_table_class_normal();
for (byte x = 0; x < TASKS_MAX; x++)
{
if (Settings.TaskDeviceNumber[x] != 0)
{
LoadTaskSettings(x);
byte DeviceIndex = getDeviceIndex(Settings.TaskDeviceNumber[x]);
html_TR_TD();
TXBuffer += ExtraTaskSettings.TaskDeviceName;
for (byte varNr = 0; varNr < VARS_PER_TASK; varNr++)
{
if ((Settings.TaskDeviceNumber[x] != 0) && (varNr < Device[DeviceIndex].ValueCount) && ExtraTaskSettings.TaskDeviceValueNames[varNr][0] !=0)
{
if (varNr > 0)
html_TR_TD();
html_TD();
TXBuffer += ExtraTaskSettings.TaskDeviceValueNames[varNr];
html_TD();
TXBuffer += String(UserVar[x * VARS_PER_TASK + varNr], ExtraTaskSettings.TaskDeviceValueDecimals[varNr]);
}
}
}
}
}
}
sendHeadandTail(F("TmplDsh"),_TAIL);
TXBuffer.endStream();
return true;
}

Rules timer bug.

I think I have found another minor bug in the rules engine. When you have a timer running and want to cancel it for whatever reason the command is is to set the timer to 0. (timerset,1,0)
What happens is the command is recognized but the result in the log is Event: Rules#timer=1. This does not cancel the rule. It has the effect of just shortening it because what ever is supposed to happen when the timer expires still does.

In short, the timer is not actually cancelled. Whatever logic is defined to occur when it expires naturally is still executed.

New plugin: PCF8574 IO Expander.

While we are adding plugin requests I thought I'd throw this one into the mix. This is quite similar to the MCP23017 chip but it only has 8 GPIO. Very popular for a multitude of things. As time permits of course. :)

PRiEasy don't want to run on a Raspberry Pi 3 Model A Plus

Hello Alexander,

PRiEasy don't want to run on a Raspberry Pi 3 Model A Plus Rev 1.0

install :

  • python3-pip
  • screen
  • alsa-utils
  • wireless-tools
  • wpasupplicant
  • zip
  • unzip
  • jsonpickle
  • net-tools

harald@rpi86:/ff-hier # git clone https://github.com/enesbcs/rpieasy.git
Cloning into 'rpieasy'...
remote: Enumerating objects: 367, done.
remote: Total 367 (delta 0), reused 0 (delta 0), pack-reused 367
Receiving objects: 100% (367/367), 328.26 KiB | 0 bytes/s, done.
Resolving deltas: 100% (235/235), done.

harald@rpi86:/ff-hier # cd rpieasy
harald@rpi86:/ff-hier/rpieasy #

harald@rpi86:/ff-hier/rpieasy # sudo ./RPIEasy.py

console output :

Traceback (most recent call last):
File "./RPIEasy.py", line 365, in
initprogram()
File "./RPIEasy.py", line 330, in initprogram
hardwareInit()
File "./RPIEasy.py", line 111, in hardwareInit
gpios.HWPorts.readconfig()
File "/ff-hier/rpieasy/gpios.py", line 958, in readconfig
self.set_serial(1)
File "/ff-hier/rpieasy/gpios.py", line 689, in set_serial
Settings.Pinout[8]["altfunc"] = 1
IndexError: list index out of range

checked install, recently version is ok:

  • python3-dev
  • python3-rpi.gpio
  • python3-gpiozero
  • python3-smbus
  • python3-serial
  • i2c-tools

harald@rpi86:/ff-hier/rpieasy # sudo ./fixgpio.sh

after all same error.

If I the (data)config files of another working RPiEasy pi (Raspberry Pi Zero W) in the data directory copy in the RPiEasy on the Raspberry Pi 3 A+ then he run

harald@rpi86:/ff-hier/rpieasy # sudo ./RPIEasy.py
10:42:25: Event: System#Boot
10:42:25: Webserver starting at port 8080
10:42:25: Event: Clock#Time=Sun,10:42

no further console output of erros (Console log Level: Debug Developer)

But then I can not at the http://IP:8080/hardware pages (only remains but loading)

Edit (12:50):
If I manually import the url I come with the pages

http://IP:8080/plugins
http://IP:8080/wifiscanner
http://IP:8080/blescanner
http://IP:8080/pinout
http://IP:8080/i2cscanner

RPiEasy runs well on a Rapberry Pi Model B Rev 2, Zero W Rev 1.1, 3 Model B Plus Rev 1.3 !!

greeting Harald

Feature request. OLED Plugins

I know that you are trying to track down any and all bugs before adding new features and I agree wholeheartedly with that. This request should take a back seat to that. I would just like it a whole lot that when you are ready to add more functionality that you consider the OLED stuff first. :>) Preferably the "Framed OLED"

Thanks for the great work you are doing!!

New plugin: MH-z19 Co2

asked in #37
Currently i do not have this device, and it is above my order threshold for a device that i will never use.

Add AP mode

Create an AP when wifi connection unavailable for headless configuration

Support Pro Mini Extender

Thank you for starting great concept. I am user of great Espeasy Software on esp8266 for long time. RPIeasy could be very useful if there is I2C bridge with arduino pro mini thereby getting rid of some limitations of RPI. Whatever RPI can not do should be done by Pro Mini.

Thanks for great start.

Neopixel feedback

was here with NeoPixel and Rules to been playing around, works very well ๐Ÿ‘
my test/example Rules :

on DS18b20#Temperature do
if [DS18b20#Temperature]>21
NeoPixelAll,255,0,0,10 ##Red
endif
if [DS18b20#Temperature]<=21
NeoPixelAll,255,0,255,10 ##Purple
endif
if [DS18b20#Temperature]<=20
NeoPixelAll,255,255,0,10 ##Yellow
endif
if [DS18b20#Temperature]<=19
NeoPixelAll,0,255,0,10 ##Green
endif
if [DS18b20#Temperature]<=18
NeoPixelAll,0,0,255,10 ##Blue
endif
endon

P2P Node list

Sorting of P2P node list is missing, needs to implement

Rules timer greater than 1 do not call events

I have several timers that I use in my irrigation controller. 4 actually. Whenever a rule timer reaches the end the log shows "Rules#Timer=x" (x being any number above 1) and nothing thereafter. The event is not called. Works fine if the rules timer is 1.

Timers above 1 start and run the proper amount of time but do not call any event defined in the rules.
During the time they are running there are no other timers running concurrently. (At least in this case)

Sendtohttp command not working from rules. Works from command line.

I use sendtohttp commands to start and stop video recording with Raspberry Pi cameras. Using a PIR sensor and when pir is triggered the rules sends the command. The log shows that the pir event sends the sentohttp event but the camera does not seem to get the message.
From the tools page using the command line box it does work sending the exact same command manually.

This is the rule....

on pir#switch do
if [pir#switch]=1
sendtohttp 192.168.1.103,80,/cam/cmd_pipe.php?cmd=ca%201
timerSet 1,15
endon
on Rules#Timer=1 do
sendtohttp 192.168.1.103,80,/cam/cmd_pipe.php?cmd=ca%200
endon

This is the web log output.....

22:28:34 CMD: sendtohttp 192.168.1.103,80,/cam/cmd_pipe.php?cmd==ca%201
22:28:34 CMD: timerSet 1,15
22:28:37 Event: si7021#temp=76.3
22:28:37 Event: si7021#humid=19.8
22:28:43 Event: pir#switch=0.0
22:28:49 Event: Rules#Timer=1
22:28:49 CMD: sendtohttp 192.168.1.103,80,/cam/cmd_pipe.php?cmd==ca%200
22:29:00 Event: Clock#Time=Mon,22:29

Camera should record a 15 second video. It does not.
Exact same command works from the tools command box. Camera records video.
Please let me know if you need more info.

Clock#Time rules bug. Only 1 Clock#Time event executes.

I seem to have either found a bug or a limitation. If you have more than one Clock#Time event in your ruleset only the first listed one of them will execute. Was tearing my hair out (of which I have VERY little left) until I tried commenting the first one of them out. When I did that then the second one in the rules worked fine. Even if the first one will do nothing logic wise the second one is still ignored.

Is this a bug or a limitation?

Feedback on AUTO START,MQTT & APDS9960

I have tried rpieasy and I am very happy way it is performing. It is way faster then espeasy on esp8266. I have some feedback and questions -

  • I tried BME280 and it is working perfectly.

  • I also tried APDS9960 and proximity & light part of sensor work fine but I am having problem with gesture part of sensor. Do I have to choose pin for interrupt and if yes what pin should I use ? the gesture sensor shows only 0.00 value no matter how I move my hand above it.

  • I also tried to setup paho mqtt controller and use my rpi's ip for host controller ip but log saying it is failing connection. Am I doing somthing wrong. When I install paho mqtt did I install broker or client ? if broker is not installed on pi do I have to install it separately outside of rpieasy using rpi command line using SSH ?

  • Finally I tried autostart rpieasy feature clicking RPIEasy autostart at boot: option on hardware tab but when I boot autostart of rpieasy doest not work. It's not a big deal I manually start rpieasy after reboot using command line via SSH.

Thanks for your hard work.

26pin GPIO

Saving changes on an old RPI with 26pin GPIO is impossible. (on 40pin devices, this error will not pop up)
Critical core related bug, maybe affects webserver.py, RPIEasy.py and Settings.py.

Node-Red front end

You are doing all new plugins at amazing speed. I don't know how you can do this all this fast.

I am working on front end part for RPIeasy to control devices using node-red. I have basic front end working so user of rpieasy can install node-red and easily connect to rpieasy and have any rpieasy or espeasy device auto detected and basic GUI created by just adding ip address of device on node-red dashboard. Now user can start monitoring sensor data and control whatever is connected to device without any further knowledge of node-red or they can further tweak node-red setting in their editor to customize it as they wish.

I would like to ask you if it is possible to add node-red on dependency page as add on dependency preferably in rpieasy folder to make it smooth process for user to install it and then it can be connected to rpieasy via controller page using MQTT as a new controller. That way RPIEasy is complete package working as out of box IOT platform. With node-red's powerful logic engine and 3000+ plugins library (they call it nodes & flows) it will be very easy to create whole house IOT automation without knowing programming.

Also I was trying to figure out in what files you have system variables like %systemname% defined? I want to try adding some more system variables like %taskno% & %valuenumber% etc. to try with MQTT topics on controllers page.

I am also working on time series database using sqlite to store all sensor data to process these data later on for charts or simply calculate average, high, low values etc. to show it on node-red dashboard.

Of course all this can be done using Home Assistant or Openhab but in my experience they are not very flexible and probably overkill for simple home IOT platform.

I need your feedback and I will request you to set up node-red so you can test it. This is not urgent and I do not want to sidetrack you from your core mission. Just for reference I left following comment at nod-red.

https://discourse.nodered.org/t/new-home-dashboard-using-uibuilder-and-bootstrap-vue/6764/6

Thanks
Ken

New plugin: PCA9685

as per #37
I've just ordered a PCA9685 for testing purposes, i will see what can i do with it, when it will arrive. /in a month i guess :) /

ADS1115 Works on 1 unit but not on another

I have a rather strange problem on 1 of the 2 units I have running. Both units have an ADS1115 module and its only working on 1 of them. The working 1 is measuring voltage and light levels. All is good.
The other unit does not work at all. There is nothing in the log to indicate that it is even trying to read it. This unit is in my irrigation controller that was originally powered by an ESP-07. I removed the ESP and plugged into the I2C wiring and have it connected to the RPI unit. This controller has several I2C components and everything is working except the ADS1115. It has an OLED, an MCP23017, a PCF8574 and an SI7021 module. All of these show up correctly in the I2C scan page. The MCP23017, OLED and SI2021 are all functioning just fine. Reading values and displaying on the OLED is all good. The ADS1115 is not working at all. There is no log entries showing anything at all. I have added it and removed it several times and rebooted each time and still nothing. Its as if its not even there. Seems like RPIEasy is completely ignoring it. When I plug in the ESP everything works.

Please let me know what you may need to figure this out. Thanks.

" and " in rules either not implemented or not working.

I have a rule I am trying to use with an "and" statement in it. I know this was implemented in ESPEasy but not sure about here.

The rule I am using....
if [station#hours]>47 and [auto#switch]=0 do This evaluates as false. The switch is indeed at "0" and the station hours are indeed more than 47
if [station#hours]>47 Evals as true by itself
if [auto#switch]=0 Evals as true by itself.
Like the issue title says. Either not implemented or not working.
If not implemented can you? :)
If a bug, can you exterminate? :)
No big rush. Whenever you have the time.....
Thanks again for this awesome software!!

RPI GPIO input changes do not always register. No event.

I have been noticing this quite a bit during the conversion of my irrigation controller from ESP to RPIEasy. I have 3 toggle switches connected to 3 of the PI GPIO pins. Quite a bit of rules logic happens when these switches are thrown. It seems random but its more noticeable when the unit has been sitting idle for a period of time. When the switch is toggled the PI does not react at all. Nothing in the log output at all when this happens. However toggling it within a few seconds of the firs attempt it will work as it should. It seems like the PI doesn't "get the message" sometimes.

Te actual GPIO's in question here are 17, 22 and 27. All are set as "input pullup" in the hardware page.
Could it be that the missed pin change is due to the PI doing something else at that instant? Like I mention above its random but noticeably more after some idle time.

RPIEasy "Build" info on the main page ?

To first this is a very nice project, thank you so much.

Question,

Is it possible to the RPIEasy "Build" info (RPIEasy 0.19.018) on the main page to set up ?

I had already tried it myself in to the "webserver.py" line 93 :

TXBuffer += "Build:" + rpieGlobals.PROGNAME + " " + rpieGlobals.PROGVER

output RPIEasy Main page:

System Info Value
Unit: 84
Build: RPIEasy 0.19.018
Local Time: 2019-01-19 11:33:52
Uptime: 0 days 0 hours 6 minutes
Load: 3.41 %
Free Mem: 762864 kB

many thanks, greeting Harald

Node-Red Dashboard

It was nice of you too integrate dashbord to RPIEasy and I tried to build my simple dashboard but had difficulties and it required lot of web coding which is not my expertise. So I started working on node-red dashboard and within few hours I was able to do simple web interface to use rpieasy effectively. Node-red is very easy and sufficient for my simple control interface. I have also rearranged rpieasy UI on nodered dashboard so when I am testing some new device I do not have to shift through all useful tab which is frequently used for testing.Following is dashboard image and flow files I used for it.

nodered

Flows I used:

SubFlow Template for whole house automation:
(12 rooms or devices & it is scalable to more with simple editing of flow)

[{"id":"26e9f43b.6e33ec","type":"subflow","name":"Events","info":"motion\nhome\naway\nalarm\nintrusion\noled\nirtx\nirrx\noutdoor temperature\noutdoor humidity\noutdoor pressure\noutdoor lux","category":"","in":[{"x":53,"y":107,"wires":[{"id":"a4c3a63b.58ed58"}]}],"out":[{"x":280,"y":40,"wires":[{"id":"a4c3a63b.58ed58","port":0}]},{"x":340,"y":40,"wires":[{"id":"a4c3a63b.58ed58","port":1}]},{"x":400,"y":40,"wires":[{"id":"a4c3a63b.58ed58","port":2}]},{"x":460,"y":40,"wires":[{"id":"a4c3a63b.58ed58","port":3}]},{"x":280,"y":100,"wires":[{"id":"a4c3a63b.58ed58","port":4}]},{"x":340,"y":100,"wires":[{"id":"a4c3a63b.58ed58","port":5}]},{"x":400,"y":100,"wires":[{"id":"a4c3a63b.58ed58","port":6}]},{"x":460,"y":100,"wires":[{"id":"a4c3a63b.58ed58","port":7}]},{"x":280,"y":160,"wires":[{"id":"a4c3a63b.58ed58","port":8}]},{"x":340,"y":160,"wires":[{"id":"a4c3a63b.58ed58","port":9}]},{"x":400,"y":160,"wires":[{"id":"a4c3a63b.58ed58","port":10}]},{"x":460,"y":160,"wires":[]}]},{"id":"a4c3a63b.58ed58","type":"switch","z":"26e9f43b.6e33ec","name":"Events","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"motion","vt":"str"},{"t":"cont","v":"home","vt":"str"},{"t":"cont","v":"away","vt":"str"},{"t":"cont","v":"alarm","vt":"str"},{"t":"cont","v":"intrusion","vt":"str"},{"t":"cont","v":"oled","vt":"str"},{"t":"cont","v":"irtx","vt":"str"},{"t":"cont","v":"irrx","vt":"str"},{"t":"cont","v":"outside/temperature","vt":"str"},{"t":"cont","v":"outside/humidity","vt":"str"},{"t":"cont","v":"outside/pressure","vt":"str"}],"checkall":"true","repair":false,"outputs":11,"x":186,"y":109,"wires":[[],[],[],[],[],[],[],[],[],[],[]]},{"id":"c65a83c.940c28","type":"subflow:26e9f43b.6e33ec","z":"c0844d0e.ea02c","name":"","x":110,"y":480,"wires":[[],[],[],[],[],[],[],[],[],[],[],[]]}]

Subflows used in above flow :

Home:

[{"id":"522523f1.490e4c","type":"switch","z":"2d280cdf.dc1c04","name":"Home","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"Livingroom","vt":"str"},{"t":"cont","v":"Kitchen","vt":"str"},{"t":"cont","v":"Bedroom1","vt":"str"},{"t":"cont","v":"Bedroom2","vt":"str"},{"t":"cont","v":"Bedroom3","vt":"str"},{"t":"cont","v":"Office","vt":"str"},{"t":"cont","v":"Laundry","vt":"str"},{"t":"cont","v":"Boilerroom","vt":"str"},{"t":"cont","v":"Bathroom1","vt":"str"},{"t":"cont","v":"Bathroom2","vt":"str"},{"t":"cont","v":"Bathroom3","vt":"str"},{"t":"cont","v":"Outside","vt":"str"}],"checkall":"true","repair":false,"outputs":12,"x":201,"y":97,"wires":[[],[],[],[],[],[],[],[],[],[],[],[]]},{"id":"949d80e0.18e27","type":"mqtt in","z":"2d280cdf.dc1c04","name":"","topic":"#","qos":"2","broker":"cd227dd8.85423","x":63,"y":80,"wires":[["522523f1.490e4c"]]},{"id":"cd227dd8.85423","type":"mqtt-broker","z":"2d280cdf.dc1c04","name":"Local","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Livingroom (this sublow is a template for each device or room):

[{"id":"64db0c61.1360e4","type":"switch","z":"98c1390a.706f18","name":"Livingroom","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"uptime","vt":"str"},{"t":"cont","v":"rssi","vt":"str"},{"t":"cont","v":"ram","vt":"str"},{"t":"cont","v":"load","vt":"str"},{"t":"cont","v":"temprature","vt":"str"},{"t":"cont","v":"humidity","vt":"str"},{"t":"cont","v":"pressure","vt":"str"},{"t":"cont","v":"lux","vt":"str"},{"t":"cont","v":"breach","vt":"str"},{"t":"cont","v":"oled","vt":"str"},{"t":"cont","v":"pin","vt":"str"},{"t":"cont","v":"dimvalue","vt":"str"}],"checkall":"true","repair":false,"outputs":12,"x":170,"y":120,"wires":[["d0a2ade6.ada41"],["5bc6f195.e235c"],["d68fae84.1eb28"],["47d7e9d2.b3d908"],["9ae91fc9.4bdaa"],["518f796b.e7faf8"],["fae4e6fd.bbfd78"],["9863844b.a6ad38"],["3b17aa35.3b33b6"],["34a2d0cb.e6446"],["a70013ed.e4d35"],["f2406736.ccda68","38f9a7dd.6340c8"]]},{"id":"d0a2ade6.ada41","type":"ui_text","z":"98c1390a.706f18","group":"11655475.b9d69c","order":4,"width":"1","height":"1","name":"","label":"Uptime","format":"{{msg.payload}}","layout":"col-center","x":360,"y":20,"wires":[]},{"id":"47d7e9d2.b3d908","type":"ui_text","z":"98c1390a.706f18","group":"11655475.b9d69c","order":6,"width":"1","height":"1","name":"","label":"Load","format":"{{msg.payload}} %","layout":"col-center","x":356,"y":137,"wires":[]},{"id":"d68fae84.1eb28","type":"ui_text","z":"98c1390a.706f18","group":"11655475.b9d69c","order":5,"width":"1","height":"1","name":"","label":"RAM","format":"{{msg.payload}}","layout":"col-center","x":355,"y":97,"wires":[]},{"id":"5bc6f195.e235c","type":"ui_text","z":"98c1390a.706f18","group":"11655475.b9d69c","order":7,"width":"1","height":"1","name":"","label":"RSSI","format":"{{msg.payload}}","layout":"col-center","x":351,"y":57,"wires":[]},{"id":"f2406736.ccda68","type":"ui_switch","z":"98c1390a.706f18","name":"","label":"On/Off","tooltip":"Turn Fan On/Off","group":"11655475.b9d69c","order":2,"width":"2","height":"1","passthru":false,"decouple":"false","topic":"Livingroom/dimmer/dimvalue/set","style":"","onvalue":"128","onvalueType":"num","onicon":"","oncolor":"","offvalue":"0","offvalueType":"num","officon":"","offcolor":"","x":350,"y":220,"wires":[["10c43b2c.29e575","dd26b765.23d588"]]},{"id":"38f9a7dd.6340c8","type":"ui_slider","z":"98c1390a.706f18","name":"","label":"Fan Speed","tooltip":"Adjust Fan Speed","group":"11655475.b9d69c","order":3,"width":"4","height":"1","passthru":false,"outs":"end","topic":"Livingroom/dimmer/dimvalue/set","min":0,"max":"128","step":1,"x":330,"y":260,"wires":[["10c43b2c.29e575","dd26b765.23d588"]]},{"id":"a70013ed.e4d35","type":"ui_numeric","z":"98c1390a.706f18","name":"","label":"Fan","tooltip":"Select Fan","group":"11655475.b9d69c","order":1,"width":"2","height":"1","passthru":false,"topic":"Livingroom/dimmer/pin/set","format":"{{value}}","min":"6","max":"9","step":1,"x":350,"y":180,"wires":[["10c43b2c.29e575","dd26b765.23d588"]]},{"id":"518f796b.e7faf8","type":"ui_gauge","z":"98c1390a.706f18","name":"Humidity","group":"11655475.b9d69c","order":9,"width":"1","height":"1","gtype":"gage","title":"Humidity","label":"","format":"{{value}} %","min":"40","max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":520,"y":60,"wires":[]},{"id":"9ae91fc9.4bdaa","type":"ui_gauge","z":"98c1390a.706f18","name":"Temperature","group":"11655475.b9d69c","order":8,"width":"1","height":"1","gtype":"gage","title":"Temperature","label":"","format":"{{value}} F","min":"45","max":"90","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":530,"y":20,"wires":[]},{"id":"9863844b.a6ad38","type":"ui_gauge","z":"98c1390a.706f18","name":"Luminocity","group":"11655475.b9d69c","order":11,"width":"1","height":"1","gtype":"gage","title":"Luminocity","label":"","format":"{{value}} Lux","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":530,"y":140,"wires":[]},{"id":"fae4e6fd.bbfd78","type":"ui_gauge","z":"98c1390a.706f18","name":"Pressure","group":"11655475.b9d69c","order":10,"width":"1","height":"1","gtype":"gage","title":"Pressure","label":"","format":"{{value}} Kpa","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":520,"y":100,"wires":[]},{"id":"62429c9e.e15b24","type":"ui_switch","z":"98c1390a.706f18","name":"Alarm","label":"On/Off","tooltip":"Turn Alarm On/Off","group":"11655475.b9d69c","order":13,"width":"2","height":"1","passthru":true,"decouple":"false","topic":"Livingroom/alarm/set","style":"","onvalue":"On","onvalueType":"str","onicon":"","oncolor":"","offvalue":"Off","offvalueType":"str","officon":"","offcolor":"","x":330,"y":340,"wires":[["1a12314b.2a0a4f","d23663bf.d68cd"]]},{"id":"3b17aa35.3b33b6","type":"ui_text_input","z":"98c1390a.706f18","name":"Security","label":"Security","tooltip":"Watch for Security breach","group":"11655475.b9d69c","order":12,"width":"2","height":"1","passthru":true,"mode":"text","delay":300,"topic":"Livingroom/breach/set","x":320,"y":300,"wires":[["10c43b2c.29e575"]]},{"id":"10c43b2c.29e575","type":"join","z":"98c1390a.706f18","name":"Announce","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\n","joinerType":"str","accumulate":false,"timeout":"5","count":"1","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":540,"y":240,"wires":[[]]},{"id":"1a12314b.2a0a4f","type":"mqtt out","z":"98c1390a.706f18","name":"","topic":"","qos":"","retain":"","broker":"640a3afa.1e8d84","x":550,"y":280,"wires":[]},{"id":"dd26b765.23d588","type":"batch","z":"98c1390a.706f18","name":"2 Together","mode":"count","count":"2","overlap":0,"interval":10,"allowEmptySequence":false,"topics":[],"x":540,"y":200,"wires":[["1a12314b.2a0a4f"]]},{"id":"c83afd9d.d76fc","type":"ping","z":"98c1390a.706f18","name":"Ken","host":"10.1.10.27","timer":"20","x":50,"y":240,"wires":[["3668d21f.32913e"]]},{"id":"3668d21f.32913e","type":"switch","z":"98c1390a.706f18","name":"","property":"payload","propertyType":"msg","rules":[{"t":"false"}],"checkall":"true","repair":false,"outputs":1,"x":170,"y":240,"wires":[["fedda170.a6d4b"]]},{"id":"cec78721.5e9228","type":"rbe","z":"98c1390a.706f18","name":"Block ","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":670,"y":340,"wires":[["10c43b2c.29e575"]]},{"id":"d23663bf.d68cd","type":"change","z":"98c1390a.706f18","name":"Alarm Status","rules":[{"t":"change","p":"payload","pt":"msg","from":"On","fromt":"str","to":"Alarm is set to On","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"Off","fromt":"str","to":"Alarm is set to Off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":340,"wires":[["cec78721.5e9228"]]},{"id":"fedda170.a6d4b","type":"change","z":"98c1390a.706f18","name":"Alarm On","rules":[{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"On","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":140,"y":340,"wires":[["62429c9e.e15b24"]]},{"id":"11655475.b9d69c","type":"ui_group","z":"","name":"Livingroom","tab":"47f3aa96.cda2b4","order":5,"disp":true,"width":"4","collapse":true},{"id":"640a3afa.1e8d84","type":"mqtt-broker","z":"","name":"Eclipse","broker":"iot.eclipse.org","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"47f3aa96.cda2b4","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

Events :

[{"id":"a4c3a63b.58ed58","type":"switch","z":"26e9f43b.6e33ec","name":"Events","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"motion","vt":"str"},{"t":"cont","v":"home","vt":"str"},{"t":"cont","v":"away","vt":"str"},{"t":"cont","v":"alarm","vt":"str"},{"t":"cont","v":"intrusion","vt":"str"},{"t":"cont","v":"oled","vt":"str"},{"t":"cont","v":"irtx","vt":"str"},{"t":"cont","v":"irrx","vt":"str"},{"t":"cont","v":"outside/temperature","vt":"str"},{"t":"cont","v":"outside/humidity","vt":"str"},{"t":"cont","v":"outside/pressure","vt":"str"}],"checkall":"true","repair":false,"outputs":11,"x":186,"y":109,"wires":[[],[],[],[],[],[],[],[],[],[],[]]}]

Uptime

is it possible to get the uptime set to 1 ?

file : commands.py
line : 453~454
elif svname==SysVars[13]: #%uptime% 3244 Uptime in minutes
return str(rpieTime.getuptime(0))
to
elif svname==SysVars[13]: #%uptime% 0 days 17 hours 27 minutes Uptime in day/houres/minutes
return str(rpieTime.getuptime(1))

or an additional option that you can choose, or minutes or day/houres/minutes

that reads somewhat easier, for example, on a Oled of dashboard.esp file

thank you,
greeting Harald

MCP23017 Support

RPi gpios are OK but I2C gpios are always handy when a project require multiple inputs/outputs

-D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.