Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. franzelare
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by franzelare

    • IR remote using ESP8266 to power down AV devices

      In domoticz I have a switch all off, what powers down all lights and heating with some delays to prevent issues due to trafic overload.

      Now I wanted to also power down my TV, Radio, DVD, ITV receiver and WD life TV when all lights go off.
      In case we leave home or go to sleep at night and we forgot to power down something.

      I started using a normal arduino nano with the IRremote.h and mysensor 1.6 beta to make the ESP8266 a gateway and IO module all in one.

      Sending the IR codes for sony was easy, Sony IR library knows power toggle/on/off, so I don't need to know the state, to switch de devices off.
      But my Motorola vip1853 and WD live TV only know power toggle, so current state needs to be know to power the device only off and not on.

      Motorola vip1853 / KPN ITV
      alt text
      The IR code was an issue, since the signal is 56khz instead of the normal 40khz, a normal raw decoder/receiver did not provide me a repeatable raw IR code to send to the unit... actually every time I got a different code that was not making any sense at all!
      I found that in LIRC this code is named canalsatld, but that is not known in the IR lib in adruino....
      I used IrScrutinizer to generate raw code for ITV, store this in a file and copied that into my sketch... and the power toggle worked!

      • USB 5V is always active when the unit has power, so cannot be used to detect on/off state
      • Service is always running so Ping or Arp cannot be used to detect on/off state
      • Unit is under warrenty to signal cannot be tabed of the power LED (green=on red=off)
      • Scart signals are all availble, sync signal on is different from sync signal off, in oder to power on other devices

      Scart
      alt text

      • Pin 19 used as video sync output
      • This signal was used historically to switch on the TV by external devices like VCR or DVD
      • Off state=1.18V and on stated=1.4V (DC voltage)
      • Sync signal is modulated and to real DC
      • When measuring the frequency of the signal you know if the device is on or off
      • Comparing the frequency to a reference (somewhere half way between on and off state) can translate this to a digital on/off state

      to check if the device is on through the scart plug I use this circuit:
      alt text

      Power supply
      since both units have a free USB port, I use this to get my 5V, power the ESP8266 and power the IR leds

      IR leds
      the unit currently has 2 * 3.5mm mono jacks that can both power 2 IR led's, with + in the tip and - on the frame end
      the IR leds I use have more then enough power to hide them in a corner of the cabinet out of site from the living, but insite for the devices.

      WD live TV
      alt text
      Next is the WD live TV unit, thereโ€™s a very simple API for sending simulated commands from the remote control โ€“ it involves POSTing a little JSON fragment to a CGI script on the box. You can observe the protocol simply by using the web based remote provided by the built-in web UI.
      w is to power toggle the unit and can be done from the command line
      curl -s -d '{"remote":"w"}' -v http://your.wdtv.ip/cgi-bin/toServerValue.cgi

      multiple people have projects on this, like
      http://blog.dixo.net/category/wdtv/
      http://wdlxtv.com/

      but from the api, i cannot figure out the current state of the unit (power on or off)
      the service is always runing so arp-scan and ping don't work

      since the unit has no scart plug, I need to figure out from HDMI pin 19 likely if the device is on or off
      that is my next project...

      Mysensor gateway
      when the mysensor gateway receives a message to switch one of the devices, it will allways send the sony signals to power devices off, because that cannot hurt. next it checks if the ITV unit is on, if so it will send the power toggle signal, if the unit is off, nothing will be send.
      Same is done for the WD live TV unit, if it is off nothing happens if it is on, the power toggle will be send.
      Next to that the is a test switch that will send all signals if pushed, just to check my code and the sketch checks the stateus of the units every 30 minutes and forwards that data to the server, in case the connection failed when a device changes state.

      All is processed in the sketch below
      http://home.kpn.nl/fwiegers1995/code/GatewayESP8266_IR_remote_demo.ino
      an issue was found with the transfer from a arduino nano to the ESP8266, the send sony signals did not work anymore so the code has to be send in raw format...
      I looked into fixing the IRremoteESP8266.h library, got a long way but got distracted and later decided to just send the code in raw

      The result:
      from a breadboard
      alt text
      to a small box with all fitted inside
      alt text
      only the box was not heigh enough to have the ESP-12 in a normal header on be baord
      alt text
      alt text
      alt text

      posted in My Project
      franzelare
      franzelare
    • RE: Curtain Control Node.

      I'm currently working on a similar project, only I got started with 24V DC motors that I got from my work (left overs from a test project) These motors are very strong (way way over rated) and have a big gearbox what unfortunately makes the movement a bit slow.
      I started off with 1 motor to move 2 curtains at the same time, but will change this to 2 motors for either side since the better half of me likes to control the curtains separately in case she only wants to close 1.
      Next to the automation there will also be a manual control switch be hidden behind the curtains in case the node is down and I'm not at home to fix the issue...
      all running on an ESP8266 (ESP-12e) unit to have it over WiFi and have enough io

      Currently the test setup is working fine and I'm ordering parts to start implementing this a bit bigger in the first room. the test setup I made with some old wood 1 meter of rail and a few old rugs as curtains...
      alt text

      I use a GT2 timing belt that is commently used for 3D printers and pully's are widely available as well as the belts in different lengths (I order them on rolls of 10 meters) and attached the timing belt to a carriage that is normally to pull the curtains with a rod.
      alt text

      the motor is mounted on a bracket with currently 2 end stop switches for open and close (but will be 1 switch for open and 1 for close in the final solution)
      alt text

      resulting in driving the curtain from 1 side
      alt text

      alt text

      electronics are working fine now and need to be ported to a test print and later to a real PCB design

      alt text

      alt text

      posted in My Project
      franzelare
      franzelare
    • RE: Free MySensors 2.0 workshop, Friday 9 September in Amersfoort (The Netherlands)

      Great event! thanks for organizing!
      Although the experience of the attendents was various levels I think everybody had a great time.
      Unfortunately I had to leave earlier than most people I had a great time and hope we can setup an other meeting for a next level work shop on my sensors.

      posted in General Discussion
      franzelare
      franzelare
    • RE: Free MySensors 2.0 workshop, Friday 9 September in Amersfoort (The Netherlands)

      @TheoL you were inspiring! and at least made me enthousiastic to share more of my mysensor projects on this forum and pushed me to finish some of my open projects (in order to post them here)

      My girl suggested to add an other workshop next time in a room next door... for the wifes/girlfriends/spouses : how to deal new projects or with a low wife approval factor projects ๐Ÿ˜‰

      posted in General Discussion
      franzelare
      franzelare
    • RE: Curtain Control Node.

      Sweet!
      My girl has put this on my todolist...
      But still have to get started, this is some nice reference for my new porject!

      posted in My Project
      franzelare
      franzelare
    • RE: monitor domoticz link health

      I have a lua time script running in domoticz that triggers a switch 'On" to every node every minute.
      the node replies by swtiching the id off again and counts how many times the host send a switch command, every 6 minutes the counter is checked, and in case lower than 5, a hard reset is done.

      in domoticz I check if the off command is received and if the off command is not received for more than 3 minutes I trigger a switch "node alive" to off
      as soon as the swtiching is received again, i put the "node alive" on again.
      this way I can also visualize the uptime of the nodes in my network

      when the" node alive" is off, some scripts are disabled because they have interactions between mysensor signals and other inputs, and the dependancies are not valid anymore as soon as the node is not alive anymore

      posted in Domoticz
      franzelare
      franzelare
    • RE: ๐Ÿ’ฌ Bed Occupancy Sensor

      if you run domoticz or an other home automation system, adding a time in bed script could be a next level
      https://www.domoticz.com/forum/viewtopic.php?f=23&t=15502

      posted in OpenHardware.io
      franzelare
      franzelare
    • RE: Raspberry Pi SD Card wear out?

      I have a few Raspi's runing.
      I have had issues once that domoticz would act strange and when i rebooted, all changes i made to scripts and new devices were gone...
      This was a card failing, but not fully failing, because when i put an backup back, the system would run for a while until it got to the cells with issues again and gave me trouble again...

      so in my case not wearing out, but just bad memory cells on the card

      posted in Hardware
      franzelare
      franzelare