Categories
General HowTo's

#Python script to read #1-wire sensors and more Python scripts #VSCP #IoT

The most important mission with a m2m/IoT/whatever framework like VSCP is to make the world simpler for the end-user. Yes for the “end-user”, NOT for the developer.  That said it is of course good if things are as easy as possible for the developer to.

If you are new to VSCP the system is always overwhelming. It is a big system with many possibilities, but the event is central, VSCP is after all an event based system, and when your data is on the VSCP standardized event format you can present it, store it, react on it or calculate on it in a standardized way. Any solution you come up with that handles events will become a reusable component. For you and for others if you share your work. For instance. If you make a software that diagram measurement value and your intention is to show temperature changes this same piece of software will be useful for someone else to display concentration variations in a fluid of a process industry by just changing the description of the diagram labels.

VSCP events have a class and a type that specify what the event describes. This is typically a “measurement” or “info” or “control”. Samples are

Class=10, Type=6 – The event describes a temperature.
Class=30, Type=5 – Turn on “something”.

You can read all about them here

The measurement events are standardized around the SI units.  So you will see all standardized units there but also some derived ones. If/when need arise more will follow. They all have a unit and a value.

For the unit there is the standardized unit, for example for temperature “degrees Kelvin” is used. But user want to work with Celsius or Fahrenheit so they are also available. Without going into details the end result is a unit of information (the VSCP event)  that specify the measurement value fully and this information unit is usable by both low end and high end systems.

Why is this important you say.

First of all there will not be mistakes like sending a Mars sond past Mars because one developer thought the values where inches and another centimetres. Secondly you only need to write code once for each layer. An event, a measurement, a type of measurement and so on. If you think about it this is exactly what the web and web browsers is all about. A common format for the hypertext.

So to the point. To benefit from the above you have to translate world data into VSCP events.

In this sample a DS2490 one-wire adapter read an outside temperature and an inside temperature and send the sensor values to a VSCP daemon as VSCP events for further processing. A simple Python script is used which is added to the crontab on a Raspberry Pi to report the temperature every minute.  ne wire id’s can be directly translated into a valid VSCP GUID (just as an Ethernet MAC etc can) so this is also taken care of in the script.

When the sensor values is sent to the daemon it can be collected or presented in a standardized way or another system can react on the data and as in this case turn on a heater when the temperature is to low or alarm via an SMS when the outside temperature is going below zero.

You can find more Python code here.

Salvo Musumeci started work to do VSCP Python bindings to the VSCP helper library but it appears that this project has stalled.  I hope he or someone else will complete this project as it would benefit a lot.

 

Categories
VSCP

#VSCP in Swedish #IoT #m2m

start | VSCP Specification

http://www.akehedman.se/wordpress/?p=22252

 

Categories
Sponsoring

Sponsoring #VSCP #IoT #m2m

We today got a  EUR 50 donation from Gediminas Simanskis, Vilnius, Lithuania to the project.  Thank you Gediminas!

Besides the money, which is  very much-needed to keep this project going, with servers and all other stuff that needs to be held active, the belief in the project, from an other human being far away, which a contribution like this is a proof of, is worth thousand and thousands  times more than the actual money.  So this is big.

I thank you Gediminas, and all other people around the world, that decided to support the project. I send this thank you  from the deepest rooms of my heart. You will never be forgotten and for me your unselfish action is the proof that there actually is good in the world after all.

Ake Hedman
Maintainer of the free and open VSCP project.

Categories
VSCP

The people behind #VSCP #IoT #m2m

start | VSCP Specification

Good people. Join us U2.

http://www.vscp.org/wiki/doku.php/who_why_where/the_vscp_team

 

Categories
VSCP

Autumn games #VSCP #IoT #m2m

img_20141220_180137

Categories
VSCP

Sponsoring #VSCP #IoT #m2m

We today got a  EUR 50 donation from Henk Hofstra, Alkmaar, Holland to the project.  Thank you Henk!

Besides the money, which is  very much-needed to keep this project going, with servers and all other stuff that need to be held active, the belief in the project, from an other human being far away, which a contribution like this is a proof of, is worth thousand and thousands  times more than the actual money.  So this is big.

I thank you Henk, and all other people around the world, that decided to support the project. I do this  from the deepest rooms of my heart. You will never be forgotten and for me your unselfish action is the proof that there actually is good in the world after all.

Ake Hedman
Maintainer of the free and open VSCP project.

 

Categories
Sponsoring

Sponsoring #VSCP #IoT #m2m

We today got a  EUR 50 donation from Dinesh Guleria, New Dehli, India to the project.  Thank you Dinesh!

Besides the money, which is  very much-needed to keep this project going with servers and all other stuff that need to be held active, the belief in the project, from an other human being far away, which a contribution like this is a proof of, is worth thousand and thousands  times more than the actual money.  So this is big.

I thank you Dinesh, and all other people around the world, that decided to support the project. I do this  from the deepest rooms of my heart. You will never be forgotten and for me your unselfish action is the proof that there actually is good in the world after all.

Ake Hedman
Maintainer of the free and open VSCP project.

Categories
VSCP

TODO’s of #VSCP #IoT #m2m

floorplan_button_example

For people who want to keep track of the TODO’s of VSCP (OR help out by taking on one of the points)  the (ever-growing) list is here.

Categories
VSCP

What is brewing? #VSCP #IoT #m2m

oshw-logo-800-px-symbols-all

When things are silent it means that things are brewing here at the Paradise of the frog. Currently the REST interface is getting some work.

This work is due to the user and access-right fields added to variables.  Yes there will be an owner of the variable, and there will be others that can or can not have access to it.  The access rights are the same as in Unix. RWX grouped in three pairs UGO where U=user, G=group and O=other. So 0x777 means everyone can read, write and execute the variable, 0x744 mean the owner can do everything with the variable but everyone else can only read it.

To execute a variable may sound strange. But as you are able to store LUA or JavaScript in a variable this definitely has its meaning. And yes JavaScript is available in the VSCP daemon now.

All main interfaces support variables so when the REST work is done (this week?) variables can be handled over the REST, TCP/IP and the websocket interfaces with the same ease.

The goal with the work at the moment is to have a working administrative web-based interface before the end of the year. This is hard work for me as I am a low-end and embedded programmer but as usual if no one else does it you have to do it yourself. Well very disappointed of course as this slow down things (and makes me poorer) but what the heck ” a man got to do what a man got to do” and I am sure that is true for woman to.

Have fun!
/Ake

Categories
VSCP

Success for me, no meaning for mankind

screenshot-from-2016-09-29-090117

Ripping things apart and building it together again is hard. We all know that. That is exactly what I am doing with the VSCP program suite at the moment. So messages as the one above, from the REST interface of the VSCP daemon is great happenings. Meaning things are coming into place again. Slowly.