Closed torkelsson closed 10 years ago
hi. sorry for the delay in getting back you.
here's what i know: the protocol for the tellstick-net is documented here: http://developer.telldus.se/doxygen/TellStickNet.html
it is a good start, but i need some more information to get things working. here are the details:
they provide this by listening for a UDP broadcast on port 30303, and the response returns among other things the MAC address, which is great.
no issues with gateway discovery.
there may be a message to support this, however, in looking at the open source tellstick-net firmware, it's not listed.
with all that in mind, in http://developer.telldus.se/doxygen/index.html the telldus-core API is documented. here is what i need to know:
==> what packets should a program send in order to get the tellstick-net to perform:
tdGetNumberOfDevices
tdGetDeviceId / tdGetName
tdMethods / tdTurnOn / tdTurnOff / tdDim / tdBell
tdSensor / tdSensorValue
note that i am skipping registering for events because i don't think the tellstick-net architecture supports it.
so, here is my request of you: could you contact the folks at telldus and ask them the "what packets" question? i tried getting some help from them last week, but after four round-trips, i didn't get a solution. i suspect you may have better luck with them.
if you can get answers to these questions, then i think it is very easy for me to write a node-tellstick-net package and then have the steward use that.
thanks!
marshall
@btorkelsson - any luck getting answers? thanks!
@mrose17 - No, sorry I completely forgot it.
Though as a first step I think it would be better to consider the TellStickNet as a cloud service that you have to add manually, similar to nest, ecobee, netamoo, ... Even if that is really not in the spirit of TTS.
And then as second step try to discover them locally.
ok, that's fine. where can i find the specification telling me how to talk to their cloud service?
Q: what is the API for telldus.com
A: API. telldus.com
(-;
ok. here we go! grab https://github.com/TheThingSystem/node-telldus-live
look at the README.md file and then get your 4 strings and put them into test.'s and then do this:
% npm -l install
% node test.js
and tell me what it does!
thanks,
/mtr
Wow. You are amazing and without access to it!
I'm not listing all devices, just a few of them. For every sensor/device I also got errors:
device #[object Object]: { error: 'Device "[object Object]" not found!' } sensor #[object Object]: { error: 'The sensor with id "[object Object]" does not exist' }
user: { firstname: 'Björn', lastname: 'Torkelsson', email: 'xxx@gmail.com', credits: 0, pro: -62169984000 } sensors: [ { id: '847133', name: 'Garaget - ute', lastUpdated: 1389912792, ignored: 0, client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '1154238', name: 'Väderstationen', lastUpdated: 1389912702, ignored: 0, client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 } ] devices: [ { id: '127878', name: 'Inne 10', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '144562', name: 'Inne: Vardagsrum', state: 0, statevalue: '0', methods: 0, type: 'group', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1, devices: '127874,127877,127875,414726' }, { id: '127952', name: 'Ute: Garage/Port', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 },
/Björn
thanks very much!
ok, grab the latest and let's see what it produces.
the problem that i have is that the API documentation doesn't explain things like whether it's a restful model, and assumes you can get the output (which isn't true if you don't have any devices).
once we see the latest output, then we can write a small test program to figure out a couple of other things.
at that point, we can then
As before, just a selection. I should have covered all different kinds I have though.
user: { firstname: 'Björn', lastname: 'Torkelsson', email: 'torkelsson@gmail.com', credits: 0, pro: -62169984000 }
sensors: [ { id: '847133', name: 'Garaget - ute', lastUpdated: 1389961562, ignored: 0, client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '1154238', name: 'Väderstationen', lastUpdated: 1389961040, ignored: 0, client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 } ]
devices: [ { id: '127878', name: 'Inne 10', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '144562', name: 'Inne: Vardagsrum', state: 0, statevalue: '0', methods: 0, type: 'group', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1, devices: '127874,127877,127875,414726' }, { id: '127875', name: 'Inne: Vardagsrum fönster', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '127953', name: 'Ute: Garage/Dörr', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '127952', name: 'Ute: Garage/Port', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '127951', name: 'Ute: Garage/Port+Pollare', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 }, { id: '127954', name: 'Ute: Stenparti', state: 0, statevalue: '0', methods: 0, type: 'device', client: '36887', clientName: 'Degernäs 165a', online: '1', editable: 1 } ]
sensor #0: { id: '847133', clientName: 'Degernäs 165a', name: 'Garaget - ute', lastUpdated: 1389961562, ignored: 0, editable: 1, data: [ { name: 'temp', value: '-13.0' } ], protocol: 'fineoffset', sensorId: '113', timezoneoffset: 3600 }
sensor #1: { id: '1154238', clientName: 'Degernäs 165a', name: 'Väderstationen', lastUpdated: 1389961040, ignored: 0, editable: 1, data: [ { name: 'temp', value: '-11.7' }, { name: 'humidity', value: '65' } ], protocol: 'oregon', sensorId: '13', timezoneoffset: 3600 }
device #0: { id: '127878', name: 'Inne 10', state: '0', statevalue: '0', methods: '0', type: 'device', protocol: 'arctech', model: 'selflearning-switch:nexa', online: '1', editable: 1, parameter: [ { name: 'house', value: '10001' }, { name: 'unit', value: '1' } ] }
device #12: { id: '144562', name: 'Inne: Vardagsrum', state: '0', statevalue: '0', methods: '0', type: 'group', protocol: 'group', model: null, online: '1', editable: 1, parameter: [ { name: 'devices', value: '127874,127877,127875,414726' } ], devices: '127874,127877,127875,414726' }
device #13: { id: '127875', name: 'Inne: Vardagsrum fönster', state: '0', statevalue: '0', methods: '0', type: 'device', protocol: 'arctech', model: 'codeswitch:nexa', online: '1', editable: 1, parameter: [ { name: 'house', value: 'A' }, { name: 'unit', value: '2' } ] }
device #15: { id: '127953', name: 'Ute: Garage/Dörr', state: '0', statevalue: '0', methods: '0', type: 'device', protocol: 'arctech', model: 'selflearning-dimmer:nexa', online: '1', editable: 1, parameter: [ { name: 'house', value: '52002' }, { name: 'unit', value: '1' } ] }
device #17: { id: '127951', name: 'Ute: Garage/Port+Pollare', state: '0', statevalue: '0', methods: '0', type: 'device', protocol: 'arctech', model: 'selflearning-switch:nexa', online: '1', editable: 1, parameter: [ { name: 'house', value: '50001' }, { name: 'unit', value: '1' } ] }
device #16: { id: '127952', name: 'Ute: Garage/Port', state: '0', statevalue: '0', methods: '0', type: 'device', protocol: 'arctech', model: 'selflearning-dimmer:nexa', online: '1', editable: 1, parameter: [ { name: 'house', value: '51002' }, { name: 'unit', value: '1' } ] }
device #21: { id: '127954', name: 'Ute: Stenparti', state: '0', statevalue: '0', methods: '0', type: 'device', protocol: 'arctech', model: 'selflearning-switch:nexa', online: '1', editable: 1, parameter: [ { name: 'house', value: '53001' }, { name: 'unit', value: '1' } ] }
thanks. ok, what we have thus far is working. we now need to do two things:
this is one of those things that just one real example would clear-up, but since all the examples (and the API explorer) don't actually go that deep, there's no way of knowing. i am going to ask their support people what the answer is. in the past, i have not had the best of luck (i.e., only bad luck) in getting an answer from them, so i may have to ask you to ask them and perhaps whatever is being lost in translation will be conveyed properly…
thanks!
The complete output from two runs:
https://www.torkel.se/misc/firstrun.txt https://www.torkel.se/misc/secondrun.txt
I you have any questions just shoot and I will try to figure it out myself and/or ask Telldus support. I may be a bit slow in responding though :-(
thanks. i got a reply from telldus and understand the easiest thing to make things work. your output aaas also very helpful.
ok, grab the latest and run test.js again … at the present time, i think i can recognize on/off switches and dimmable switches. this test will confirm that.
https://www.torkel.se/misc/tellstick-net.3.txt
I made some changes to test.js. a PR is sent!
thanks. i am moving this issue to the package itself; i have a revision to test.js for you to test; hopefully, the last!
https://github.com/TheThingSystem/node-telldus-live/issues/2
It would be great to have at least some basic support for tellstick-net (http://www.telldus.se/products/tellstick_net) in TTS. As the Tellstick Net only talks to the Telldus Live service as different solution is probably needed than for the other Tellsticks.