Virtual sensor with vaules, received from shell
Posted: 02 Nov 2021 23:49
Hi all!
I have razberry v 3.2.1 with latest raspbian.
I need to create virtual sensor with several values, which can be received by execution shell sripts, which return some json, it looks like
Param 1 and 2 are text, params 3 and 4 - integer.
So I understand, that i need some way to execute shell command on razberry and somehow transfer this 4 parameters to my sensor. I can create four virtual devices like sensor multilevel, but how to get data from shell and transfer to sensors values?
I have razberry v 3.2.1 with latest raspbian.
I need to create virtual sensor with several values, which can be received by execution shell sripts, which return some json, it looks like
Code: Select all
pi@razberry:~ $ python3 /home/pi/myscript.py
{"Param1": "Text1", "Param2": "Text2", "Param3": "100", "Param4": "7000"}
So I understand, that i need some way to execute shell command on razberry and somehow transfer this 4 parameters to my sensor. I can create four virtual devices like sensor multilevel, but how to get data from shell and transfer to sensors values?