Bitbull Tech Notes - home of free minds ...

domoticz ASPSms gateway via JSON API

With this setting, you can send SMS notifications by ASPSMS gateway.

Domoticz > Setup > Settings > TAB:Notifications > Section: "Custom HTTP/Action"

#FIELD1: aPi-Key-here
#FIELD2: pAssw0rd-here
#FIELD3: SenderName
#TO: 0761112233


Post Data:

{ "UserName": "#FIELD1", "Password": "#FIELD2", "Originator": "#FIELD3", "Recipients": [ "#TO" ], "MessageText": "#MESSAGE", "DeferredDeliveryTime": "", "FlashingSMS": "", "URLBufferedMessageNotification": "", "URLDeliveryNotification": "", "URLNonDeliveryNotification": "", "AffiliateID": "" }

POST Content-Type: application/json


That's all, now you can send out sms by http json api


SANNCE 20$ pan/tilt night vision camera hacked into domoticz

On Aliexpress I found this impressive 20$ cam: SANNCE WIFI IP CAM

The cam works quite well, assigning IP with mobile app is some kind of pain, but anyway
After integrating into WLAN with Andorid app (google: sannce wifi cam setup) you can reach the cam on port 81.

The cam has following functionality:

  • pan tilt camera motor
  • auto IR night vision leds
  • motion based alert trigger
    • wlan nic
    • ftp upload on alert
    • email on alert
    • record video on alert


I needed to integrate this cam into mi domoticz home automation system as much as possible.
So I proceeded this way:

  • hack into the cam console
    telnet is running, but no root pw is known
    cam seems to be affected by xss attacks:
    so i tried to configure ftp upload with user: $(telnetd -p25 -l/bin/sh)
    Then hit test, and enjoy telnet server on port 25 without password auth.
  • Modify the scripts to trigger domoticz event on motion
  • /system/init/
    export PATH=/system/system/bin:$PATH
    mkdir -p /tmp/Wireless/RT2870STA
    cp /system/RT2870STA.dat  /tmp/Wireless/RT2870STA/
    mkdir -p /tmp/Wireless/RT2870AP
    cp /system/RT2870AP.dat /tmp/Wireless/RT2870AP/
    ulimit -HSn 4096
    /system/system/bin/wifidaemon &
    /system/bin/ &
    /usr/sbin/telnetd -p24 -l /bin/sh
  • /system/bin/
    while true ; do 
    /usr/bin/tail -fn0 /system/param/log?.txt | /usr/bin/awk '/alarm is happen for motion/ {system("/system/bin/")}
    /alarm is clear/ {system("/system/bin/")}'
    sleep 1 ; done
  • /system/bin/
    echo alert
    wget -q -O -  "http://sensor:sensor@"
    exit 0
  • /system/bin/
    echo clear
    wget -q -O - "http://sensor:sensor@"
    exit 0

That's it, now you have a fully integrated webcam, that can be used as:

  • Virtual switch (motion sensor), triggered by http events above (,
  • domoticz webcam
    User: visitor #set up on cam
    PW: secret
    Image URL: snapshot.cgi?user=visitor&pwd=secret

Now you can trigger push notification and integrate it in your fully armed home automation system!