pxlBlck Rules

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Sockenfisch
New user
Posts: 3
Joined: 12 Apr 2020, 19:45

pxlBlck Rules

#1 Post by Sockenfisch » 06 Feb 2021, 20:18

The following project:
I have 5x ESP8255 scattered in and out of the house. All of them are equipped with ESP_Easy.
They measure temperature, humidity, air pressure, light and water temperatures from hot water, heating (VL/RL) and solar (VL/RL).
All data is sent via MQTT to a Raspi4 and for years in to ThingSpeak.
IOBroker and Grafana are installed on the Raspi. Since the Raspi is equipped with a SSD instead of SD, everything runs stable.
Now I installed another ESP8266 with ESP_Easy and "Display - pxlBlck " 32x8. At the moment only the time is displayed.
Using the browser, messages can also be displayed, which scroll across the 8x32LEDs in a kind of ticker. http://192.168.0.120/tools?cmd=pbrntxt, ... estMessage,
Now I want, if e.g. the outside temperature from the ESP8266 http://192.168.0.37 (sensor) BMx280 are sent via MQTT to the Raspi, that they also go via Rules to the pxlBlck-ESP.

Unfortunately unsuccessful so far. Not even with a "Test Message" it works.
on MQTT#Connected do
SendToHTTP 192.168.0.120/tools?cmd=pbrntxt,0,0,255,0,0,0,50,0,TestMessage,
Endon

I have no experience with the rules.
What should it look like correctly? :(

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: pxlBlck Rules

#2 Post by Ath » 06 Feb 2021, 21:19

The command are a bit picky in regard to having the correct number of arguments, and you have to provide the correct arguments as well, so your code could look like this:

Code: Select all

on MQTT#Connected do
  SendToHTTP 192.168.0.120,80,"/control?cmd=pbrntxt,0,0,255,0,0,0,50,0,TestMessage"
Endon
But if the matrix display is connected to the same ESP, then you can leave out the SendToHTTP command, and use the 'pbrntxt...' directly.

Btw, where have you obtained that pxlBlck driver, or is it a RPiEasy driver, as I can't find it in the current ESPEasy of ESPEasyPluginPlayground repositories?
/Ton (PayPal.me)

Sockenfisch
New user
Posts: 3
Joined: 12 Apr 2020, 19:45

Re: pxlBlck Rules

#3 Post by Sockenfisch » 07 Feb 2021, 09:01

Thank you very much, that works wonderfully. :)
What must the code look like if only the temperature value is to be displayed? (see attachment/image)

The pxlBlck driver is included in this image:
https://github.com/Nerdiyde/pxlBlck/blo ... lck_4M.bin

Thanks for the help!
Attachments
BMP.JPG
BMP.JPG (43.31 KiB) Viewed 9042 times

User avatar
Ath
Normal user
Posts: 3418
Joined: 10 Jun 2018, 12:06
Location: NL

Re: pxlBlck Rules

#4 Post by Ath » 07 Feb 2021, 10:52

In the data you are sending out, you can include sensor data by using this pattern:

Code: Select all

[<SensorName>#<ValueName>]
So for your temperature you could use

Code: Select all

[BME#Temperature]
The names are not case-sensitive.

Please have a look at the documentation on Rules, you can find the latest by clicking the (i) button at the top of the Rules page (the ? leads to the outdated wiki docs).

Edit: I not sure if the pxlBlck firmware is fully up to date with the latest ESPEasy version, so probably not all new features are available to you. The documentation link I'm referring to is this one: https://espeasy.readthedocs.io/en/lates ... Rules.html
/Ton (PayPal.me)

Sockenfisch
New user
Posts: 3
Joined: 12 Apr 2020, 19:45

Re: pxlBlck Rules

#5 Post by Sockenfisch » 08 Feb 2021, 16:45

Very nice, that's how it works: :D

Code: Select all

on MQTT#Connected do
  SendToHTTP 192.168.0.120,80,"/control?cmd=pbrntxt,0,0,255,0,0,50,0,--->the-outside-temperature-->[BMP#Temperature]C"
Endon
Now I will try if I can get the Paspberry pi to send messages to the ESP8266 using Blockly.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 21 guests