@Yveaux I wish i could come
Posts made by Dheeraj
-
RE: MySensors booth at Eindhoven Maker Faire!
Eindhoven is a nice city, I remember my visit there few years back..
-
RE: pimatic-mysensors controller plugin
@fahrettine said:
check whether you received any message ( serialport output ) on relay sensor node.
-
RE: pimatic-mysensors controller plugin
@BastienVH . check few things first.
- hardware wiring is correct and as per mysensor guide.
- what debug value "sensorValue" you are seeing on serial console if you debug your sensor node.
- check the debug log in pimatic
-
SmartClock
Smartclock based on timer based mysensors node, which fetches time in unix second from pimatic controller.
Smartclock made from following components.
- 4 cascade matrix led 8x8.
- DHT11 for temperature
- Li polymer 4000 mh battery.
- PIR sensor for motion detection.
- Shuttle box..
- misc..
SmartDisplay shows following info based on controller 's rules.
- Time to office using bing map api.
- Outside home temp, hum etc.
- Online weather forecast information.
- Any online information can be displayed like stock tick etc.
Smartclock clock has temperature sensor DHT11 and a motion PIR sensor to detect movement.
-
RE: pimatic-mysensors controller plugin
@karl261 using ButtonsDevice as mentioned by Oitzu, you can achieve the point no. 1 . non off/on switch..
{ "id": "mode", "name": "TV Mode", "class": "ButtonsDevice", "buttons": [ { "id": "PVR", "text": "PVR" }, { "id": "HTPC", "text": "HTPC" }, { "id": "Chromecast", "text": "Chromecast" }, { "id": "testing", "text": "RainBowCycle" }, ] },
for point no. 2 you can use pimatic IFTTT rules to control (*hidden * relay switch button) moreover you can switch off optocoupler after 50 ms using rules.
- if you have some special requirement you are welcome to contribute..
-
RE: pimatic-mysensors controller plugin
New version of plugin available. 0.8.21.
and a video to showcase its capability..
MySensors & Pimatic Duo – 04:48
— Dheeraj Khajuria -
Hackathon @Office showcasing Mysensors capability
Recently we had a Hackathon event at our office and where we showcase open source MySensors wireless network capability along with pimatic controller running on sweet pi.
MySensors & Pimatic Duo – 04:48
— Dheeraj Khajuria -
RE: Scrolling Text sensor node with new V_TEXT
found this library for scrolling effect https://code.google.com/p/arudino-maxmatrix-library/.
-
RE: Project boxes for MySensor's nodes and gateway?
@GertSanders purchased it from ebay, yes inside it is mini pro and nrf radio module ..
-
RE: Project boxes for MySensor's nodes and gateway?
My compact serialGateway with nrf201 long range , power indicator LED and USB cable connected to Pi.
-
RE: Relay with ACS712
@epierre .. nothing much .. used relay to control 2 devices and tried to calculate the power consumed ( in watts ) assume the input voltage is ~220v.
-
RE: IR Blaster (progress)
@blacey said:
using IR transmitter
I have gone through this link, and tried it recommendation of increasing the RAWBUF size and also used sample sketch which was not working for me , may be i was doing something wrong. Also, It uses raw IR signal and handling raw signal is not simple compare to IR hex code which are at max 32 bits. I wish IRlib, IRemote etc support handling of long IR signals. Any library which support it?
-
RE: IR blaster for AC , TV etc.
@Moshe-Livne the IR library i used is some how fails to decode and dump the AC IR signal received even after increasing the buffer size RAWBUF, not sure how broadlinks rm2 is working.. basically i used mini pro node as IR receiver/emitter .. the received IR hex codes ( bit, type NEC, etc ) are send to controller ( pimatic ) . Using pimatic Rules controlling electronic devices which sends IR hex code to node if rule is triggered.
-
RE: IR Blaster (progress)
Any one tried using IR transmitter to send IR signal to AC with mini pro ( 328p ) as mysensor node. I know mini pro have limited ram / rom support.
Note: AC remote send long IR signals which may not be completely captured by IR receivers connected to mini pro. may be one try on rasp pi but that's a last resort.
-
IR blaster for AC , TV etc.
Any one tried using IR transmitter to send IR signal to AC with mini pro ( 328p ) as mysensor node. I know mini pro have limited ram / rom support.
Note: AC remote send long IR signals which may not be completely captured by IR receivers connected to mini pro. may be one try on rasp pi but that's a last resort.
-
RE: pimatic-mysensors controller plugin
@Mad-Moo latest code 0.8.17 is pushed to github. now everything is sync.
-
RE: pimatic-mysensors controller plugin
newer version (0.8.15 ) of plugin release . support Acronym for devices . improves user experience.
-
RE: pimatic-mysensors controller plugin
@Fredrik-Carlsson said:
think one of the nicest things about pimatic is the graphing functionality. I want to log and and check how the heating is distributed throughout my house and at which consumption depending on heatpump / woodstove set
since i don't have home laptop with me. otherwise , i could have shared the custom sketch with you. but what i remember is that it sends V_WATT message with wattage usage and calculate KW and KWh ( still broken ) at controller end ( pimatic ).
meanwhile, i'm fixing the pulsemeter code which will be compatible with actual sketch, wait for 1 or 2 days. Also, we will be able to see battery status (optional) with sensor devices.
one thing you missed here is that pimatic is browser based also have the "automation by rules" functionality which is awesome. also you can try various plugins available with pimatic. http://www.pimatic.org/pages/plugins/
-
RE: pimatic-mysensors controller plugin
frankly, i couldn't check pulsecount using actual power meter. although i can simulate it . It's custom made according to my need. I can modify it as per http://www.mysensors.org/build/pulse_power build easily.
currently it only supports "V_WATT" message.
-
RE: pimatic-mysensors controller plugin
@Sebastien-Vayrette-Gavard said:
yet I am able
kindly change the "class" name as "MySensorsLight" . please note it has a 's' in between.
-
RE: How low can arduino can go?
thanks Harry, definitely will try your suggestion of I/O pins as power supply.
-
RE: How low can arduino can go?
@HarryDutch said:
f you really want to remove the regulator there are several ways to do this. Best way (at least for me) is first cutting the legs of the regulator with a very sharp scalpel. Be careful to cut only the legs and not the board beneath it. Then try to lift it from the board by using a needle nose pliers. Use minimal force! If you have to use too much force then try to cut the legs a little further.
So there you have it. First try to prove to yourself that it's possible to get current consumption for an Arduino Pro Mini down to a few microamps and only then continue your adventures in MySensors land! Hope this helps.
really nice explanation of using battery with the sensor node. actually, i'm using 9v battery with mini pro using regulator for measuring DHT22 data and ambient light. It's working from last month and results show may work 2 month more. the reason of using 9v battery is that i have handful of them.
Now, my question is that why initially the sleeping current is ~900 uA and then it boils down to ~120 uA after few day. why is that? . your expert answer will be appreciated.
-
RE: How low can arduino can go?
@funky81 said:i
nning below code : 3,86mA
i have a setup with temp/humidity/light with mini pro 8mhz 3.3 v and take around 120 uA in sleep mode
-
RE: Node-Red as Controller
where are you storing the sensor data for presentation , stream. let me know which database you are using here? you can have another flows for sending the the request to sensor node via serial port. I tried it same some time back . may be i can share it here.
-
RE: pimatic-mysensors controller plugin
@jurasek connecting NRF24L01 to RPi directly is possible you will find good amount of references if you search this form.
-
RE: Temp/Humidity/Light Sensor on battery
actually the sketch is simple.
#include <SPI.h> #include <MySensor.h> #include <DHT.h> #define CHILD_ID_HUM 0 #define CHILD_ID_TEMP 1 #define CHILD_ID_LIGHT 2 #define HUMIDITY_SENSOR_DIGITAL_PIN 4 #define BATTERY_SENSE_PIN A0 // select the input pin for the battery sense point #define LIGHT_SENSOR_ANALOG_PIN A1 unsigned long SLEEP_TIME = 60000; // Sleep time between reads (in milliseconds) MySensor gw; DHT dht; float lastTemp; float lastHum; boolean metric = true; MyMessage msgHum(CHILD_ID_HUM, V_HUM); MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP); MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int oldBatteryPcnt = 0; int battLoop =0; int lightLevel =0; int lastLightLevel =0; void setup() { gw.begin(NULL,15); dht.setup(HUMIDITY_SENSOR_DIGITAL_PIN); // Send the Sketch Version Information to the Gateway gw.sendSketchInfo("Temp Humidity Light", "1.0"); // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID_HUM, S_HUM); gw.present(CHILD_ID_TEMP, S_TEMP); gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); metric = gw.getConfig().isMetric; check_batt(); } void loop() { delay(dht.getMinimumSamplingPeriod()); float temperature = dht.getTemperature(); if (isnan(temperature)) { Serial.println("Failed reading temperature from DHT"); } else if (temperature != lastTemp) { lastTemp = temperature; if (!metric) { temperature = dht.toFahrenheit(temperature); } gw.send(msgTemp.set(temperature, 1)); Serial.print("T: "); Serial.println(temperature); } float humidity = dht.getHumidity(); if (isnan(humidity)) { Serial.println("Failed reading humidity from DHT"); } else if (humidity != lastHum) { lastHum = humidity; gw.send(msgHum.set(humidity, 1)); Serial.print("H: "); Serial.println(humidity); } lightLevel = (analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; if (lightLevel != lastLightLevel) { Serial.println(lightLevel); gw.send(msg.set(lightLevel)); lastLightLevel = lightLevel; } battLoop++; if (battLoop > 10) { check_batt(); battLoop=0; } gw.sleep(SLEEP_TIME); //sleep a bit } void check_batt() { // get the battery Voltage int sensorValue = analogRead(BATTERY_SENSE_PIN); Serial.println(sensorValue); // 1M, 470K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // ((1e6+470e3)/470e3)*1.1 = Vmax = 3.44 Volts // 3.44/1023 = Volts per bit = 0.003363075 // vout = (sensorvalue x 3.3) / 1023 //vin = vout / (R2/(R1+R2)); float batteryV = ( sensorValue * 0.003225806 ) / 0.3; // divide R2/(R1+R2) int batteryPcnt = sensorValue / 10 ; if ( batteryPcnt > 100 ) batteryPcnt = 100; Serial.print("Battery Voltage: "); Serial.print(batteryV); Serial.println(" V"); Serial.print("Battery percent: "); Serial.print(batteryPcnt); Serial.println(" %"); if (oldBatteryPcnt != batteryPcnt) { // Power up radio after sleep gw.sendBatteryLevel(batteryPcnt); oldBatteryPcnt = batteryPcnt; } } //```
-
RE: pimatic-mysensors controller plugin
@Sebastien-Vayrette-Gavard said:
I didn't find the doc that explain it. Can you point me in the right di
follow the below instructionfor pimatic installation:
http://www.pimatic.org/guide/getting-started/installation/plugin instruction:
https://github.com/DheerajKhajuria/pimatic-mysensors -
Temp/Humidity/Light Sensor on battery
After a long time tried making a node with temperature, relative humidity and light sensors.
Running sensor node on 9v battery..actually i have bought ample of 9v batteries. sensor node is running for last 15 days.. ignore the dip in the battery levels due to non-battery mode .
LDR and DHT11 sensors connected on PCB..
final product
-
RE: pimatic-mysensors controller plugin
@Vladut-Grecu said:
if state is true then _state = 1 else
check the pimatic-daemon.log file and what kind of error exception your are getting . not sure if you have enable the "logLevel": "debug", in config.json for pimatic.
Also, you need to add entry in device-config-schema.coffee schema file.
if nothing works share the log file with me..I'm also new to coffee or nodejs and struggled a lot understanding the coffee script , basically, still in learning phase..
-
RE: 0;0;3;0;9;read: 10-10-0 s=1,c=1,t=0,pt=7,l=5:21.6 => Explanations
@Totche said:
0;0;3;0;9
these are log message from gateway .. may be your gateway is not able to send the response to sensor node..
-
RE: pimatic-mysensors controller plugin
@Ralf-H sure will add support for light sensor
-
RE: pimatic-mysensors controller plugin
@ricardot added support for battery level stats 0.8.9
-
RE: pimatic-mysensors controller plugin
Currently mysensors plugin only support static node id. Try configuring static node id in sensor code. Hint.. Gw. Begin (null, node id)
Let me know if it's works
-
RE: bootloader
@tekka
thanks for providing the steps to upload the MSYbootloader..
any idea why i'm getting following error in linking phase"avr-gcc" -Os -nostartfiles -Wl,-s -Wl,-static -Wl,-Map=".map" -Wl,--start-group -Wl,--end-group -Wl,--gc-sections -mrelax -Wl,-section-start=.text=0x7800 -mmcu=atmega328p -o MYSBootloader.elf MYSBootloader.o -lm
MYSBootloader.o: In functionmain': MYSBootloader.c:(.init9+0x288): undefined reference to
__boot_page_erase_short'
MYSBootloader.c:(.init9+0x2b8): undefined reference to__boot_page_fill_short' MYSBootloader.c:(.init9+0x2d6): undefined reference to
__boot_page_write_short'
MYSBootloader.c:(.init9+0x2e0): undefined reference to `__boot_rww_enable_short'
collect2: error: ld returned 1 exit status
make: *** [MYSBootloader.elf] Error 1not sure which library to include to resolve the issue.
-
RE: MySensors Contest 2015
Congratulation to the winners. good to see more and more people are getting interested in mysensors project ..
-
RE: Otabootloader upload ?
@tekka
Is OTA or MYS bootloader end to end working for you. if yes, let me know the steps that needs to be followed. i'm getting error in gateway where I_FIND_PARENT request(from sensor) response is failing and not reaching to sensor node. however, it works after fresh make load command issue.. -
RE: Over the air updates
@Damme Is OTA working for you..I am also getting the same message from Gw.
-
compiling issue with MYSBootloader.
@tekka need your help here...
not sure i'm missing something. getting following error while compiling MYSBootloader. OTABootloader working fine for me..
Any idea what is the difference between two bootloaders.
make: [clean] Error 1 (ignored)
"avr-gcc" -x c -mno-interrupts -funsigned-char -funsigned-bitfields -DF_CPU=16000000L-Os -fno-inline-small-functions -fno-split-wide-types -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -mrelax -Wall -mmcu=atmega328p -c -std=gnu99 -MD -MP -MF "MYSBootloader.d" -MT"MYSBootloader.d" -MT"MYSBootloader.o" -I../libraries/MySensors MYSBootloader.c -o MYSBootloader.o
In file included from MYSBootloader.c:35:0:
MYSBootloader.h:11:18: fatal error: boot.h: No such file or directory
#include "boot.h"
^
compilation terminated.
make: *** [MYSBootloader.o] Error 1 -
RE: pimatic-mysensors controller plugin
@ricardot
contact/door/light mysensor add to list.. just check
-
RE: pimatic-mysensors controller plugin
I have fixed the issues, plugin published to public npm registry . now i think it should work perfectly
-
RE: pimatic-mysensors controller plugin
@ricardot said:
atic] Cannot find module 'bluebird'
Later I added two devices, a PIR and a relay-switch, and I'm receiving this message:
13:46:49.289 [pimatic] no plugin found for device "Switch" of class "MySensorsSwitch"!
13:46:49.305 [pimatic] no plugin found for device "PIR" ofgive me sometime will fix this issue.
-
RE: pimatic-mysensors controller plugin
Since i haven't register mysensors with npm. that's the reason it is giving you the error. As a work around try download & manually installing pimatic-MySensors in node_module in pimatic-app folder.. Here other plugins are also installed like Pimatic-mobile-fontend etc.. Pimatic should be able to pick it up..
I will try to fix this issue meanwhile.Let me know if it's works.
-
RE: pimatic-mysensors controller plugin
@ricardot said:
let me the exact error msg.
-
RE: Relay with ACS712
@epierre said:
able to calculate the wattage of 2 loaded devices to a rough level.. p = v x i. ..still WIP.
-
RE: Relay with ACS712
@doblanch i'm in process of completing the sketch and will share it with you once finished.
-
RE: Getting the NRF24L01+ to work on the RPi
@EasyIoT .. good to hear you were able to run NRF24Lo1 with pi. it will good if you could share your setup. In my case was getting st=fail ack message many a times..
-
Relay with ACS712
attempt over last week , circuit board with 2x relay actuator and hall current sensor ( acs712 ) and step down transformer. The most challenging part is how to pack your creation in a nice box.
-
RE: Getting the NRF24L01+ to work on the RPi
agree with @hek. better go with serial gateway.. I had tried running NRF24 with pi. its works sometime and ack fails many a times. kind of one way communication from sensor to gateway.
Also, make sure you don't overclock your pi, if you want to give it a try. -
Handy Serial Gateway for testing.
Yet another serial gateway working without wires clutter.
-
RE: pimatic-mysensors controller plugin
@hek @bjornhallberg
added support for relay-actuator moduleModule supported..
Temperature and Humidity ( http://mysensors.org/build/humidity)
motion ( http://mysensors.org/build/motion )
Relay-Actuator ( http://www.mysensors.org/build/relay ) -
RE: Cheap voice control using AutHomation, AutoVoice and Tasker (Video)
Really nice... Gr8 work
-
RE: Node-Red as Controller
@Fredrik-Carlsson Very nice . node-red give a non-programmer the flexibility to write the controller logic without going into the complexity of programming.
-
pimatic-mysensors controller plugin
Created controller plugin for pimatic https://github.com/DheerajKhajuria/pimatic-MySensors
pimatic is a home automation framework that runs on node.js. It provides a common extensible platform for home control and automation tasks.
Uniform interface
It defines several schemata for different home devices and sensors, so that all devices can be controlled uniform and are presented in a common interface.
Automation by rules
Automation tasks can be defined by rules in the form of "if this then that", where the "this" and the "that" part can be fully custemized by plugins. See the rule page for more details.
Web-based interface
The mobile frontend plugin provides a nice web frontend with a sensor overview, device control and rule definition. The web interface is build using express and jQuery Mobile.
Extensible
pimatic is extensible by various plugins adding features and integrating existing hardware and software.
web based Interface
Flexible home Automation Rules
Graphs
Steps to install pimatic
Now I would say let's begin with setting up Pimatic from scratch :
You can either check the instructions on the Pimatic website http://www.pimatic.org/guide/getting-started/ or follow these steps.
If you are using a Raspberry Pi, get the latest Wheezy Image or what ever you like from here : http://downloads.raspberrypi.org
Then write this image with this tool Win32DiskImager to your SD-Card.
Now set up your Pi with sudo raspi-config and do the usual updates with
sudo apt-get update
sudo apt-get upgrade
sudo rpi-updateYou're ready to install Pimatic Go ahead with the following 19 steps :
1.) wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-arm-pi.tar.gz -P /tmp
2.) cd /usr/local
3.) sudo tar xzvf /tmp/node-v0.10.24-linux-arm-pi.tar.gz --strip=1
4.) sudo apt-get install build-essential
5.) mkdir /home/pi/pimatic-app
6.) cd /home/pi/
7.) npm install pimatic --prefix pimatic-app --production
8.) cd pimatic-app
9.) cp node_modules/pimatic/config_default.json config.json
10.) sudo nano /home/pi/pimatic-app/config.json (very important :insert admin password!!! otherwise pimatic won't start and comes up with an error message)11.) sudo chmod 777 /home/pi/pimatic-app/
12.) sudo reboot
13.) cd ./pimatic-app/node_modules/pimatic
14.) sudo npm link
15.) wget https://raw.github.com/pimatic/pimatic/master/install/pimatic-init-d
16.) sudo cp pimatic-init-d /etc/init.d/pimatic
17.) sudo chmod +x /etc/init.d/pimatic
18.) sudo chown root:root /etc/init.d/pimatic
19.) sudo update-rc.d pimatic defaultsNow you are ready to start pimatic for the first time!
There are three ways to start pimatic generally.Automatically at system start (since we daemonized Pimatic with the entries in init-d)
With the command sudo service pimatic start (will run Pimatic as daemon / service in the background)
With the command sudo pimatic.js (can be executed everywhere, since we globalized it)
For the first start i recommend to use option 3 since Pimatic will do some compiling and setting up things. this may take a while, so you are able to watch the debug outputs on the console screen and see what Pimatic is doing actually.
If you run sudo "service pimatic start" you won't get any debug messages since Pimatic will run in the background.When Pimatic is through with all the setup stuff, you will see a message like that :
Now you can access the Pimatic gui via browser by entering the IP of your pi and go ahead with the further setup = > Step 2 - GUI overview
For pimatic plugins : http://pimatic.org/pages/plugins/
Support following pimatic-mysensors sensors
-
Temperature and Humidity ( http://mysensors.org/build/humidity)
-
Temperature and Pressure ( http://mysensors.org/build/pressure)
-
Motion ( http://mysensors.org/build/motion )
-
Relay-Actuator ( http://www.mysensors.org/build/relay )
-
|TimeAware Sensor support ( Unix time seconds )
-
Binary buttom ( http://www.mysensors.org/build/binary )
-
Battery level of sensors
-
PulseMeter ( experimental only support wattage )
-
Light Sensor
-
-
Node-Red as Controller
Any idea or try on integrating Node-red running on raspberry pi as controller with MySensors network. http://nodered.org/
-
RE: Same Node id for two separate nodes.
thanks for replying and providing the guideline for newcomer.
Arduino IDE : 1.0.6 ( ubuntu 64 bit)
Controller Software : Nodejscontroller.js using nodejs & mongo db on raspberry pi.
Gateway : running piGatewaySerial code and connecting it to NRF24L01+ transceiver using SPI.
Arduino and Raspberry pi gateway code debug on.. -
Same Node id for two separate nodes.
I have two sensors in my network ( temp , Hum etc ) and motion detection. both working in auto mode and request node id from controller ( raspberry pi ) node via gateway . but unfortunately, response code of both nodes get same node id 1.
may be bug in sendNextAvailableSensorId() function response.
any idea?Note: I know static node id will work. but Auto mode should also be working.
-
RE: NodeJsController on non-raspbian linux distros
@hek I have two sensors in my network ( temp , Hum ) and motion detection. both working in auto mode and request node id from controller ( raspberry pi ) node via gateway . but unfortunately, reponse code of both nodes get same node id 1.
may be bug in sendNextAvailableSensorId() function response.
any idea?
thanks