Author: koscis

I work as PHP developer as long as I remember:) I dreamed of doing something strange and Python + Raspberry Pi allows me to do funny things. My goal is to create home center and reintegrate old gadgets I already made like light control, human detection and car localizator.

SensorListener – gRPC – take two, streams

We will explore gRPC protocol some more. In the last post, we had a problem with the fact that we have to ask for data. If we want to react to events ASAP we have to know about them instantly.
There is an option of using gRPC as a stream. So the server can send data to the client many times after an initial request.
I’m thinking about new function get_changes that would return all changes happening in the storage.
But first, we have to explore gRPC and streams.

– code @ GitHub
(more…)

SensorListener – toggable services

There may be a reason to disable some workers or handlers. Like disabling GIOŚ Worker when outside of Poland. Currently, there is no way to do this.
I think we have to expand the config file and add enabled value to each worker and handler.
I hope that at some point we won’t have hardcoded services and everything would be in the config file. Easy to extend or change.
(more…)

SensorListener – one way of gathering data – part 1

I have the Doton and the Tenchi project, both are getting readings from sensors and external sources and both are parsing and returning the results, Doton to LCD and Tenchi as a voice via Google Assistant.
The problem is we have different ways of gathering those data. I think we should extract it as one module – SensorListener
Then in each project, we can focus only on serving data and not writing data gathering all the time.

GitHub
(more…)